Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 174) sorted by relevance

1234567

/cts/tests/tests/text/src/android/text/method/cts/
DBackspaceTest.java46 private void backspace(final EditorState state, int modifiers) throws Throwable { in backspace() argument
48 mTextView.setText(state.mText, BufferType.EDITABLE); in backspace()
50 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in backspace()
59 state.mText = mTextView.getText(); in backspace()
60 state.mSelectionStart = mTextView.getSelectionStart(); in backspace()
61 state.mSelectionEnd = mTextView.getSelectionEnd(); in backspace()
66 EditorState state = new EditorState(); in testCRLF() local
69 state.setByString("U+000A |"); in testCRLF()
70 backspace(state, 0); in testCRLF()
71 state.assertEquals("|"); in testCRLF()
[all …]
DForwardDeleteTest.java46 private void forwardDelete(final EditorState state, int modifiers) throws Throwable { in forwardDelete() argument
48 mTextView.setText(state.mText, BufferType.EDITABLE); in forwardDelete()
50 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in forwardDelete()
59 state.mText = mTextView.getText(); in forwardDelete()
60 state.mSelectionStart = mTextView.getSelectionStart(); in forwardDelete()
61 state.mSelectionEnd = mTextView.getSelectionEnd(); in forwardDelete()
66 EditorState state = new EditorState(); in testCRLF() local
69 state.setByString("| U+000A"); in testCRLF()
70 forwardDelete(state, 0); in testCRLF()
71 state.assertEquals("|"); in testCRLF()
[all …]
DMetaKeyKeyListenerTest.java135 long state = MetaKeyKeyListener.adjustMetaAfterKeypress(MetaKeyKeyListener.META_SHIFT_ON); in testAdjustMetaAfterKeypress2() local
136 assertEquals(MetaKeyKeyListener.META_SHIFT_ON, state); in testAdjustMetaAfterKeypress2()
138 state = MetaKeyKeyListener.adjustMetaAfterKeypress(MetaKeyKeyListener.META_ALT_ON); in testAdjustMetaAfterKeypress2()
139 assertEquals(MetaKeyKeyListener.META_ALT_ON, state); in testAdjustMetaAfterKeypress2()
141 state = MetaKeyKeyListener.adjustMetaAfterKeypress(MetaKeyKeyListener.META_SYM_ON); in testAdjustMetaAfterKeypress2()
142 assertEquals(MetaKeyKeyListener.META_SYM_ON, state); in testAdjustMetaAfterKeypress2()
144 state = MetaKeyKeyListener.adjustMetaAfterKeypress(0); in testAdjustMetaAfterKeypress2()
145 assertEquals(0, state); in testAdjustMetaAfterKeypress2()
290 long state = MetaKeyKeyListener.resetLockedMeta(MetaKeyKeyListener.META_CAP_LOCKED); in testResetLockedMeta2() local
291 assertEquals(0, state); in testResetLockedMeta2()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DPlaybackStateTest.java56 PlaybackState state = new PlaybackState.Builder().build(); in testBuilder() local
58 assertEquals(new ArrayList<PlaybackState.CustomAction>(), state.getCustomActions()); in testBuilder()
59 assertEquals(0, state.getState()); in testBuilder()
60 assertEquals(0L, state.getPosition()); in testBuilder()
61 assertEquals(0L, state.getBufferedPosition()); in testBuilder()
62 assertEquals(0.0f, state.getPlaybackSpeed(), DELTA); in testBuilder()
63 assertEquals(0L, state.getActions()); in testBuilder()
64 assertNull(state.getErrorMessage()); in testBuilder()
65 assertEquals(0L, state.getLastPositionUpdateTime()); in testBuilder()
66 assertEquals(MediaSession.QueueItem.UNKNOWN_ID, state.getActiveQueueItemId()); in testBuilder()
[all …]
DMediaCodecTunneledPlayer.java276 CodecState state; in addTrack() local
278 state = new CodecState((MediaTimeProvider)this, mVideoExtractor, in addTrack()
280 mVideoCodecStates.put(Integer.valueOf(trackIndex), state); in addTrack() local
282 state = new CodecState((MediaTimeProvider)this, mAudioExtractor, in addTrack()
284 mAudioCodecStates.put(Integer.valueOf(trackIndex), state); in addTrack() local
288 mAudioTrackState = state; in addTrack()
311 for (CodecState state : mVideoCodecStates.values()) { in start()
312 state.start(); in start()
315 for (CodecState state : mAudioCodecStates.values()) { in start()
316 state.start(); in start()
[all …]
DMediaCodecClearKeyPlayer.java422 CodecState state; in addTrack() local
424 state = new CodecState((MediaTimeProvider)this, mVideoExtractor, in addTrack()
427 mVideoCodecStates.put(Integer.valueOf(trackIndex), state); in addTrack() local
429 state = new CodecState((MediaTimeProvider)this, mAudioExtractor, in addTrack()
432 mAudioCodecStates.put(Integer.valueOf(trackIndex), state); in addTrack() local
436 mAudioTrackState = state; in addTrack()
488 for (CodecState state : mVideoCodecStates.values()) { in start()
489 state.start(); in start()
492 for (CodecState state : mAudioCodecStates.values()) { in start()
493 state.start(); in start()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/lifecycle/
DActivityLifecycleSplitScreenTests.java86 waitAndAssertActivityStates(state(secondActivity, ON_RESUME), in testResumedWhenRecreatedFromInNonFocusedStack()
87 state(firstActivity, ON_STOP)); in testResumedWhenRecreatedFromInNonFocusedStack()
101 waitAndAssertActivityStates(state(secondActivity, ON_DESTROY)); in testResumedWhenRecreatedFromInNonFocusedStack()
102 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testResumedWhenRecreatedFromInNonFocusedStack()
114 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testOccludingMovedBetweenStacks()
129 waitAndAssertActivityStates(state(secondActivity, ON_RESUME), in testOccludingMovedBetweenStacks()
130 state(firstActivity, ON_RESUME)); in testOccludingMovedBetweenStacks()
138 waitAndAssertActivityStates(state(thirdActivity, ON_RESUME), in testOccludingMovedBetweenStacks()
139 state(secondActivity, ON_STOP)); in testOccludingMovedBetweenStacks()
145 waitAndAssertActivityStates(state(secondActivity, ON_RESUME), in testOccludingMovedBetweenStacks()
[all …]
DActivityLifecycleTopResumedStateTests.java79 waitAndAssertActivityStates(state(activity, ON_TOP_POSITION_GAINED)); in testTopPositionAfterLaunch()
87 waitAndAssertActivityStates(state(activity, ON_TOP_POSITION_GAINED)); in testTopPositionLostOnFinish()
100 waitAndAssertActivityStates(state(activity, ON_TOP_POSITION_GAINED)); in testTopPositionSwitchToActivityOnTop()
104 waitAndAssertActivityStates(state(topActivity, ON_TOP_POSITION_GAINED), in testTopPositionSwitchToActivityOnTop()
105 state(activity, ON_STOP)); in testTopPositionSwitchToActivityOnTop()
121 waitAndAssertActivityStates(state(firstActivity, ON_TOP_POSITION_GAINED)); in testTopPositionSwitchToActivityOnTopSlowDifferentProcess()
130 waitAndAssertActivityStates(state(secondActivityClass, ON_TOP_POSITION_GAINED), in testTopPositionSwitchToActivityOnTopSlowDifferentProcess()
131 state(firstActivity, ON_STOP)); in testTopPositionSwitchToActivityOnTopSlowDifferentProcess()
147 waitAndAssertActivityStates(state(firstActivity, ON_TOP_POSITION_GAINED)); in testTopPositionSwitchToActivityOnTopTimeoutDifferentProcess()
157 waitAndAssertActivityStates(state(secondActivityClass, ON_TOP_POSITION_GAINED), in testTopPositionSwitchToActivityOnTopTimeoutDifferentProcess()
[all …]
DActivityLifecycleKeyguardTests.java57 waitAndAssertActivityStates(state(activity, ON_STOP)); in testSingleLaunch()
70 waitAndAssertActivityStates(state(activity, ON_RESUME)); in testKeyguardShowHide()
75 waitAndAssertActivityStates(state(activity, ON_STOP)); in testKeyguardShowHide()
82 waitAndAssertActivityStates(state(activity, ON_RESUME)); in testKeyguardShowHide()
93 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testKeyguardShowHideOverSplitScreen()
103 waitAndAssertActivityStates(state(secondActivity, ON_RESUME)); in testKeyguardShowHideOverSplitScreen()
106 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testKeyguardShowHideOverSplitScreen()
112 waitAndAssertActivityStates(state(firstActivity, ON_STOP)); in testKeyguardShowHideOverSplitScreen()
113 waitAndAssertActivityStates(state(secondActivity, ON_STOP)); in testKeyguardShowHideOverSplitScreen()
120 waitAndAssertActivityStates(state(firstActivity, ON_RESUME), in testKeyguardShowHideOverSplitScreen()
[all …]
DActivityLifecycleTests.java74 waitAndAssertActivityStates(state(activity, ON_RESUME)); in testSingleLaunch()
82 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testLaunchOnTop()
87 state(secondActivity, ON_RESUME)); in testLaunchOnTop()
97 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testLaunchTranslucentOnTop()
103 waitAndAssertActivityStates(state(firstActivity, ON_PAUSE), in testLaunchTranslucentOnTop()
104 state(translucentActivity, ON_RESUME)); in testLaunchTranslucentOnTop()
113 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testLaunchDoubleTranslucentOnTop()
119 waitAndAssertActivityStates(state(firstActivity, ON_PAUSE), in testLaunchDoubleTranslucentOnTop()
120 state(translucentActivity, ON_RESUME)); in testLaunchDoubleTranslucentOnTop()
129 waitAndAssertActivityStates(state(translucentActivity, ON_PAUSE), in testLaunchDoubleTranslucentOnTop()
[all …]
DActivityLifecyclePipTests.java72 waitAndAssertActivityStates(state(firstActivity, ON_STOP), state(pipActivity, ON_RESUME)); in testGoToPip()
83 waitAndAssertActivityStates(state(firstActivity, ON_RESUME), state(pipActivity, ON_PAUSE)); in testGoToPip()
95 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testPipOnLaunch()
103 waitAndAssertActivityStates(state(firstActivity, ON_RESUME), state(pipActivity, ON_PAUSE)); in testPipOnLaunch()
123 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testDestroyPip()
131 waitAndAssertActivityStates(state(firstActivity, ON_RESUME), state(pipActivity, ON_PAUSE)); in testDestroyPip()
137 waitAndAssertActivityStates(state(pipActivity, ON_DESTROY)); in testDestroyPip()
149 waitAndAssertActivityStates(state(pipActivity, ON_PAUSE)); in testLaunchBelowPip()
157 waitAndAssertActivityStates(state(firstActivity, ON_RESUME)); in testLaunchBelowPip()
169 waitAndAssertActivityStates(state(pipActivity, ON_PAUSE)); in testIntoPipSameTask()
[all …]
/cts/apps/CameraITS/tests/scene1/
Dtest_ae_precapture_trigger.py63 state = cap['metadata']['android.control.aeState']
64 print "AE state after auto request:", state
65 assert(state in [SEARCHING, CONVERGED])
70 state = cap['metadata']['android.control.aeState']
71 print "AE state after auto request with precapture trigger:", state
72 assert(state in [SEARCHING, CONVERGED, PRECAPTURE])
78 state = caps[-1]['metadata']['android.control.aeState']
79 print "AE state after auto request:", state
80 if state == CONVERGED:
82 assert(state == CONVERGED)
/cts/tests/tests/text/src/android/text/cts/
DStaticLayoutTest.java971 private void moveCursorToRightCursorableOffset(EditorState state) { in moveCursorToRightCursorableOffset() argument
972 assertEquals("The editor has selection", state.mSelectionStart, state.mSelectionEnd); in moveCursorToRightCursorableOffset()
973 StaticLayout layout = StaticLayout.Builder.obtain(state.mText, 0, state.mText.length(), in moveCursorToRightCursorableOffset()
975 final int newOffset = layout.getOffsetToRightOf(state.mSelectionStart); in moveCursorToRightCursorableOffset()
976 state.mSelectionStart = state.mSelectionEnd = newOffset; in moveCursorToRightCursorableOffset()
979 private void moveCursorToLeftCursorableOffset(EditorState state) { in moveCursorToLeftCursorableOffset() argument
980 assertEquals("The editor has selection", state.mSelectionStart, state.mSelectionEnd); in moveCursorToLeftCursorableOffset()
981 StaticLayout layout = StaticLayout.Builder.obtain(state.mText, 0, state.mText.length(), in moveCursorToLeftCursorableOffset()
983 final int newOffset = layout.getOffsetToLeftOf(state.mSelectionStart); in moveCursorToLeftCursorableOffset()
984 state.mSelectionStart = state.mSelectionEnd = newOffset; in moveCursorToLeftCursorableOffset()
[all …]
/cts/tests/tests/location/src/android/location/cts/
DTestMeasurementUtil.java220 int state = measurement.getState(); in assertAllGnssMeasurementMandatoryFields() local
224 String.valueOf(state), in assertAllGnssMeasurementMandatoryFields()
225 state >= 0); in assertAllGnssMeasurementMandatoryFields()
448 int state = measurement.getState(); in verifyReceivedSatelliteVehicleTimeInNs() local
455 if (state == 0) { in verifyReceivedSatelliteVehicleTimeInNs()
467 verifyGpsQzssSvTimes(measurement, softAssert, timeInNs, state, "CONSTELLATION_GPS"); in verifyReceivedSatelliteVehicleTimeInNs()
470 verifyGpsQzssSvTimes(measurement, softAssert, timeInNs, state, in verifyReceivedSatelliteVehicleTimeInNs()
474 if ((state & GnssMeasurement.STATE_SBAS_SYNC) in verifyReceivedSatelliteVehicleTimeInNs()
483 } else if ((state & GnssMeasurement.STATE_SYMBOL_SYNC) in verifyReceivedSatelliteVehicleTimeInNs()
492 } else if ((state & GnssMeasurement.STATE_CODE_LOCK) in verifyReceivedSatelliteVehicleTimeInNs()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DBluetoothRestrictionTest.java170 int state = mBluetoothAdapter.getState(); in assertDisabledAfterTimeout() local
171 switch (state) { in assertDisabledAfterTimeout()
176 if (state != BluetoothAdapter.STATE_ON || turnOff) { in assertDisabledAfterTimeout()
177 assertEquals(BluetoothAdapter.STATE_TURNING_OFF, state); in assertDisabledAfterTimeout()
189 int state = -1; in assertComponentStateAfterTimeout() local
191 state = mPackageManager.getComponentEnabledSetting(component); in assertComponentStateAfterTimeout()
192 if (expectedState == state) { in assertComponentStateAfterTimeout()
199 + state + " after timeout."); in assertComponentStateAfterTimeout()
231 int state = mBluetoothAdapter.getState(); in assertEnabledAfterTimeout() local
232 switch (state) { in assertEnabledAfterTimeout()
[all …]
/cts/tests/tests/webkit/src/android/webkit/cts/
DWebViewZoomTest.java269 ScaleChangedState state = mWebViewClient.waitForNextScaleChange(); in testScaleChangeCallbackMatchesGetScale() local
272 state.mNewScale, mOnUiThread.getScale()); in testScaleChangeCallbackMatchesGetScale()
328 ScaleChangedState state = waitForNextScaleChange(); in expectZoomBy() local
329 assertEquals(currentScale, state.mOldScale); in expectZoomBy()
335 state.mNewScale, greaterThan(currentScale)); in expectZoomBy()
339 state.mNewScale, lessThan(currentScale)); in expectZoomBy()
344 if (Math.abs(nextScale - state.mNewScale) > PAGE_SCALE_EPSILON) { in expectZoomBy()
346 assertFalse(state.mCanZoomIn); in expectZoomBy()
349 state.mNewScale, lessThanOrEqualTo(nextScale)); in expectZoomBy()
351 assertFalse(state.mCanZoomOut); in expectZoomBy()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/widget/
DWidgetCtsProvider.java119 int state = sStateMap.get(widgetId); in gotoNextTest() local
122 state = state == STATE_COMPLETE ? state : state + 1; in gotoNextTest()
123 foundNextTest = shouldPerformTest(state); in gotoNextTest()
124 } while (state < STATE_COMPLETE && !foundNextTest); in gotoNextTest()
125 sStateMap.put(widgetId, state); in gotoNextTest()
128 private boolean shouldPerformTest(int state) { in shouldPerformTest() argument
129 if (state == STATE_VERIFY_SIZE_CALLBACK in shouldPerformTest()
132 } else if (state == STATE_VERIFY_RESIZE in shouldPerformTest()
135 } else if (state == STATE_VERIFY_COLLECTIONS in shouldPerformTest()
138 } else if (state == STATE_VERIFY_HOME_OR_KEYGUARD_CALLBACK in shouldPerformTest()
[all …]
/cts/common/device-side/preconditions/src/com/android/compatibility/common/preconditions/
DExternalStorageHelper.java29 String state = Environment.getExternalStorageState(); in isExternalStorageWritable() local
30 return Environment.MEDIA_MOUNTED.equals(state); in isExternalStorageWritable()
35 String state = Environment.getExternalStorageState(); in isExternalStorageReadable() local
36 return (Environment.MEDIA_MOUNTED.equals(state) || in isExternalStorageReadable()
37 Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)); in isExternalStorageReadable()
/cts/hostsidetests/statsd/src/android/cts/statsd/validation/
DProcStatsValidationTests.java306 for (ProcessStatsStateProto state : process.getStatesList()) {
307 if (state.getProcessState()
309 durationStatsd = state.getDurationMillis();
310 pssAvgStatsd = state.getPss().getAverage();
311 ussAvgStatsd = state.getUss().getAverage();
312 rssAvgStatsd = state.getRss().getAverage();
331 for (ProcessStatsStateProto state : process.getStatesList()) {
332 if (state.getProcessState()
334 durationProcstats = state.getDurationMillis();
335 pssAvgProcstats = state.getPss().getAverage();
[all …]
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DActivityAndWindowManagersState.java255 waitForWithAmState(state -> state.getKeyguardControllerState().keyguardShowing in waitForKeyguardShowingAndNotOccluded()
256 && !state.getKeyguardControllerState().isKeyguardOccluded(DEFAULT_DISPLAY), in waitForKeyguardShowingAndNotOccluded()
261 waitForWithAmState(state -> state.getKeyguardControllerState().keyguardShowing in waitForKeyguardShowingAndOccluded()
262 && state.getKeyguardControllerState().isKeyguardOccluded(DEFAULT_DISPLAY), in waitForKeyguardShowingAndOccluded()
267 waitForWithAmState(state -> state.getKeyguardControllerState().aodShowing, in waitForAodShowing()
273 waitForWithAmState(state -> !state.getKeyguardControllerState().keyguardShowing, in waitForKeyguardGone()
279 waitForWithWmState(state -> state.getRotation() == rotation, in waitForRotation()
288 waitForWithWmState(state -> state.getLastOrientation() == orientation, in waitForLastOrientation()
306 waitForWithWmState(state -> !state.isDisplayFrozen(), in waitForDisplayUnfrozen()
311 waitForWithAmState(state -> state.hasActivityState(activityName, activityState), in waitForActivityState()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DBluetoothTest.java148 int state = mAdapter.getState(); in disable() local
149 switch (state) { in disable()
154 if (state != BluetoothAdapter.STATE_ON || turnOff) { in disable()
155 assertEquals(BluetoothAdapter.STATE_TURNING_OFF, state); in disable()
182 int state = mAdapter.getState(); in enable() local
183 switch (state) { in enable()
188 if (state != BluetoothAdapter.STATE_OFF || turnOn) { in enable()
189 assertEquals(BluetoothAdapter.STATE_TURNING_ON, state); in enable()
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DNetworkCallbackTest.java39 public final CallbackState state; field in NetworkCallbackTest.CallbackInfo
44 state = s; network = n; arg = o; in CallbackInfo()
48 return String.format("%s (%s) (%s)", state, network, arg); in toString()
56 return (state == other.state) && Objects.equals(network, other.network) in equals()
62 return Objects.hash(state, network, arg); in hashCode()
71 protected void setLastCallback(CallbackState state, Network network, Object o) { in setLastCallback() argument
72 mCallbacks.offer(new CallbackInfo(state, network, o)); in setLastCallback()
87 CallbackInfo expectCallback(CallbackState state, Network expectedNetwork, Object o) { in expectCallback() argument
88 final CallbackInfo expected = new CallbackInfo(state, expectedNetwork, o); in expectCallback()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/cts/shareduidtests/
DConstraintTest.java192 String state = getJobState(jobId); in assertJobReady() local
193 assertTrue("Job unexpectedly not ready, in state: " + state, state.contains("ready")); in assertJobReady()
197 String state = getJobState(jobId); in assertJobWaiting() local
198 assertTrue("Job unexpectedly not waiting, in state: " + state, state.contains("waiting")); in assertJobWaiting()
202 String state = getJobState(jobId); in assertJobNotReady() local
203 assertTrue("Job unexpectedly ready, in state: " + state, !state.contains("ready")); in assertJobNotReady()
/cts/tests/signature/lib/common/src/android/signature/cts/
DApiComplianceChecker.java392 int state = START; in unescapeFieldStringValue() local
396 switch (state) { in unescapeFieldStringValue()
399 state = ESCAPE; in unescapeFieldStringValue()
408 state = START; in unescapeFieldStringValue()
412 state = START; in unescapeFieldStringValue()
416 state = START; in unescapeFieldStringValue()
420 state = START; in unescapeFieldStringValue()
424 state = START; in unescapeFieldStringValue()
428 state = START; in unescapeFieldStringValue()
432 state = START; in unescapeFieldStringValue()
[all …]
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DConstraintTest.java195 String state = getJobState(jobId); in assertJobReady() local
196 assertTrue("Job unexpectedly not ready, in state: " + state, state.contains("ready")); in assertJobReady()
200 String state = getJobState(jobId); in assertJobWaiting() local
201 assertTrue("Job unexpectedly not waiting, in state: " + state, state.contains("waiting")); in assertJobWaiting()
205 String state = getJobState(jobId); in assertJobNotReady() local
206 assertTrue("Job unexpectedly ready, in state: " + state, !state.contains("ready")); in assertJobNotReady()

1234567