/frameworks/base/startop/iorap/src/com/google/android/startop/iorap/ |
D | EventSequenceValidator.java | 101 private State state = State.INIT; 106 if (state == State.UNKNOWN) { in onIntentStarted() 112 if (state != State.INIT && in onIntentStarted() 113 state != State.INTENT_FAILED && in onIntentStarted() 114 state != State.ACTIVITY_CANCELLED && in onIntentStarted() 115 state != State.ACTIVITY_FINISHED && in onIntentStarted() 116 state != State.REPORT_FULLY_DRAWN) { in onIntentStarted() 118 String.format("Cannot transition from %s to %s", state, State.INTENT_STARTED)); in onIntentStarted() 124 Log.d(TAG, String.format("Transition from %s to %s", state, State.INTENT_STARTED)); in onIntentStarted() 125 state = State.INTENT_STARTED; in onIntentStarted() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
D | DozeMachine.java | 57 public enum State { enum in DozeMachine 143 private final ArrayList<State> mQueuedRequests = new ArrayList<>(); 144 private State mState = State.UNINITIALIZED; 188 public void requestState(State requestedState) { in requestState() 189 Preconditions.checkArgument(requestedState != State.DOZE_REQUEST_PULSE); in requestState() 199 requestState(State.DOZE_REQUEST_PULSE, pulseReason); in requestPulse() 208 private void requestState(State requestedState, int pulseReason) { in requestState() 235 public State getState() { in getState() 252 Preconditions.checkState(mState == State.DOZE_REQUEST_PULSE in getPulseReason() 253 || mState == State.DOZE_PULSING in getPulseReason() [all …]
|
D | DozeDockHandler.java | 24 import com.android.systemui.doze.DozeMachine.State; 52 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo() 89 DozeMachine.State nextState; in onEvent() 92 nextState = State.DOZE_AOD_DOCKED; in onEvent() 95 nextState = mConfig.alwaysOnEnabled(UserHandle.USER_CURRENT) ? State.DOZE_AOD in onEvent() 96 : State.DOZE; in onEvent() 99 nextState = State.DOZE; in onEvent() 108 DozeMachine.State state = mMachine.getState(); in isPulsing() 109 return state == State.DOZE_REQUEST_PULSE || state == State.DOZE_PULSING in isPulsing() 110 || state == State.DOZE_PULSING_BRIGHT; in isPulsing()
|
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/ |
D | NetworkState.java | 19 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/base/packages/SystemUI/tests/src/com/android/systemui/doze/ |
D | DozeWallpaperStateTest.java | 64 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 …]
|
D | DozeDockHandlerTest.java | 38 import com.android.systemui.doze.DozeMachine.State; 62 when(mMachine.getState()).thenReturn(State.DOZE_AOD); in setUp() 64 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in setUp() 74 mDockHandler.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.FINISH); in transitionToFinish_unregistersDockEventListener() 83 verify(mMachine).requestState(eq(State.DOZE_AOD_DOCKED)); in onEvent_docked_requestsDockedAodState() 90 verify(mMachine, never()).requestState(eq(State.DOZE_AOD)); in onEvent_noneWhileEnabledAod_ignoresIfAlreadyNone() 99 verify(mMachine).requestState(eq(State.DOZE_AOD)); in onEvent_noneWhileEnabledAod_requestsAodState() 110 verify(mMachine).requestState(eq(State.DOZE)); in onEvent_noneWhileDisabledAod_requestsDozeState() 117 verify(mMachine).requestState(eq(State.DOZE)); in onEvent_hide_requestsDozeState() 122 when(mMachine.getState()).thenReturn(State.DOZE_PULSING); in onEvent_dockedWhilePulsing_wontRequestStateChange() [all …]
|
D | DozeTriggersTest.java | 109 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck() 113 mTriggers.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnNotification_stillWorksAfterOneFailedProxCheck() 114 mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck() 134 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testTransitionTo_disablesAndEnablesTouchSensors() 136 mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE); in testTransitionTo_disablesAndEnablesTouchSensors() 142 mTriggers.transitionTo(DozeMachine.State.DOZE, in testTransitionTo_disablesAndEnablesTouchSensors() 143 DozeMachine.State.DOZE_REQUEST_PULSE); in testTransitionTo_disablesAndEnablesTouchSensors() 144 mTriggers.transitionTo(DozeMachine.State.DOZE_REQUEST_PULSE, in testTransitionTo_disablesAndEnablesTouchSensors() 145 DozeMachine.State.DOZE_PULSING); in testTransitionTo_disablesAndEnablesTouchSensors() 151 mTriggers.transitionTo(DozeMachine.State.DOZE_PULSING, DozeMachine.State.DOZE_PULSE_DONE); in testTransitionTo_disablesAndEnablesTouchSensors() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | SimulatedGsmCallState.java | 33 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 …]
|
D | GsmCdmaCallTrackerTest.java | 88 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 …]
|
D | GsmCdmaCallTest.java | 53 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/backuplib/java/com/android/server/backup/transport/ |
D | TransportClient.java | 104 @State 105 private int mState = State.IDLE; 212 case State.UNUSABLE: in connectAsync() 216 case State.IDLE: in connectAsync() 228 setStateLocked(State.BOUND_AND_CONNECTING, null); in connectAsync() 237 case State.BOUND_AND_CONNECTING: in connectAsync() 244 case State.CONNECTED: in connectAsync() 264 case State.UNUSABLE: in unbind() 265 case State.IDLE: in unbind() 267 case State.BOUND_AND_CONNECTING: in unbind() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/ |
D | GSMPhoneTest.java.broken | 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()); 181 assertEquals(Call.State.DIALING, 183 assertEquals(Call.State.IDLE, mGSMPhone.getBackgroundCall().getState()); [all …]
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | AbstractLocationProvider.java | 57 void onStateChanged(State oldState, State newState); in onStateChanged() 75 public static final class State { class in AbstractLocationProvider 81 public static final State EMPTY_STATE = new State(false, null, 99 private State(boolean allowed, ProviderProperties properties, in State() method in AbstractLocationProvider.State 106 private State withAllowed(boolean allowed) { in withAllowed() 110 return new State(allowed, properties, providerPackageNames); in withAllowed() 114 private State withProperties(ProviderProperties properties) { in withProperties() 118 return new State(allowed, properties, providerPackageNames); in withProperties() 122 private State withProviderPackageNames(Set<String> providerPackageNames) { in withProviderPackageNames() 126 return new State(allowed, properties, in withProviderPackageNames() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/ |
D | ImsPhoneCallTest.java | 77 assertEquals(Call.State.IDLE, mImsCallUT.getState()); in testAttachDetach() 80 mImsCallUT.attach(mConnection1, Call.State.ACTIVE); in testAttachDetach() 84 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testAttachDetach() 91 assertEquals(Call.State.IDLE, mImsCallUT.getState()); in testAttachDetach() 98 mImsCallUT.attach(mConnection1, Call.State.ACTIVE); in testConnectionDisconnected() 99 mImsCallUT.attach(mConnection2, Call.State.ACTIVE); in testConnectionDisconnected() 102 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testConnectionDisconnected() 104 doReturn(Call.State.DISCONNECTED).when(mConnection1).getState(); in testConnectionDisconnected() 106 assertEquals(Call.State.ACTIVE, mImsCallUT.getState()); in testConnectionDisconnected() 107 doReturn(Call.State.DISCONNECTED).when(mConnection2).getState(); in testConnectionDisconnected() [all …]
|
/frameworks/base/core/java/com/android/internal/transition/ |
D | EpicenterTranslateClipReveal.java | 150 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/ |
D | FenceTime.cpp | 38 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/net/ |
D | NetworkInfo.java | 75 public enum State { enum in NetworkInfo 121 private static final EnumMap<DetailedState, State> stateMap = 122 new EnumMap<DetailedState, State>(DetailedState.class); 125 stateMap.put(DetailedState.IDLE, State.DISCONNECTED); in stateMap.put() 126 stateMap.put(DetailedState.SCANNING, State.DISCONNECTED); in stateMap.put() 127 stateMap.put(DetailedState.CONNECTING, State.CONNECTING); in stateMap.put() 128 stateMap.put(DetailedState.AUTHENTICATING, State.CONNECTING); in stateMap.put() 129 stateMap.put(DetailedState.OBTAINING_IPADDR, State.CONNECTING); in stateMap.put() 130 stateMap.put(DetailedState.VERIFYING_POOR_LINK, State.CONNECTING); in stateMap.put() 131 stateMap.put(DetailedState.CAPTIVE_PORTAL_CHECK, State.CONNECTING); in stateMap.put() [all …]
|
/frameworks/base/core/java/android/os/ |
D | SystemService.java | 33 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/proto/android/service/ |
D | notification.proto | 55 enum State { enum 60 optional State state = 2; 166 enum State { enum 174 optional State state = 6 [ (android.privacy).dest = DEST_AUTOMATIC ]; 228 enum State { enum 235 optional State reminders = 1; 236 optional State events = 2; 237 optional State messages = 3; 238 optional State calls = 4; 239 optional State repeat_callers = 5; [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/ |
D | OperatorInfo.java | 29 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/ |
D | SipPhone.java | 132 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/ |
D | DeviceStorageMonitorService.java | 96 private volatile int mForceLevel = State.LEVEL_UNKNOWN; 99 private final ArrayMap<UUID, State> mStates = new ArrayMap<>(); 105 private static class State { class in DeviceStorageMonitorService 140 case State.LEVEL_UNKNOWN: return "UNKNOWN"; in levelToString() 141 case State.LEVEL_NORMAL: return "NORMAL"; in levelToString() 142 case State.LEVEL_LOW: return "LOW"; in levelToString() 143 case State.LEVEL_FULL: return "FULL"; in levelToString() 161 private State findOrCreateState(UUID uuid) { in findOrCreateState() 162 State state = mStates.get(uuid); in findOrCreateState() 164 state = new State(); in findOrCreateState() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | Call.java | 39 public enum State { enum in Call 65 public static State 66 stateFromDCState (DriverCall.State dcState) { in stateFromDCState() 68 case ACTIVE: return State.ACTIVE; in stateFromDCState() 69 case HOLDING: return State.HOLDING; in stateFromDCState() 70 case DIALING: return State.DIALING; in stateFromDCState() 71 case ALERTING: return State.ALERTING; in stateFromDCState() 72 case INCOMING: return State.INCOMING; in stateFromDCState() 73 case WAITING: return State.WAITING; in stateFromDCState() 85 public State mState = State.IDLE; [all …]
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
D | ConnectivityManagerMobileTest.java | 21 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/ |
D | Filter.java | 34 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 …]
|