Home
last modified time | relevance | path

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

12345678910>>...20

/packages/apps/DeskClock/src/com/android/deskclock/data/
DTimer.kt36 val state: State, in <lambda>()
53 enum class State( in <lambda>() class in com.android.deskclock.data.Timer
63 fun fromValue(value: Int): State? { in <lambda>()
75 get() = state == State.RESET in <lambda>()
78 get() = state == State.RUNNING in <lambda>()
81 get() = state == State.PAUSED in <lambda>()
84 get() = state == State.EXPIRED in <lambda>()
87 get() = state == State.MISSED in <lambda>()
95 if (state == State.PAUSED || state == State.RESET) { in <lambda>()
111 check(!(state != State.RUNNING && state != State.EXPIRED && state != State.MISSED)) { in <lambda>()
[all …]
DStopwatch.kt28 val state: State,
37 enum class State { class in com.android.deskclock.data.Stopwatch
42 get() = state == State.RESET
45 get() = state == State.PAUSED
48 get() = state == State.RUNNING
55 if (state != State.RUNNING) {
71 return if (state == State.RUNNING) { in start()
74 Stopwatch(State.RUNNING, Utils.now(), Utils.wallClock(), totalTime) in start()
82 return if (state != State.RUNNING) { in pause()
85 Stopwatch(State.PAUSED, UNUSED, UNUSED, totalTime) in pause()
[all …]
/packages/apps/DeskClock/tests/src/com/android/deskclock/timer/
DTimerFragmentTest.java185 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsTimer()
187 assertStateEquals(Timer.State.RUNNING, 0); in timeClick_startsTimer()
197 assertStateEquals(Timer.State.RESET, 1); in timeClick_startsSecondTimer()
198 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsSecondTimer()
200 assertStateEquals(Timer.State.RUNNING, 1); in timeClick_startsSecondTimer()
201 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsSecondTimer()
211 assertStateEquals(Timer.State.RESET, 0); in timeClick_pausesTimer()
213 assertStateEquals(Timer.State.RUNNING, 0); in timeClick_pausesTimer()
215 assertStateEquals(Timer.State.PAUSED, 0); in timeClick_pausesTimer()
225 assertStateEquals(Timer.State.RESET, 1); in timeClick_pausesSecondTimer()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DNetworkInfo_StateTest.java19 import android.net.NetworkInfo.State;
25 assertEquals(State.CONNECTED, State.valueOf("CONNECTED")); in testValueOf()
26 assertEquals(State.CONNECTING, State.valueOf("CONNECTING")); in testValueOf()
27 assertEquals(State.DISCONNECTED, State.valueOf("DISCONNECTED")); in testValueOf()
28 assertEquals(State.DISCONNECTING, State.valueOf("DISCONNECTING")); in testValueOf()
29 assertEquals(State.SUSPENDED, State.valueOf("SUSPENDED")); in testValueOf()
30 assertEquals(State.UNKNOWN, State.valueOf("UNKNOWN")); in testValueOf()
34 State[] expected = State.values(); in testValues()
36 assertEquals(State.CONNECTING, expected[0]); in testValues()
37 assertEquals(State.CONNECTED, expected[1]); in testValues()
[all …]
/packages/services/BuiltInPrintService/src/com/android/bips/
DP2pPermissionManager.java69 if (getState() == State.TEMPORARILY_DISABLED) { in reset()
70 setState(State.DENIED); in reset()
77 public void setState(State state) { in setState()
86 return getState() == State.ALLOWED; in isP2pEnabled()
95 setState(State.ALLOWED); in applyPermissionChange()
96 } else if (getState() != State.DISABLED) { in applyPermissionChange()
98 setState(State.DISABLED); in applyPermissionChange()
101 setState(State.TEMPORARILY_DISABLED); in applyPermissionChange()
127 State state = getState(); in request()
132 listener.onP2pPermissionComplete(state == State.ALLOWED); in request()
[all …]
/packages/apps/Car/Messenger/src/com/android/car/messenger/core/ui/shared/
DLoadingFrameLayout.java43 @IntDef({State.NEW, State.LOADING, State.CONTENT, State.ERROR, State.EMPTY})
44 public @interface State { annotation in LoadingFrameLayout
57 @State private int mState = State.NEW;
86 mLoadingView = new ViewContainer(State.LOADING, loadingLayoutId); in setLoadingView()
90 mEmptyView = new ViewContainer(State.EMPTY); in setEmptyView()
94 mErrorView = new ViewContainer(State.ERROR); in setErrorView()
100 switchTo(State.LOADING); in showLoading()
140 switchTo(State.ERROR); in showError()
192 switchTo(State.EMPTY); in showEmpty()
197 switchTo(State.CONTENT); in showContent()
[all …]
/packages/apps/Settings/src/com/android/settings/
DSidecarFragment.java137 @IntDef({State.INIT, State.RUNNING, State.SUCCESS, State.ERROR})
138 public @interface State { annotation in SidecarFragment
174 @State private int mState;
197 setState(State.INIT, Substate.UNUSED); in onCreate()
238 @State
257 setState(State.INIT, Substate.UNUSED); in reset()
268 protected void setState(@State int state, @Substate int substate) { in setState()
294 case SidecarFragment.State.INIT: in printState()
297 case SidecarFragment.State.RUNNING: in printState()
300 case SidecarFragment.State.SUCCESS: in printState()
[all …]
/packages/modules/Connectivity/framework/src/android/net/
DNetworkInfo.java75 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 …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/
DAdvancedWifiOptionsFlow.java27 import com.android.tv.settings.connectivity.util.State;
71 State entranceState, in createFlow()
72 State exitState, in createFlow()
82 State advancedOptionsState = new AdvancedOptionsState(activity); in createFlow()
83 State proxySettingsState = new ProxySettingsState(activity); in createFlow()
84 State ipSettingsState = new IpSettingsState(activity); in createFlow()
85 State proxyHostNameState = new ProxyHostNameState(activity); in createFlow()
86 State proxyPortState = new ProxyPortState(activity); in createFlow()
87 State proxyBypassState = new ProxyBypassState(activity); in createFlow()
88 State proxySettingsInvalidState = new ProxySettingsInvalidState(activity); in createFlow()
[all …]
/packages/apps/Car/Dialer/src/com/android/car/dialer/widget/
DLoadingFrameLayout.java50 @IntDef({State.NEW, State.LOADING, State.CONTENT, State.ERROR, State.EMPTY})
51 public @interface State { annotation in LoadingFrameLayout
65 @State
66 private int mState = State.NEW;
100 mLoadingView = new ViewContainer(State.LOADING, loadingLayoutId, 0, 0, 0, 0); in setLoadingView()
104 mEmptyView = new ViewContainer(State.EMPTY, emptyLayoutId, R.id.loading_info_icon, in setEmptyView()
110 mErrorView = new ViewContainer(State.ERROR, errorLayoutId, R.id.loading_info_icon, in setErrorView()
120 switchTo(State.LOADING); in showLoading()
165 switchTo(State.ERROR); in showError()
210 switchTo(State.EMPTY); in showEmpty()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/util/
DStateMachine.java38 private Map<State, List<Transition>> mTransitionMap = new HashMap<>();
39 private LinkedList<State> mStatesList = new LinkedList<>();
40 private State.StateCompleteListener mCompletionListener = this::updateState;
126 public void addState(State state, @Event int event, State destination) { in addState()
137 public void addTerminalState(State state) { in addTerminalState()
158 public void setStartState(State startState) { in setStartState()
169 State currentState = getCurrentState(); in start()
194 public State getCurrentState() { in getCurrentState()
227 State prev = mStatesList.getLast(); in updateState()
233 State next = null; in updateState()
[all …]
/packages/services/Telephony/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/
DSimpleRcsClient.java41 private final AtomicReference<State> state = new AtomicReference<>(State.NEW);
73 private boolean enterState(State expected, State newState) { in enterState()
88 if (!enterState(State.NEW, State.PROVISIONING)) { in provision()
102 if (!enterState(State.PROVISIONING, State.REGISTERING)) { in register()
128 if (state.get().equals(State.REGISTERING) || state.get().equals(State.NOT_REGISTERED)) { in registered()
129 enterState(state.get(), State.REGISTERED); in registered()
140 enterState(State.REGISTERED, State.NOT_REGISTERED); in notRegistered()
146 public enum State { enum in SimpleRcsClient
/packages/apps/Settings/src/com/android/settings/accessibility/
DVideoPlayer.java48 State mMediaPlayerState = State.NONE;
75 if (mMediaPlayerState == State.STARTED) { in pause()
76 mMediaPlayerState = State.PAUSED; in pause()
84 if (mMediaPlayerState == State.PAUSED) { in resume()
86 mMediaPlayerState = State.STARTED; in resume()
94 if (mMediaPlayerState != State.NONE && mMediaPlayerState != State.END) { in release()
95 mMediaPlayerState = State.END; in release()
111 mMediaPlayerState = State.PREPARED; in onSurfaceTextureAvailable()
115 mMediaPlayerState = State.STARTED; in onSurfaceTextureAvailable()
137 public enum State { enum in VideoPlayer
/packages/modules/Wifi/service/java/com/android/server/wifi/
DSupplicantStaIfaceCallbackImpl.java61 private int mStateBeforeDisconnect = State.INACTIVE;
79 case ISupplicantStaIfaceCallback.State.DISCONNECTED: in supplicantHidlStateToFrameworkState()
81 case ISupplicantStaIfaceCallback.State.IFACE_DISABLED: in supplicantHidlStateToFrameworkState()
83 case ISupplicantStaIfaceCallback.State.INACTIVE: in supplicantHidlStateToFrameworkState()
85 case ISupplicantStaIfaceCallback.State.SCANNING: in supplicantHidlStateToFrameworkState()
87 case ISupplicantStaIfaceCallback.State.AUTHENTICATING: in supplicantHidlStateToFrameworkState()
89 case ISupplicantStaIfaceCallback.State.ASSOCIATING: in supplicantHidlStateToFrameworkState()
91 case ISupplicantStaIfaceCallback.State.ASSOCIATED: in supplicantHidlStateToFrameworkState()
93 case ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE: in supplicantHidlStateToFrameworkState()
95 case ISupplicantStaIfaceCallback.State.GROUP_HANDSHAKE: in supplicantHidlStateToFrameworkState()
[all …]
DSupplicantStateTracker.java34 import com.android.internal.util.State;
74 private final State mUninitializedState = new UninitializedState();
75 private final State mDefaultState = new DefaultState();
76 private final State mInactiveState = new InactiveState();
77 private final State mDisconnectState = new DisconnectedState();
78 private final State mScanState = new ScanState();
79 private final State mHandshakeState = new HandshakeState();
80 private final State mCompletedState = new CompletedState();
81 private final State mDormantState = new DormantState();
286 class DefaultState extends State {
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/
DStateTest.java40 private State mState;
45 mState = new State(); in setUp()
66 mState.action = State.ACTION_BROWSE; in testShouldShowPreview_actionBrowse()
73 mState.action = State.ACTION_OPEN; in testShouldShowPreview_actionOpen()
80 mState.action = State.ACTION_GET_CONTENT; in testShouldShowPreview_actionGetContent()
87 mState.action = State.ACTION_OPEN_TREE; in testShouldShowPreview_actionOpenTree()
98 mState.action = State.ACTION_GET_CONTENT; in testPhotoPicking_onlyOneImageType()
107 mState.action = State.ACTION_GET_CONTENT; in testPhotoPicking_allImageTypes()
117 mState.action = State.ACTION_GET_CONTENT; in testPhotoPicking_noImageType()
127 mState.action = State.ACTION_GET_CONTENT; in testPhotoPicking_oneIsNotImageType()
[all …]
/packages/apps/Camera2/src/com/android/camera/captureintent/state/
DStateReviewingPicture.java35 import com.android.camera.captureintent.stateful.State;
72 State previousState, in StateReviewingPicture()
90 public Optional<State> processEvent(EventPause event) { in registerEventHandlers()
91 return Optional.of((State) StateBackgroundWithSurfaceTexture.from( in registerEventHandlers()
103 public Optional<State> processEvent(EventOnTextureViewLayoutChanged event) { in registerEventHandlers()
115 public Optional<State> processEvent(EventTapOnCancelIntentButton event) { in registerEventHandlers()
116 return Optional.of((State) StateIntentCompleted.from( in registerEventHandlers()
127 public Optional<State> processEvent(EventTapOnConfirmPhotoButton event) { in registerEventHandlers()
135 return Optional.of((State) StateSavingPicture.from( in registerEventHandlers()
147 public Optional<State> processEvent(EventTapOnRetakePhotoButton event) { in registerEventHandlers()
[all …]
DStateStartingPreview.java30 import com.android.camera.captureintent.stateful.State;
56 State previousState, in from()
78 State previousState, in StateStartingPreview()
101 public Optional<State> processEvent(EventPause event) { in registerEventHandlers()
102 return Optional.of((State) StateBackgroundWithSurfaceTexture.from( in registerEventHandlers()
114 public Optional<State> processEvent(EventOnTextureViewLayoutChanged event) { in registerEventHandlers()
125 public Optional<State> processEvent(EventOnStartPreviewSucceeded event) { in registerEventHandlers()
132 return Optional.of((State) StateReadyForCapture.from( in registerEventHandlers()
145 public Optional<State> processEvent(EventOnStartPreviewFailed event) { in registerEventHandlers()
147 return Optional.of((State) StateFatal.from( in registerEventHandlers()
[all …]
DStateReadyForCapture.java53 import com.android.camera.captureintent.stateful.State;
107 State previousState, in StateReadyForCapture()
122 State previousState, in StateReadyForCapture()
213 public Optional<State> processEvent(EventPause event) { in registerEventHandlers()
214 return Optional.of((State) StateBackgroundWithSurfaceTexture.from( in registerEventHandlers()
226 public Optional<State> processEvent(EventOnSurfaceTextureUpdated event) { in registerEventHandlers()
249 public Optional<State> processEvent(EventOnTextureViewLayoutChanged event) { in registerEventHandlers()
270 public Optional<State> processEvent(final EventTapOnShutterButton event) { in registerEventHandlers()
281 public Optional<State> processEvent(EventClickOnCameraKey event) { in registerEventHandlers()
296 public Optional<State> processEvent(EventTimerCountDownToZero event) { in registerEventHandlers()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DBluetoothScanningDevicesGroupPreferenceControllerTest.java124 mControllerHelper.markState(Lifecycle.State.STARTED); in disallowConfigBluetooth_doesNotStartScanning()
133 mControllerHelper.markState(Lifecycle.State.STARTED); in onScanningStateChanged_scanningEnabled_receiveStopped_restartsScanning()
144 mControllerHelper.markState(Lifecycle.State.STARTED); in onScanningStateChanged_scanningDisabled_receiveStopped_doesNothing()
157 mControllerHelper.markState(Lifecycle.State.STARTED); in onDeviceBondStateChanged_refreshesUi()
170 mControllerHelper.markState(Lifecycle.State.STARTED); in onDeviceClicked_callsInternal()
182 mControllerHelper.markState(Lifecycle.State.STARTED); in onDeviceClicked_cancelsScanning()
194 mControllerHelper.markState(Lifecycle.State.STARTED); in refreshUi_noDeviceBonding_startsScanning()
203 mControllerHelper.markState(Lifecycle.State.STARTED); in refreshUi_noDeviceBonding_enablesGroup()
212 mControllerHelper.markState(Lifecycle.State.STARTED); in refreshUi_noDeviceBonding_setsScanModeConnectableDiscoverable()
222 mControllerHelper.markState(Lifecycle.State.STARTED); in refreshUi_deviceBonding_stopsScanning()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/roots/
DProvidersAccess.java28 import com.android.documentsui.base.State;
50 Collection<RootInfo> getMatchingRootsBlocking(State state); in getMatchingRootsBlocking()
54 RootInfo getDefaultRootBlocking(State state); in getDefaultRootBlocking()
68 public static List<RootInfo> getMatchingRoots(Collection<RootInfo> roots, State state) { in getMatchingRoots()
77 if (state.action == State.ACTION_CREATE && !root.supportsCreate()) { in getMatchingRoots()
82 if (state.action == State.ACTION_PICK_COPY_DESTINATION in getMatchingRoots()
89 if (state.action == State.ACTION_OPEN_TREE && !root.supportsChildren()) { in getMatchingRoots()
95 if (state.action == State.ACTION_OPEN_TREE && root.isRecents()) { in getMatchingRoots()
106 if (state.action == State.ACTION_OPEN && root.isEmpty()) { in getMatchingRoots()
111 if (state.action == State.ACTION_GET_CONTENT && root.isEmpty()) { in getMatchingRoots()
[all …]
/packages/apps/Nfc/nci/jni/extns/pn54x/src/mifare/
DphFriNfc_MifStdFormat.cpp167 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_AUTH_SECT; in phFriNfc_MfStd_Format()
210 switch (NdefSmtCrdFmt->State) { in phFriNfc_MfStd_Process()
253 switch (NdefSmtCrdFmt->State) { in phFriNfc_MfStd_Process()
325 switch (NdefSmtCrdFmt->State) { in phFriNfc_MfStd_H_FillSendBuf()
516 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_DIS_CON; in phFriNfc_MfStd_H_CallDisCon()
536 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_CON; in phFriNfc_MfStd_H_CallCon()
564 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_AUTH_SECT; in phFriNfc_MfStd_H_ProCon()
598 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_WR_MAD_BLK; in phFriNfc_MfStd_H_ProAuth()
607 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_WR_MAD_BLK; in phFriNfc_MfStd_H_ProAuth()
613 NdefSmtCrdFmt->State = PH_FRINFC_MFSTD_FMT_WR_SECT_TR; in phFriNfc_MfStd_H_ProAuth()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryDatabaseManagerTest.java94 AnomalyDatabaseHelper.State.NEW, NOW); in allAnomalyFunctions()
96 AnomalyDatabaseHelper.State.NEW, TWO_DAYS_BEFORE); in allAnomalyFunctions()
100 AnomalyDatabaseHelper.State.NEW); in allAnomalyFunctions()
105 AnomalyDatabaseHelper.State.NEW); in allAnomalyFunctions()
112 AnomalyDatabaseHelper.State.NEW); in allAnomalyFunctions()
119 AnomalyDatabaseHelper.State.NEW, NOW); in updateAnomalies_updateSuccessfully()
121 AnomalyDatabaseHelper.State.NEW, NOW); in updateAnomalies_updateSuccessfully()
128 AnomalyDatabaseHelper.State.HANDLED); in updateAnomalies_updateSuccessfully()
132 AnomalyDatabaseHelper.State.NEW); in updateAnomalies_updateSuccessfully()
137 AnomalyDatabaseHelper.State.HANDLED); in updateAnomalies_updateSuccessfully()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DCommonControllerOverlay.java45 protected enum State { enum in CommonControllerOverlay
65 protected State mState;
76 mState = State.LOADING; in CommonControllerOverlay()
152 mState = State.PLAYING; in showPlaying()
158 mState = State.PAUSED; in showPaused()
164 mState = State.ENDED; in showEnded()
170 mState = State.LOADING; in showLoading()
176 mState = State.ERROR; in showErrorMessage()
220 if (mState == State.ENDED) { in onClick()
224 } else if (mState == State.PAUSED || mState == State.PLAYING) { in onClick()
[all …]
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DNat464Xlat.java67 private static final NetworkInfo.State[] NETWORK_STATES = {
68 NetworkInfo.State.CONNECTED,
69 NetworkInfo.State.SUSPENDED,
78 private enum State { enum in Nat464Xlat
98 private State mState = State.IDLE;
158 return (mState == State.STARTING || mState == State.RUNNING); in isStarted()
165 return mState == State.STARTING; in isStarting()
172 return mState == State.RUNNING; in isRunning()
189 mState = State.STARTING; in enterStartingState()
208 mState = State.RUNNING; in enterRunningState()
[all …]

12345678910>>...20