/cts/tests/tests/text/src/android/text/method/cts/ |
D | BackspaceTest.java | 46 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 …]
|
D | ForwardDeleteTest.java | 46 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 …]
|
D | MetaKeyKeyListenerTest.java | 135 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/ |
D | PlaybackStateTest.java | 56 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 …]
|
D | MediaCodecTunneledPlayer.java | 276 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 …]
|
D | MediaCodecClearKeyPlayer.java | 422 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/ |
D | ActivityLifecycleTopResumedStateTests.java | 79 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 …]
|
D | ActivityLifecycleSplitScreenTests.java | 86 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 …]
|
D | ActivityLifecycleTests.java | 74 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 …]
|
D | ActivityLifecyclePipTests.java | 72 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 …]
|
D | ActivityLifecycleKeyguardTests.java | 57 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 …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | StaticLayoutTest.java | 972 private void moveCursorToRightCursorableOffset(EditorState state) { in moveCursorToRightCursorableOffset() argument 973 assertEquals("The editor has selection", state.mSelectionStart, state.mSelectionEnd); in moveCursorToRightCursorableOffset() 974 StaticLayout layout = StaticLayout.Builder.obtain(state.mText, 0, state.mText.length(), in moveCursorToRightCursorableOffset() 976 final int newOffset = layout.getOffsetToRightOf(state.mSelectionStart); in moveCursorToRightCursorableOffset() 977 state.mSelectionStart = state.mSelectionEnd = newOffset; in moveCursorToRightCursorableOffset() 980 private void moveCursorToLeftCursorableOffset(EditorState state) { in moveCursorToLeftCursorableOffset() argument 981 assertEquals("The editor has selection", state.mSelectionStart, state.mSelectionEnd); in moveCursorToLeftCursorableOffset() 982 StaticLayout layout = StaticLayout.Builder.obtain(state.mText, 0, state.mText.length(), in moveCursorToLeftCursorableOffset() 984 final int newOffset = layout.getOffsetToLeftOf(state.mSelectionStart); in moveCursorToLeftCursorableOffset() 985 state.mSelectionStart = state.mSelectionEnd = newOffset; in moveCursorToLeftCursorableOffset() [all …]
|
/cts/tests/tests/location/src/android/location/cts/ |
D | TestMeasurementUtil.java | 220 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/apps/CameraITS/tests/scene1/ |
D | test_ae_precapture_trigger.py | 63 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/apps/CtsVerifier/src/com/android/cts/verifier/widget/ |
D | WidgetCtsProvider.java | 119 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/tests/tests/webkit/src/android/webkit/cts/ |
D | WebViewZoomTest.java | 269 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/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | BluetoothRestrictionTest.java | 170 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/framework/base/windowmanager/util/src/android/server/wm/ |
D | ActivityAndWindowManagersState.java | 255 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/statsd/src/android/cts/statsd/validation/ |
D | ProcStatsValidationTests.java | 306 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/hostsidetests/net/app/src/com/android/cts/net/hostside/ |
D | NetworkCallbackTest.java | 59 public final CallbackState state; field in NetworkCallbackTest.CallbackInfo 64 state = s; network = n; arg = o; in CallbackInfo() 68 return String.format("%s (%s) (%s)", state, network, arg); in toString() 76 return (state == other.state) && Objects.equals(network, other.network) in equals() 82 return Objects.hash(state, network, arg); in hashCode() 92 protected void setLastCallback(CallbackState state, Network network, Object o) { in setLastCallback() argument 93 mCallbacks.offer(new CallbackInfo(state, network, o)); in setLastCallback() 108 CallbackInfo expectCallback(CallbackState state, Network expectedNetwork, Object o) { in expectCallback() argument 109 final CallbackInfo expected = new CallbackInfo(state, expectedNetwork, o); in expectCallback() 137 if (cb.state != CallbackState.AVAILABLE) { in expectAvailableCallbackAndGetNetwork() [all …]
|
D | AbstractRestrictBackgroundNetworkTestCase.java | 279 ProcessState state = null; in assertBackgroundState() local 281 state = getProcessStateByUid(mUid); in assertBackgroundState() 283 + ": " + state); in assertBackgroundState() 284 if (isBackground(state.state)) { in assertBackgroundState() 287 Log.d(TAG, "App not on background state (" + state + ") on attempt #" + i in assertBackgroundState() 291 fail("App2 is not on background state after " + maxTries + " attempts: " + state ); in assertBackgroundState() 296 ProcessState state = null; in assertForegroundState() local 298 state = getProcessStateByUid(mUid); in assertForegroundState() 300 + ": " + state); in assertForegroundState() 301 if (!isBackground(state.state)) { in assertForegroundState() [all …]
|
/cts/common/device-side/preconditions/src/com/android/compatibility/common/preconditions/ |
D | ExternalStorageHelper.java | 29 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/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | BluetoothTest.java | 148 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/tests/JobSchedulerSharedUid/src/android/jobscheduler/cts/shareduidtests/ |
D | ConstraintTest.java | 192 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/JobScheduler/src/android/jobscheduler/cts/ |
D | ConstraintTest.java | 195 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()
|