Home
last modified time | relevance | path

Searched refs:getState (Results 1 – 25 of 268) sorted by relevance

1234567891011

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
DGSMPhoneTest.java.broken102 } while (state.getState() != ServiceState.STATE_IN_SERVICE);
144 assertEquals(PhoneConstants.State.IDLE, mGSMPhone.getState());
149 assertEquals(Call.State.IDLE, mGSMPhone.getRingingCall().getState());
150 assertEquals(Call.State.IDLE, mGSMPhone.getForegroundCall().getState());
151 assertEquals(Call.State.IDLE, mGSMPhone.getBackgroundCall().getState());
163 assertEquals(PhoneConstants.State.OFFHOOK, mGSMPhone.getState());
168 assertEquals(PhoneConstants.State.OFFHOOK, mGSMPhone.getState());
169 assertEquals(Call.State.DIALING, mGSMPhone.getForegroundCall().getState());
180 assertEquals(Call.State.IDLE, mGSMPhone.getRingingCall().getState());
182 mGSMPhone.getForegroundCall().getState());
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DGsmCdmaCallTrackerTest.java91 doReturn(ServiceState.STATE_IN_SERVICE).when(mServiceState).getState(); in testMOCallDial()
92 assertEquals(PhoneConstants.State.IDLE, mCTUT.getState()); in testMOCallDial()
93 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mForegroundCall.getState()); in testMOCallDial()
94 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mBackgroundCall.getState()); in testMOCallDial()
103 assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); in testMOCallDial()
104 assertEquals(GsmCdmaCall.State.DIALING, mCTUT.mForegroundCall.getState()); in testMOCallDial()
122 assertEquals(GsmCdmaCall.State.ACTIVE, mCTUT.mForegroundCall.getState()); in testMOCallPickUp()
123 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mBackgroundCall.getState()); in testMOCallPickUp()
132 assertEquals(GsmCdmaCall.State.DIALING, mCTUT.mForegroundCall.getState()); in testMOCallHangup()
133 assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); in testMOCallHangup()
[all …]
DGsmCdmaCallTest.java53 assertEquals(Call.State.IDLE, mCallUnderTest.getState()); in testAttachDetach()
61 assertEquals(Call.State.ACTIVE, mCallUnderTest.getState()); in testAttachDetach()
68 assertEquals(Call.State.IDLE, mCallUnderTest.getState()); in testAttachDetach()
75 assertEquals(Call.State.IDLE, mCallUnderTest.getState()); in testMultiparty()
114 assertEquals(Call.State.ACTIVE, mCallUnderTest.getState()); in testConnectionDisconnected()
117 doReturn(Call.State.DISCONNECTED).when(mConnection1).getState(); in testConnectionDisconnected()
119 assertEquals(Call.State.ACTIVE, mCallUnderTest.getState()); in testConnectionDisconnected()
121 doReturn(Call.State.DISCONNECTED).when(mConnection2).getState(); in testConnectionDisconnected()
123 assertEquals(Call.State.DISCONNECTED, mCallUnderTest.getState()); in testConnectionDisconnected()
DCallManagerTest.java103 doReturn(ServiceState.STATE_IN_SERVICE).when(mServiceState).getState(); in setUp()
110 doReturn(Call.State.IDLE).when(mBgCall).getState(); in setUp()
111 doReturn(Call.State.IDLE).when(mFgCall).getState(); in setUp()
112 doReturn(Call.State.IDLE).when(mRingingCall).getState(); in setUp()
331 doReturn(ServiceState.STATE_OUT_OF_SERVICE).when(mSecondServiceState).getState(); in testGetServiceState()
335 doReturn(ServiceState.STATE_EMERGENCY_ONLY).when(mSecondServiceState).getState(); in testGetServiceState()
339 doReturn(ServiceState.STATE_POWER_OFF).when(mSecondServiceState).getState(); in testGetServiceState()
343 doReturn(ServiceState.STATE_OUT_OF_SERVICE).when(mSecondServiceState).getState(); in testGetServiceState()
344 doReturn(ServiceState.STATE_EMERGENCY_ONLY).when(mServiceState).getState(); in testGetServiceState()
349 doReturn(ServiceState.STATE_POWER_OFF).when(mServiceState).getState(); in testGetServiceState()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/
DImsPhoneCallTrackerTest.java225 assertEquals(PhoneConstants.State.IDLE, mCTUT.getState()); in testImsMTCall()
232 assertEquals(PhoneConstants.State.RINGING, mCTUT.getState()); in testImsMTCall()
251 assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); in testImsMTCallAccept()
252 assertEquals(Call.State.ACTIVE, mCTUT.mForegroundCall.getState()); in testImsMTCallAccept()
270 assertEquals(PhoneConstants.State.IDLE, mCTUT.getState()); in testImsMTCallReject()
277 assertEquals(Call.State.ACTIVE, mCTUT.mForegroundCall.getState()); in testImsMTCallAcceptHangUp()
278 assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); in testImsMTCallAcceptHangUp()
285 assertEquals(PhoneConstants.State.IDLE, mCTUT.getState()); in testImsMTCallAcceptHangUp()
286 assertEquals(Call.State.IDLE, mCTUT.mForegroundCall.getState()); in testImsMTCallAcceptHangUp()
294 assertEquals(Call.State.ACTIVE, mCTUT.mForegroundCall.getState()); in testImsMTCallAcceptHold()
[all …]
DImsPhoneCallTest.java67 assertEquals(Call.State.IDLE, mImsCallUT.getState()); in testAttachDetach()
74 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testAttachDetach()
81 assertEquals(Call.State.IDLE, mImsCallUT.getState()); in testAttachDetach()
91 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testConnectionDisconnected()
93 doReturn(Call.State.DISCONNECTED).when(mConnection1).getState(); in testConnectionDisconnected()
95 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testConnectionDisconnected()
96 doReturn(Call.State.DISCONNECTED).when(mConnection2).getState(); in testConnectionDisconnected()
98 assertEquals(Call.State.DISCONNECTED, mImsCallUT.getState()); in testConnectionDisconnected()
121 assertEquals(Call.State.ALERTING, mImsCallUT.getState()); in testUpdateRingBackTone()
124 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testUpdateRingBackTone()
[all …]
DImsPhoneTest.java119 doReturn(Call.State.IDLE).when(mForegroundCall).getState(); in setUp()
120 doReturn(Call.State.IDLE).when(mBackgroundCall).getState(); in setUp()
121 doReturn(Call.State.IDLE).when(mRingingCall).getState(); in setUp()
151 doReturn(Call.State.INCOMING).when(mRingingCall).getState(); in testHandleInCallMmiCommandCallDeflection()
161 doReturn(Call.State.IDLE).when(mRingingCall).getState(); in testHandleInCallMmiCommandCallDeflection()
162 doReturn(Call.State.ACTIVE).when(mBackgroundCall).getState(); in testHandleInCallMmiCommandCallDeflection()
170 doReturn(Call.State.ACTIVE).when(mForegroundCall).getState(); in testHandleInCallMmiCommandCallWaiting()
188 doReturn(Call.State.IDLE).when(mForegroundCall).getState(); in testHandleInCallMmiCommandCallWaiting()
189 doReturn(Call.State.INCOMING).when(mRingingCall).getState(); in testHandleInCallMmiCommandCallWaiting()
197 doReturn(Call.State.ACTIVE).when(mForegroundCall).getState(); in testHandleInCallMmiCommandCallHold()
[all …]
DImsPhoneConnectionTest.java79 doReturn(ImsPhoneCall.State.IDLE).when(mForeGroundCall).getState(); in setUp()
93 assertEquals(ImsPhoneCall.State.IDLE, mConnectionUT.getState()); in testImsConnectionSanity()
122 doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); in testImsUpdateStateForeGround()
135 doReturn(Call.State.HOLDING).when(mBackGroundCall).getState(); in testImsUpdateStateBackGround()
183 assertEquals(GsmCdmaCall.State.DISCONNECTED, mConnectionUT.getState()); in testConnectionDisconnect()
193 doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); in testPostDialWait()
216 doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); in testPostDialPause()
/frameworks/base/core/java/android/print/
DPrintJob.java84 final int state = getInfo().getState(); in cancel()
115 return getInfo().getState() == PrintJobInfo.STATE_QUEUED; in isQueued()
128 return getInfo().getState() == PrintJobInfo.STATE_STARTED; in isStarted()
141 return getInfo().getState() == PrintJobInfo.STATE_BLOCKED; in isBlocked()
152 return getInfo().getState() == PrintJobInfo.STATE_COMPLETED; in isCompleted()
166 return getInfo().getState() == PrintJobInfo.STATE_FAILED; in isFailed()
177 return getInfo().getState() == PrintJobInfo.STATE_CANCELED; in isCancelled()
181 final int state = mCachedInfo.getState(); in isInImmutableState()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/sip/
DSipPhone.java106 if (mRingingCall.getState().isAlive()) { in takeIncomingCall()
113 if (mForegroundCall.getState().isAlive() in takeIncomingCall()
114 && mBackgroundCall.getState().isAlive()) { in takeIncomingCall()
127 boolean makeCallWait = mForegroundCall.getState().isAlive(); in takeIncomingCall()
130 if (sipAudioCall.getState() != SipSession.State.INCOMING_CALL) { in takeIncomingCall()
153 if ((mRingingCall.getState() == Call.State.INCOMING) || in acceptCall()
154 (mRingingCall.getState() == Call.State.WAITING)) { in acceptCall()
172 if (mRingingCall.getState().isRinging()) { in rejectCall()
200 if (mForegroundCall.getState() == SipCall.State.ACTIVE) { in dialInternal()
203 if (mForegroundCall.getState() != SipCall.State.IDLE) { in dialInternal()
[all …]
DSipPhoneBase.java118 public PhoneConstants.State getState() { in getState() method in SipPhoneBase
205 int serviceState = getServiceState().getState(); in canDial()
214 Rlog.v(LOG_TAG, "canDial(): ringingCall: " + getRingingCall().getState()); in canDial()
215 Rlog.v(LOG_TAG, "canDial(): foregndCall: " + getForegroundCall().getState()); in canDial()
216 Rlog.v(LOG_TAG, "canDial(): backgndCall: " + getBackgroundCall().getState()); in canDial()
218 && (!getForegroundCall().getState().isAlive() in canDial()
219 || !getBackgroundCall().getState().isAlive()); in canDial()
228 Call.State foregroundCallState = getForegroundCall().getState(); in isInCall()
229 Call.State backgroundCallState = getBackgroundCall().getState(); in isInCall()
230 Call.State ringingCallState = getRingingCall().getState(); in isInCall()
/frameworks/base/core/java/android/printservice/
DPrintJob.java125 return getInfo().getState() == PrintJobInfo.STATE_QUEUED; in isQueued()
141 return getInfo().getState() == PrintJobInfo.STATE_STARTED; in isStarted()
157 return getInfo().getState() == PrintJobInfo.STATE_BLOCKED; in isBlocked()
171 return getInfo().getState() == PrintJobInfo.STATE_COMPLETED; in isCompleted()
185 return getInfo().getState() == PrintJobInfo.STATE_FAILED; in isFailed()
199 return getInfo().getState() == PrintJobInfo.STATE_CANCELED; in isCancelled()
218 final int state = getInfo().getState(); in start()
242 final int state = info.getState(); in block()
459 final int state = mCachedInfo.getState(); in isInImmutableState()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/
DMediaAudioTrackTest.java103 localRes = (track.getState() == _expected_stateForMode); in constructorTestMultiSampleRate()
279 if (track.getState() != AudioTrack.STATE_INITIALIZED) { in testConstructorStreamType()
315 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testPlaybackHeadPositionAfterInit()
338 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testPlaybackHeadPositionIncrease()
366 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testPlaybackHeadPositionAfterFlush()
396 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testPlaybackHeadPositionAfterStop()
427 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testPlaybackHeadPositionAfterPause()
542 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testSetPlaybackRate()
565 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testSetPlaybackRateZero()
591 assumeTrue(TEST_NAME, track.getState() == AudioTrack.STATE_INITIALIZED); in testSetPlaybackRateTwiceOutputSR()
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DStateMachineTest.java171 assertEquals(smQuitTest.mS1, lr.getState()); in testStateMachineQuit()
176 assertEquals(smQuitTest.mS1, lr.getState()); in testStateMachineQuit()
273 assertEquals(smQuitNowTest.mS1, lr.getState()); in testStateMachineQuitNow()
278 assertEquals(smQuitNowTest.mS1, lr.getState()); in testStateMachineQuitNow()
419 assertEquals(smEnterExitTranstionToTest.mS1, lr.getState()); in testStateMachineEnterExitTransitionToTest()
423 assertEquals(smEnterExitTranstionToTest.mS1, lr.getState()); in testStateMachineEnterExitTransitionToTest()
427 assertEquals(smEnterExitTranstionToTest.mS2, lr.getState()); in testStateMachineEnterExitTransitionToTest()
431 assertEquals(smEnterExitTranstionToTest.mS2, lr.getState()); in testStateMachineEnterExitTransitionToTest()
437 assertEquals(smEnterExitTranstionToTest.mS2, lr.getState()); in testStateMachineEnterExitTransitionToTest()
445 assertEquals(smEnterExitTranstionToTest.mS3, lr.getState()); in testStateMachineEnterExitTransitionToTest()
[all …]
/frameworks/base/core/java/android/os/
DSystemService.java78 public static State getState(String service) { in getState() method in SystemService
92 return State.STOPPED.equals(getState(service)); in isStopped()
99 return State.RUNNING.equals(getState(service)); in isRunning()
110 final State currentState = getState(service); in waitForState()
135 if (State.STOPPED.equals(getState(service))) { in waitForAnyStopped()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DCall.java113 public State getState() { in getState() method in Call
132 return !getState().isAlive(); in isIdle()
214 return getState().isDialing();
219 return getState().isRinging();
252 if (getState().isAlive()) {
267 if (c.getState() == State.DISCONNECTED) {
DGsmCdmaCallTracker.java279 if (mForegroundCall.getState() == GsmCdmaCall.State.ACTIVE) { in dial()
301 if (mForegroundCall.getState() != GsmCdmaCall.State.IDLE) { in dial()
414 if (mForegroundCall.getState() == GsmCdmaCall.State.ACTIVE) { in dial()
508 if (mRingingCall.getState() == GsmCdmaCall.State.INCOMING) { in acceptCall()
513 } else if (mRingingCall.getState() == GsmCdmaCall.State.WAITING) { in acceptCall()
536 if (mRingingCall.getState().isRinging()) { in rejectCall()
552 if (mRingingCall.getState() == GsmCdmaCall.State.INCOMING) { in switchWaitingOrHoldingAndActive()
593 return mForegroundCall.getState() == GsmCdmaCall.State.ACTIVE in canConference()
594 && mBackgroundCall.getState() == GsmCdmaCall.State.HOLDING in canConference()
601 int serviceState = mPhone.getServiceState().getState(); in canDial()
[all …]
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/media/
DSessionManager.java147 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in seek()
148 || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in seek()
256 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in suspend()
257 || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in suspend()
335 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PENDING) { in updatePlaybackState()
341 } else if (mPaused && item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING) { in updatePlaybackState()
344 } else if (!mPaused && item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in updatePlaybackState()
367 } else if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in removeItem()
368 || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED){ in removeItem()
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/
DDocumentLoader.java94 if (task.getState() == LoaderTask.STATE_LOADING) { in queryChildDocuments()
121 if (task.getState() == LoaderTask.STATE_LOADING) { in getNextTaskOrReleaseBackgroundThread()
130 Preconditions.checkState(existingTask.getState() != LoaderTask.STATE_LOADING); in getNextTaskOrReleaseBackgroundThread()
199 task.getState() != LoaderTask.STATE_CANCELLED && in run()
202 task.getState() != LoaderTask.STATE_LOADING); in run()
225 if (get(i).getState() == LoaderTask.STATE_COMPLETED) { in clearCompletedTasks()
296 switch (getState()) { in createCursor()
415 int getState() { in getState() method in DocumentLoader.LoaderTask
/frameworks/opt/telephony/src/java/com/android/internal/telephony/imsphone/
DImsPhoneBase.java158 public PhoneConstants.State getState() { in getState() method in ImsPhoneBase
242 int serviceState = getServiceState().getState(); in canDial()
251 Rlog.v(LOG_TAG, "canDial(): ringingCall: " + getRingingCall().getState()); in canDial()
252 Rlog.v(LOG_TAG, "canDial(): foregndCall: " + getForegroundCall().getState()); in canDial()
253 Rlog.v(LOG_TAG, "canDial(): backgndCall: " + getBackgroundCall().getState()); in canDial()
255 && (!getForegroundCall().getState().isAlive() in canDial()
256 || !getBackgroundCall().getState().isAlive()); in canDial()
265 Call.State foregroundCallState = getForegroundCall().getState(); in isInCall()
266 Call.State backgroundCallState = getBackgroundCall().getState(); in isInCall()
267 Call.State ringingCallState = getRingingCall().getState(); in isInCall()
DImsPhoneCallTracker.java143 " fg = " + mForegroundCall.getState() +
144 " bg = " + mBackgroundCall.getState());
170 if ((mForegroundCall.getState() != ImsPhoneCall.State.IDLE) ||
171 (mBackgroundCall.getState() != ImsPhoneCall.State.IDLE)) {
471 if (mForegroundCall.getState() == ImsPhoneCall.State.ACTIVE) { in dial()
472 if (mBackgroundCall.getState() != ImsPhoneCall.State.IDLE) { in dial()
491 fgState = mForegroundCall.getState(); in dial()
492 bgState = mBackgroundCall.getState(); in dial()
693 if (mForegroundCall.getState().isAlive() in acceptCall()
694 && mBackgroundCall.getState().isAlive()) { in acceptCall()
[all …]
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DCameraStateHolder.java57 public synchronized int getState() { in getState() method in CameraStateHolder
126 return (states | getState()) == states; in waitForStates()
144 return (states & getState()) == 0;
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DLocalBluetoothAdapter.java114 public int getState() { in getState() method in LocalBluetoothAdapter
115 return mAdapter.getState(); in getState()
203 int currentState = mAdapter.getState(); in syncBluetoothState()
205 setBluetoothStateInt(mAdapter.getState()); in syncBluetoothState()
/frameworks/support/design/tests/src/android/support/design/widget/
DBottomSheetBehaviorTest.java72 int state = behavior.getState(); in Callback()
275 assertThat(behavior.getState(), is(BottomSheetBehavior.STATE_COLLAPSED)); in testInitialSetup()
340 assertThat(getBehavior().getState(), is(BottomSheetBehavior.STATE_COLLAPSED)); in testSwipeDownToCollapse()
357 assertThat(getBehavior().getState(), is(BottomSheetBehavior.STATE_HIDDEN)); in testSwipeDownToHide()
400 assertThat(getBehavior().getState(), is(BottomSheetBehavior.STATE_HIDDEN)); in testSkipCollapsed()
424 assertThat(getBehavior().getState(), is(BottomSheetBehavior.STATE_EXPANDED)); in testSwipeUpToExpand()
438 assertThat(getBehavior().getState(), is(BottomSheetBehavior.STATE_COLLAPSED)); in testInvisible()
456 assertThat(getBehavior().getState(), is(BottomSheetBehavior.STATE_COLLAPSED)); in testInvisible()
486 assertThat(behavior.getState(), is(BottomSheetBehavior.STATE_COLLAPSED)); in testNestedScroll()
514 assertThat(behavior.getState(), is(BottomSheetBehavior.STATE_EXPANDED)); in testNestedScroll()
[all …]
/frameworks/base/core/java/android/bluetooth/
DBluetoothAdapter.java802 public int getState() { in getState() method in BluetoothAdapter
808 state = mService.getState(); in getState()
852 state = mService.getState(); in getLeState()
1048 if (getState() != STATE_ON) return null; in getUuids()
1077 if (getState() != STATE_ON) return false; in setName()
1108 if (getState() != STATE_ON) return SCAN_MODE_NONE; in getScanMode()
1149 if (getState() != STATE_ON) return false; in setScanMode()
1163 if (getState() != STATE_ON) return false; in setScanMode()
1170 if (getState() != STATE_ON) return -1; in getDiscoverableTimeout()
1184 if (getState() != STATE_ON) return; in setDiscoverableTimeout()
[all …]

1234567891011