Home
last modified time | relevance | path

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

1234

/cts/tests/tests/text/src/android/text/method/cts/
DBackspaceTest.java37 private void backspace(final EditorState state, int modifiers) { in backspace() argument
40 mTextView.setText(state.mText, BufferType.EDITABLE); in backspace()
42 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in backspace()
56 state.mText = mTextView.getText(); in backspace()
57 state.mSelectionStart = mTextView.getSelectionStart(); in backspace()
58 state.mSelectionEnd = mTextView.getSelectionEnd(); in backspace()
63 EditorState state = new EditorState(); in testSurrogatePairs() local
65 state.setByString("U+1F441 |"); in testSurrogatePairs()
66 backspace(state, 0); in testSurrogatePairs()
67 state.assertEquals("|"); in testSurrogatePairs()
[all …]
DForwardDeleteTest.java37 private void forwardDelete(final EditorState state, int modifiers) { in forwardDelete() argument
40 mTextView.setText(state.mText, BufferType.EDITABLE); in forwardDelete()
42 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in forwardDelete()
56 state.mText = mTextView.getText(); in forwardDelete()
57 state.mSelectionStart = mTextView.getSelectionStart(); in forwardDelete()
58 state.mSelectionEnd = mTextView.getSelectionEnd(); in forwardDelete()
63 EditorState state = new EditorState(); in testSurrogatePairs() local
66 state.setByString("| U+1F441"); in testSurrogatePairs()
67 forwardDelete(state, 0); in testSurrogatePairs()
68 state.assertEquals("|"); in testSurrogatePairs()
[all …]
DMetaKeyKeyListenerTest.java115 long state = MetaKeyKeyListener.adjustMetaAfterKeypress(MetaKeyKeyListener.META_SHIFT_ON); in testAdjustMetaAfterKeypress2() local
116 assertEquals(MetaKeyKeyListener.META_SHIFT_ON, state); in testAdjustMetaAfterKeypress2()
118 state = MetaKeyKeyListener.adjustMetaAfterKeypress(MetaKeyKeyListener.META_ALT_ON); in testAdjustMetaAfterKeypress2()
119 assertEquals(MetaKeyKeyListener.META_ALT_ON, state); in testAdjustMetaAfterKeypress2()
121 state = MetaKeyKeyListener.adjustMetaAfterKeypress(MetaKeyKeyListener.META_SYM_ON); in testAdjustMetaAfterKeypress2()
122 assertEquals(MetaKeyKeyListener.META_SYM_ON, state); in testAdjustMetaAfterKeypress2()
124 state = MetaKeyKeyListener.adjustMetaAfterKeypress(0); in testAdjustMetaAfterKeypress2()
125 assertEquals(0, state); in testAdjustMetaAfterKeypress2()
230 long state = MetaKeyKeyListener.resetLockedMeta(MetaKeyKeyListener.META_CAP_LOCKED); in testResetLockedMeta2() local
231 assertEquals(0, state); in testResetLockedMeta2()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DStaticLayoutTest.java987 private void moveCursorToRightCursorableOffset(EditorState state) { in moveCursorToRightCursorableOffset() argument
988 assertEquals("The editor has selection", state.mSelectionStart, state.mSelectionEnd); in moveCursorToRightCursorableOffset()
989 StaticLayout layout = StaticLayout.Builder.obtain(state.mText, 0, state.mText.length(), in moveCursorToRightCursorableOffset()
991 final int newOffset = layout.getOffsetToRightOf(state.mSelectionStart); in moveCursorToRightCursorableOffset()
992 state.mSelectionStart = state.mSelectionEnd = newOffset; in moveCursorToRightCursorableOffset()
995 private void moveCursorToLeftCursorableOffset(EditorState state) { in moveCursorToLeftCursorableOffset() argument
996 assertEquals("The editor has selection", state.mSelectionStart, state.mSelectionEnd); in moveCursorToLeftCursorableOffset()
997 StaticLayout layout = StaticLayout.Builder.obtain(state.mText, 0, state.mText.length(), in moveCursorToLeftCursorableOffset()
999 final int newOffset = layout.getOffsetToLeftOf(state.mSelectionStart); in moveCursorToLeftCursorableOffset()
1000 state.mSelectionStart = state.mSelectionEnd = newOffset; in moveCursorToLeftCursorableOffset()
[all …]
/cts/tests/tests/media/src/android/media/cts/
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.java334 CodecState state; in addTrack() local
336 state = new CodecState((MediaTimeProvider)this, mVideoExtractor, in addTrack()
339 mVideoCodecStates.put(Integer.valueOf(trackIndex), state); in addTrack() local
341 state = new CodecState((MediaTimeProvider)this, mAudioExtractor, in addTrack()
344 mAudioCodecStates.put(Integer.valueOf(trackIndex), state); in addTrack() local
348 mAudioTrackState = state; in addTrack()
388 for (CodecState state : mVideoCodecStates.values()) { in start()
389 state.start(); in start()
392 for (CodecState state : mAudioCodecStates.values()) { in start()
393 state.start(); in start()
[all …]
DMediaSyncTest.java420 final PlayAVState state = new PlayAVState(); in playAV() local
425 audio, video, playbackRate, state)); in playAV()
433 if (!state.mTimeValid) return; in playAV()
438 final double tolerance = state.mMediaDurationUs in playAV()
439 * (state.mSyncTolerance + FLOAT_PLAYBACK_RATE_TOLERANCE) in playAV()
441 final double diff = state.mMediaDurationUs - state.mClockDurationUs * playbackRate ; in playAV()
444 + ", clockDurationUs " + state.mClockDurationUs in playAV()
445 + ", mediaDurationUs " + state.mMediaDurationUs in playAV()
472 PlayAVState state) { in runPlayAV() argument
562 state.mTimeValid = true; in runPlayAV()
[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/location/src/android/location/cts/
DTestMeasurementUtil.java164 int state = measurement.getState(); in assertAllGnssMeasurementMandatoryFields() local
168 String.valueOf(state), in assertAllGnssMeasurementMandatoryFields()
169 state > 0); in assertAllGnssMeasurementMandatoryFields()
397 int state = measurement.getState(); in verifyReceivedSatelliteVehicleTimeInNs() local
404 if (state == 0) { in verifyReceivedSatelliteVehicleTimeInNs()
416 verifyGpsQzssSvTimes(measurement, softAssert, timeInNs, state, "CONSTELLATION_GPS"); in verifyReceivedSatelliteVehicleTimeInNs()
419 verifyGpsQzssSvTimes(measurement, softAssert, timeInNs, state, in verifyReceivedSatelliteVehicleTimeInNs()
423 if ((state | GnssMeasurement.STATE_SBAS_SYNC) in verifyReceivedSatelliteVehicleTimeInNs()
432 } else if ((state | GnssMeasurement.STATE_SYMBOL_SYNC) in verifyReceivedSatelliteVehicleTimeInNs()
441 } else if ((state | GnssMeasurement.STATE_CODE_LOCK) in verifyReceivedSatelliteVehicleTimeInNs()
[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/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/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/
DAbstractRestrictBackgroundNetworkTestCase.java226 ProcessState state = null; in assertBackgroundState() local
228 state = getProcessStateByUid(mUid); in assertBackgroundState()
230 + ": " + state); in assertBackgroundState()
231 if (isBackground(state.state)) { in assertBackgroundState()
238 fail("App2 is not on background state after " + maxTries + " attempts: " + state ); in assertBackgroundState()
243 ProcessState state = null; in assertForegroundState() local
245 state = getProcessStateByUid(mUid); in assertForegroundState()
247 + ": " + state); in assertForegroundState()
248 if (!isBackground(state.state)) { in assertForegroundState()
255 fail("App2 is not on foreground state after " + maxTries + " attempts: " + state ); in assertForegroundState()
[all …]
/cts/tests/tests/telecom/src/android/telecom/cts/
DMockConnection.java144 public void onCallAudioStateChanged(CallAudioState state) { in onCallAudioStateChanged() argument
145 super.onCallAudioStateChanged(state); in onCallAudioStateChanged()
146 mCallAudioState = state; in onCallAudioStateChanged()
148 mRemoteConnection.setCallAudioState(state); in onCallAudioStateChanged()
153 public void onStateChanged(int state) { in onStateChanged() argument
154 super.onStateChanged(state); in onStateChanged()
155 mState = state; in onStateChanged()
DBaseRemoteTelecomTest.java185 void assertRemoteConnectionState(final RemoteConnection connection, final int state) { in assertRemoteConnectionState() argument
190 return state; in assertRemoteConnectionState()
199 "Remote Connection should be in state " + state in assertRemoteConnectionState()
203 void assertRemoteConferenceState(final RemoteConference conference, final int state) { in assertRemoteConferenceState() argument
208 return state; in assertRemoteConferenceState()
217 "Remote Conference should be in state " + state in assertRemoteConferenceState()
DBaseTelecomTestWithMockServices.java615 final CallAudioState state = incallService.getCallAudioState(); in assertMuteState()
616 return state == null ? null : state.isMuted(); in assertMuteState()
634 final CallAudioState state = connection.getCallAudioState(); in assertMuteState()
635 return state == null ? null : state.isMuted(); in assertMuteState()
653 final CallAudioState state = incallService.getCallAudioState(); in assertAudioRoute()
654 return state == null ? null : state.getRoute(); in assertAudioRoute()
672 final CallAudioState state = incallService.getCallAudioState(); in assertNotAudioRoute()
673 return route != state.getRoute(); in assertNotAudioRoute()
691 final CallAudioState state = ((Connection) connection).getCallAudioState(); in assertAudioRoute()
692 return state == null ? null : state.getRoute(); in assertAudioRoute()
[all …]
/cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/src/com/android/cts/privilegedupdate/
DPrivilegedAppDisableTest.java78 int state = pm.getApplicationEnabledSetting(packageName); in assertPackageEnabledState() local
79 if (state == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) { in assertPackageEnabledState()
80 state = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; in assertPackageEnabledState()
82 assertEquals(expectedState, state); in assertPackageEnabledState()
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DBasicAdapterTest.java238 int state = adapter.getState(); in disable() local
239 switch (state) { in disable()
244 if (state != BluetoothAdapter.STATE_ON || turnOff) { in disable()
245 assertEquals(BluetoothAdapter.STATE_TURNING_OFF, state); in disable()
271 int state = adapter.getState(); in enable() local
272 switch (state) { in enable()
277 if (state != BluetoothAdapter.STATE_OFF || turnOn) { in enable()
278 assertEquals(BluetoothAdapter.STATE_TURNING_ON, state); in enable()
/cts/tests/tests/security/src/android/security/cts/
DListeningPortsTest.java210 if (isPortListening(entry.state, isTcp) in assertNoAccessibleListeningPorts()
279 private static boolean isPortListening(String state, boolean isTcp) { in isPortListening() argument
282 return listeningState.equals(state); in isPortListening()
294 private final String state; field in ListeningPortsTest.ParsedProcEntry
297 private ParsedProcEntry(InetAddress addr, int port, String state, int uid) { in ParsedProcEntry() argument
300 this.state = state; in ParsedProcEntry()
335 String state = fields[3]; in parse() local
340 retval.add(new ParsedProcEntry(localIp, localPort, state, uid)); in parse()
/cts/tools/dasm/src/java_cup/runtime/
Dsymbol.java24 public symbol(int sym_num, int state) in symbol() argument
27 parse_state = state; in symbol()
/cts/tests/tests/view/src/android/view/cts/
DView_BaseSavedStateTest.java26 BaseSavedState state = new BaseSavedState(Parcel.obtain()); in testConstructors() local
28 new BaseSavedState(state); in testConstructors()
/cts/tests/camera/src/android/hardware/camera2/cts/helpers/
DPreconditions.java119 public static boolean checkState(String message, boolean state) { in checkState() argument
120 if (!state) { in checkState()
124 return state; in checkState()
/cts/tests/tests/widget/src/android/widget/cts/
DCompoundButtonTest.java239 int[] state = compoundButton.onCreateDrawableState(0); in testOnCreateDrawableState() local
240 assertEquals(0, state[state.length - 1]); in testOnCreateDrawableState()
245 assertEquals(state[0], checkedState[0]); in testOnCreateDrawableState()
251 state = compoundButton.onCreateDrawableState(0); in testOnCreateDrawableState()
252 assertEquals(0, state[state.length - 1]); in testOnCreateDrawableState()
305 Parcelable state; in testAccessInstanceState() local
310 state = compoundButton.onSaveInstanceState(); in testAccessInstanceState()
311 assertNotNull(state); in testAccessInstanceState()
316 compoundButton.onRestoreInstanceState(state); in testAccessInstanceState()
/cts/tests/app/app/src/android/app/stubs/
DTestedActivity.java34 protected void onRestoreInstanceState(Bundle state) { in onRestoreInstanceState() argument
35 super.onRestoreInstanceState(state); in onRestoreInstanceState()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/location/
DLocationModeOffTestActivity.java41 protected void testAdvance(int state) { in testAdvance() argument
42 switch (state) { in testAdvance()

1234