Home
last modified time | relevance | path

Searched refs:State (Results 1 – 25 of 372) sorted by relevance

12345678910>>...15

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeDockHandlerTest.java43 import com.android.systemui.doze.DozeMachine.State;
82 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testDockEventListener_registerAndUnregister()
86 mDockHandler.transitionTo(DozeMachine.State.DOZE, DozeMachine.State.FINISH); in testDockEventListener_registerAndUnregister()
93 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_dockedWhenDoze_requestPulse()
94 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnEvent_dockedWhenDoze_requestPulse()
103 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_dockedWhenDozeAoD_requestPulse()
104 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE_AOD); in testOnEvent_dockedWhenDozeAoD_requestPulse()
113 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_dockedHideWhenPulsing_requestPulseOut()
114 when(mMachine.getState()).thenReturn(State.DOZE_PULSING); in testOnEvent_dockedHideWhenPulsing_requestPulseOut()
124 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_undockedWhenPulsing_requestPulseOut()
[all …]
DDozeWallpaperStateTest.java64 mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, in testDreamNotification()
65 DozeMachine.State.DOZE_AOD); in testDreamNotification()
67 mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); in testDreamNotification()
72 mDozeWallpaperState.transitionTo(DozeMachine.State.FINISH, DozeMachine.State.DOZE_AOD); in testDreamNotification()
83 mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, in testAnimates_whenSupported()
84 DozeMachine.State.DOZE_AOD); in testAnimates_whenSupported()
88 mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); in testAnimates_whenSupported()
100 mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, in testDoesNotAnimate_whenNotSupported()
101 DozeMachine.State.DOZE_AOD); in testDoesNotAnimate_whenNotSupported()
104 mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); in testDoesNotAnimate_whenNotSupported()
[all …]
DDozeTriggersTest.java91 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck()
93 mTriggers.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnNotification_stillWorksAfterOneFailedProxCheck()
94 mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck()
111 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testTransitionTo_disablesAndEnablesTouchSensors()
113 mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE); in testTransitionTo_disablesAndEnablesTouchSensors()
117 mTriggers.transitionTo(DozeMachine.State.DOZE, in testTransitionTo_disablesAndEnablesTouchSensors()
118 DozeMachine.State.DOZE_REQUEST_PULSE); in testTransitionTo_disablesAndEnablesTouchSensors()
119 mTriggers.transitionTo(DozeMachine.State.DOZE_REQUEST_PULSE, in testTransitionTo_disablesAndEnablesTouchSensors()
120 DozeMachine.State.DOZE_PULSING); in testTransitionTo_disablesAndEnablesTouchSensors()
124 mTriggers.transitionTo(DozeMachine.State.DOZE_PULSING, DozeMachine.State.DOZE_PULSE_DONE); in testTransitionTo_disablesAndEnablesTouchSensors()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeMachine.java52 public enum State { enum in DozeMachine
128 private final ArrayList<State> mQueuedRequests = new ArrayList<>();
129 private State mState = State.UNINITIALIZED;
160 public void requestState(State requestedState) { in requestState()
161 Preconditions.checkArgument(requestedState != State.DOZE_REQUEST_PULSE); in requestState()
171 requestState(State.DOZE_REQUEST_PULSE, pulseReason); in requestPulse()
174 private void requestState(State requestedState, int pulseReason) { in requestState()
201 public State getState() { in getState()
218 Preconditions.checkState(mState == State.DOZE_REQUEST_PULSE in getPulseReason()
219 || mState == State.DOZE_PULSING in getPulseReason()
[all …]
DDozeDockHandler.java26 import com.android.systemui.doze.DozeMachine.State;
58 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
65 mMachine.requestState(State.DOZE); in transitionTo()
83 private void requestPulse(State dozeState) { in requestPulse()
90 private void requestPulseOutNow(State dozeState) { in requestPulseOutNow()
91 if (dozeState == State.DOZE_REQUEST_PULSE || dozeState == State.DOZE_PULSING in requestPulseOutNow()
92 || dozeState == State.DOZE_PULSING_BRIGHT) { in requestPulseOutNow()
116 final DozeMachine.State dozeState = mMachine.getState(); in onEvent()
123 if (dozeState == State.DOZE in onEvent()
125 mMachine.requestState(State.DOZE_AOD); in onEvent()
[all …]
DDozeScreenState.java64 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
67 if (newState == DozeMachine.State.FINISH) { in transitionTo()
83 boolean pulseEnding = oldState == DozeMachine.State.DOZE_PULSE_DONE in transitionTo()
84 && newState == DozeMachine.State.DOZE_AOD; in transitionTo()
85 boolean turningOn = (oldState == DozeMachine.State.DOZE_AOD_PAUSED in transitionTo()
86 || oldState == DozeMachine.State.DOZE) && newState == DozeMachine.State.DOZE_AOD; in transitionTo()
87 boolean justInitialized = oldState == DozeMachine.State.INITIALIZED; in transitionTo()
96 boolean shouldDelayTransition = newState == DozeMachine.State.DOZE_AOD in transitionTo()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/
DNetworkState.java19 import android.net.NetworkInfo.State;
36 private List<State> mStateDepository;
37 private State mTransitionTarget;
42 mStateDepository = new ArrayList<State>(); in NetworkState()
44 mTransitionTarget = State.UNKNOWN; in NetworkState()
47 public NetworkState(State currentState) { in NetworkState()
48 mStateDepository = new ArrayList<State>(); in NetworkState()
51 mTransitionTarget = State.UNKNOWN; in NetworkState()
60 mTransitionTarget = State.UNKNOWN; in resetNetworkState()
69 public void setStateTransitionCriteria(State initState, StateTransitionDirection transitionDir, in setStateTransitionCriteria()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DSimulatedGsmCallState.java33 enum State { enum in CallInfo
41 State(int value) {mValue = value;} in State() method in CallInfo.State
48 State mState;
53 CallInfo (boolean isMT, State state, boolean isMpty, String number) { in CallInfo()
68 return new CallInfo (false, State.DIALING, false, number); in createOutgoingCall()
73 return new CallInfo (true, State.INCOMING, false, number); in createIncomingCall()
112 return mState == State.ACTIVE || mState == State.HOLDING; in isActiveOrHeld()
117 return mState == State.DIALING || mState == State.ALERTING; in isConnecting()
122 return mState == State.INCOMING || mState == State.WAITING; in isRinging()
192 && (call.mState == CallInfo.State.INCOMING in triggerRing()
[all …]
DGsmCdmaCallTrackerTest.java88 assertEquals(PhoneConstants.State.IDLE, mCTUT.getState()); in testMOCallDial()
89 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mForegroundCall.getState()); in testMOCallDial()
90 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mBackgroundCall.getState()); in testMOCallDial()
100 assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); in testMOCallDial()
101 assertEquals(GsmCdmaCall.State.DIALING, mCTUT.mForegroundCall.getState()); in testMOCallDial()
118 assertEquals(GsmCdmaCall.State.ACTIVE, mCTUT.mForegroundCall.getState()); in testMOCallPickUp()
119 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mBackgroundCall.getState()); in testMOCallPickUp()
130 assertEquals(GsmCdmaCall.State.DIALING, mCTUT.mForegroundCall.getState()); in testMOCallHangup()
131 assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); in testMOCallHangup()
141 assertEquals(GsmCdmaCall.State.IDLE, mCTUT.mForegroundCall.getState()); in testMOCallHangup()
[all …]
DGsmCdmaCallTest.java53 assertEquals(Call.State.IDLE, mCallUnderTest.getState()); in testAttachDetach()
56 mDriverCall.state = DriverCall.State.ACTIVE; 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()
81 mDriverCall.state = DriverCall.State.ACTIVE; in testMultiparty()
108 mDriverCall.state = DriverCall.State.ACTIVE; in testConnectionDisconnected()
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()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/transport/
DTransportClient.java103 @State
104 private int mState = State.IDLE;
211 case State.UNUSABLE: in connectAsync()
215 case State.IDLE: in connectAsync()
227 setStateLocked(State.BOUND_AND_CONNECTING, null); in connectAsync()
236 case State.BOUND_AND_CONNECTING: in connectAsync()
243 case State.CONNECTED: in connectAsync()
263 case State.UNUSABLE: in unbind()
264 case State.IDLE: in unbind()
266 case State.BOUND_AND_CONNECTING: in unbind()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
DGSMPhoneTest.java.broken144 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());
181 assertEquals(Call.State.DIALING,
183 assertEquals(Call.State.IDLE, mGSMPhone.getBackgroundCall().getState());
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/
DImsPhoneCallTest.java75 assertEquals(Call.State.IDLE, mImsCallUT.getState()); in testAttachDetach()
78 mImsCallUT.attach(mConnection1, Call.State.ACTIVE); in testAttachDetach()
82 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testAttachDetach()
89 assertEquals(Call.State.IDLE, mImsCallUT.getState()); in testAttachDetach()
96 mImsCallUT.attach(mConnection1, Call.State.ACTIVE); in testConnectionDisconnected()
97 mImsCallUT.attach(mConnection2, Call.State.ACTIVE); in testConnectionDisconnected()
100 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testConnectionDisconnected()
102 doReturn(Call.State.DISCONNECTED).when(mConnection1).getState(); in testConnectionDisconnected()
104 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testConnectionDisconnected()
105 doReturn(Call.State.DISCONNECTED).when(mConnection2).getState(); in testConnectionDisconnected()
[all …]
/frameworks/base/core/java/com/android/internal/transition/
DEpicenterTranslateClipReveal.java150 final State startStateX = new State(startClip.left, startClip.right, startX); in onAppear()
151 final State endStateX = new State(endClip.left, endClip.right, endX); in onAppear()
152 final State startStateY = new State(startClip.top, startClip.bottom, startY); in onAppear()
153 final State endStateY = new State(endClip.top, endClip.bottom, endY); in onAppear()
182 final State startStateX = new State(startClip.left, startClip.right, startX); in onDisappear()
183 final State endStateX = new State(endClip.left, endClip.right, endX); in onDisappear()
184 final State startStateY = new State(startClip.top, startClip.bottom, startY); in onDisappear()
185 final State endStateY = new State(endClip.top, endClip.bottom, endY); in onDisappear()
210 private static Animator createRectAnimator(final View view, State startX, State startY, in createRectAnimator()
211 float startZ, State endX, State endY, float endZ, TransitionValues endValues, in createRectAnimator()
[all …]
/frameworks/native/libs/ui/
DFenceTime.cpp38 State::VALID : State::INVALID), in FenceTime()
40 mSignalTime(mState == State::INVALID ? in FenceTime()
46 State::VALID : State::INVALID), in FenceTime()
48 mSignalTime(mState == State::INVALID ? in FenceTime()
53 : mState(Fence::isValidTimestamp(signalTime) ? State::VALID : State::INVALID), in FenceTime()
63 if (CC_UNLIKELY(src.state != Snapshot::State::SIGNAL_TIME)) { in applyTrustedSnapshot()
71 if (src.state == Snapshot::State::EMPTY) { in applyTrustedSnapshot()
97 return mState != State::INVALID; in isValid()
129 if (CC_UNLIKELY(mState == State::FORCED_VALID_FOR_TEST)) { in getSignalTime()
172 State::FORCED_VALID_FOR_TEST : State::INVALID), in FenceTime()
[all …]
/frameworks/base/core/java/android/os/
DSystemService.java33 private static HashMap<String, State> sStates = Maps.newHashMap();
38 public enum State { enum in SystemService
44 State(String state) { in State() method in SystemService.State
82 public static State getState(String service) { in getState()
84 final State state = sStates.get(rawState); in getState()
88 return State.STOPPED; in getState()
96 return State.STOPPED.equals(getState(service)); in isStopped()
103 return State.RUNNING.equals(getState(service)); in isRunning()
109 public static void waitForState(String service, State state, long timeoutMillis) in waitForState()
114 final State currentState = getState(service); in waitForState()
[all …]
/frameworks/base/core/java/android/net/
DNetworkInfo.java76 public enum State { enum in NetworkInfo
122 private static final EnumMap<DetailedState, State> stateMap =
123 new EnumMap<DetailedState, State>(DetailedState.class);
126 stateMap.put(DetailedState.IDLE, State.DISCONNECTED); in stateMap.put()
127 stateMap.put(DetailedState.SCANNING, State.DISCONNECTED); in stateMap.put()
128 stateMap.put(DetailedState.CONNECTING, State.CONNECTING); in stateMap.put()
129 stateMap.put(DetailedState.AUTHENTICATING, State.CONNECTING); in stateMap.put()
130 stateMap.put(DetailedState.OBTAINING_IPADDR, State.CONNECTING); in stateMap.put()
131 stateMap.put(DetailedState.VERIFYING_POOR_LINK, State.CONNECTING); in stateMap.put()
132 stateMap.put(DetailedState.CAPTIVE_PORTAL_CHECK, State.CONNECTING); in stateMap.put()
[all …]
/frameworks/base/telephony/java/com/android/internal/telephony/
DOperatorInfo.java29 public enum State { enum in OperatorInfo
46 private State mState = State.UNKNOWN;
69 public State
82 State state) { in OperatorInfo()
94 State state, in OperatorInfo()
121 this(operatorAlphaLong, operatorAlphaShort, operatorNumeric, State.UNKNOWN); in OperatorInfo()
128 private static State rilStateToState(String s) { in rilStateToState()
130 return State.UNKNOWN; in rilStateToState()
132 return State.AVAILABLE; in rilStateToState()
134 return State.CURRENT; in rilStateToState()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/sip/
DSipPhone.java132 if (sipAudioCall.getState() != SipSession.State.INCOMING_CALL) { in takeIncomingCall()
155 if ((mRingingCall.getState() == Call.State.INCOMING) || in acceptCall()
156 (mRingingCall.getState() == Call.State.WAITING)) { in acceptCall()
208 if (mForegroundCall.getState() == SipCall.State.ACTIVE) { in dialInternal()
211 if (mForegroundCall.getState() != SipCall.State.IDLE) { in dialInternal()
252 if ((mForegroundCall.getState() != SipCall.State.ACTIVE) in conference()
253 || (mForegroundCall.getState() != SipCall.State.ACTIVE)) { in conference()
416 private static Call.State getCallStateFrom(SipAudioCall sipAudioCall) { in getCallStateFrom()
417 if (sipAudioCall.isOnHold()) return Call.State.HOLDING; in getCallStateFrom()
420 case SipSession.State.READY_TO_CALL: return Call.State.IDLE; in getCallStateFrom()
[all …]
/frameworks/base/services/core/java/com/android/server/storage/
DDeviceStorageMonitorService.java93 private volatile int mForceLevel = State.LEVEL_UNKNOWN;
96 private final ArrayMap<UUID, State> mStates = new ArrayMap<>();
102 private static class State { class in DeviceStorageMonitorService
137 case State.LEVEL_UNKNOWN: return "UNKNOWN"; in levelToString()
138 case State.LEVEL_NORMAL: return "NORMAL"; in levelToString()
139 case State.LEVEL_LOW: return "LOW"; in levelToString()
140 case State.LEVEL_FULL: return "FULL"; in levelToString()
158 private State findOrCreateState(UUID uuid) { in findOrCreateState()
159 State state = mStates.get(uuid); in findOrCreateState()
161 state = new State(); in findOrCreateState()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DCall.java39 public enum State { enum in Call
73 public static State
74 stateFromDCState (DriverCall.State dcState) { in stateFromDCState()
76 case ACTIVE: return State.ACTIVE; in stateFromDCState()
77 case HOLDING: return State.HOLDING; in stateFromDCState()
78 case DIALING: return State.DIALING; in stateFromDCState()
79 case ALERTING: return State.ALERTING; in stateFromDCState()
80 case INCOMING: return State.INCOMING; in stateFromDCState()
81 case WAITING: return State.WAITING; in stateFromDCState()
93 public State mState = State.IDLE;
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java21 import android.net.NetworkInfo.State;
58 State.CONNECTED, LONG_TIMEOUT)) { in setUp()
89 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in test3GToWifiNotification()
124 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifi()
148 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP()
160 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP()
172 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testConnectToWifWithKnownAP()
196 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT)); in testDisconnectWifi()
207 State.CONNECTED, LONG_TIMEOUT)); in testDisconnectWifi()
226 ConnectivityManager.TYPE_MOBILE, State.CONNECTED, LONG_TIMEOUT)); in testDataConnectionWith3GToAmTo3G()
[all …]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DFilter.java34 private static class State { class in Filter
56 private State mState = new State();
274 return mState.check(State.STATE_OPEN); in isOpen()
395 return (mIsActive && !mState.check(State.STATE_CLOSED)); in inSchedulableState()
443 if (mState.current == State.STATE_OPEN) { in performPreparation()
592 if (mState.current == State.STATE_UNPREPARED) { in execute()
594 mState.current = State.STATE_PREPARED; in execute()
596 if (mState.current == State.STATE_PREPARED) { in execute()
599 mState.current = State.STATE_OPEN; in execute()
601 if (mState.current == State.STATE_OPEN) { in execute()
[all …]
/frameworks/base/core/java/com/android/internal/globalactions/
DToggleAction.java34 public enum State { enum in ToggleAction
42 State(boolean intermediate) { in State() method in ToggleAction.State
51 protected State mState = State.Off;
106 boolean on = ((mState == State.On) || (mState == State.TurningOn)); in create()
130 final boolean nowOn = !(mState == State.On); in onPress()
147 mState = buttonOn ? State.On : State.Off; in changeStateFromPress()
152 public void updateState(State state) { in updateState()
/frameworks/base/libs/androidfw/tests/
DAssetManager2_bench.cpp38 static void BM_AssetManagerLoadAssets(benchmark::State& state) { in BM_AssetManagerLoadAssets()
48 static void BM_AssetManagerLoadAssetsOld(benchmark::State& state) { in BM_AssetManagerLoadAssetsOld()
61 static void BM_AssetManagerLoadFrameworkAssets(benchmark::State& state) { in BM_AssetManagerLoadFrameworkAssets()
71 static void BM_AssetManagerLoadFrameworkAssetsOld(benchmark::State& state) { in BM_AssetManagerLoadFrameworkAssetsOld()
84 static void BM_AssetManagerGetResource(benchmark::State& state, uint32_t resid) { in BM_AssetManagerGetResource()
90 static void BM_AssetManagerGetResourceOld(benchmark::State& state, uint32_t resid) { in BM_AssetManagerGetResourceOld()
97 static void BM_AssetManagerGetLibraryResource(benchmark::State& state) { in BM_AssetManagerGetLibraryResource()
105 static void BM_AssetManagerGetLibraryResourceOld(benchmark::State& state) { in BM_AssetManagerGetLibraryResourceOld()
115 static void BM_AssetManagerGetResourceFrameworkLocale(benchmark::State& state) { in BM_AssetManagerGetResourceFrameworkLocale()
123 static void BM_AssetManagerGetResourceFrameworkLocaleOld(benchmark::State& state) { in BM_AssetManagerGetResourceFrameworkLocaleOld()
[all …]

12345678910>>...15