Lines Matching refs:mode

29  * Represents the view mode for the tablet Gmail activity.
31 * dependent on the mode should listen to changes on this object.
35 * A listener for changes on a ViewMode. To listen to mode changes, implement this
37 * instance. On mode changes, the onViewModeChanged method will be called with the new mode.
41 * Called when the mode has changed.
71 * Uncertain mode. The mode has not been initialized.
76 private static final String VIEW_MODE_KEY = "view-mode";
79 * The actual mode the activity is in. We start out with an UNKNOWN mode, and require entering
80 * a valid mode after the object has been created.
86 // friendly names (not user-facing) for each view mode, indexed by ordinal value.
104 return "[mode=" + MODE_NAMES[mMode] + "]";
112 * Adds a listener from this view mode.
120 * Dispatches a change event for the mode.
132 * Requests a transition of the mode to show the conversation list as the prominent view.
140 * Requests a transition of the mode to show a conversation as the prominent view.
148 * Requests a transition of the mode to show a list of search results as the
157 * Requests a transition of the mode to show a conversation that was part of
166 * Requests a transition of the mode to show the "waiting for sync" messages
174 * Requests a transition of the mode to show an ad.
181 * @return The current mode.
188 * Return whether the current mode is considered a list mode.
194 public static boolean isListMode(final int mode) {
195 return mode == CONVERSATION_LIST || mode == SEARCH_RESULTS_LIST;
202 public static boolean isConversationMode(final int mode) {
203 return mode == CONVERSATION || mode == SEARCH_RESULTS_CONVERSATION;
210 public static boolean isSearchMode(final int mode) {
211 return mode == SEARCH_RESULTS_LIST || mode == SEARCH_RESULTS_CONVERSATION;
218 public static boolean isWaitingForSync(final int mode) {
219 return mode == WAITING_FOR_ACCOUNT_INITIALIZATION;
226 public static boolean isAdMode(final int mode) {
227 return mode == AD;
231 * Restoring from a saved state restores only the mode. It does not restore the listeners of
239 // Restore the previous mode, and UNKNOWN if nothing exists.
247 * Save the existing mode only. Does not save the existing listeners.
258 * Removes a listener from this view mode.
266 * Sets the internal mode.
269 private boolean setModeInternal(int mode) {
270 if (mMode == mode) {
272 LogUtils.d(LOG_TAG, new Error(), "ViewMode: debouncing change attempt mode=%s",
273 mode);
275 LogUtils.i(LOG_TAG, "ViewMode: debouncing change attempt mode=%s", mode);
282 mode);
284 LogUtils.i(LOG_TAG, "ViewMode: executing change old=%s new=%s", mMode, mode);
287 mMode = mode;