Jeff Brown | 13014b5 | 2014-04-07 19:45:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.app; |
| 18 | |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 19 | import android.annotation.NonNull; |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 20 | import android.annotation.Nullable; |
Fyodor Kupolov | b501330 | 2015-04-17 17:59:14 -0700 | [diff] [blame] | 21 | import android.content.ComponentName; |
Felipe Leme | a1b79bf | 2016-05-24 13:06:54 -0700 | [diff] [blame] | 22 | import android.content.IIntentSender; |
Makoto Onuki | ea11db1 | 2016-06-24 15:17:44 -0700 | [diff] [blame] | 23 | import android.content.Intent; |
Suprabh Shukla | 6472501 | 2016-06-15 13:19:28 -0700 | [diff] [blame] | 24 | import android.content.res.Configuration; |
Makoto Onuki | ea11db1 | 2016-06-24 15:17:44 -0700 | [diff] [blame] | 25 | import android.os.Bundle; |
Amith Yamasani | 0af6fa7 | 2016-01-17 15:36:19 -0800 | [diff] [blame] | 26 | import android.os.IBinder; |
Sudheer Shanka | c766db0 | 2017-06-12 10:37:29 -0700 | [diff] [blame] | 27 | import android.os.SystemClock; |
Amith Yamasani | 0af6fa7 | 2016-01-17 15:36:19 -0800 | [diff] [blame] | 28 | import android.service.voice.IVoiceInteractionSession; |
Jorim Jaggi | 3878ca3 | 2017-02-02 17:13:05 -0800 | [diff] [blame] | 29 | import android.util.SparseIntArray; |
Amith Yamasani | 0af6fa7 | 2016-01-17 15:36:19 -0800 | [diff] [blame] | 30 | |
| 31 | import com.android.internal.app.IVoiceInteractor; |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 32 | |
Amith Yamasani | e8222e5 | 2016-04-08 15:28:47 -0700 | [diff] [blame] | 33 | import java.util.List; |
| 34 | |
Jeff Brown | 13014b5 | 2014-04-07 19:45:27 -0700 | [diff] [blame] | 35 | /** |
| 36 | * Activity manager local system service interface. |
| 37 | * |
| 38 | * @hide Only for use within the system server. |
| 39 | */ |
| 40 | public abstract class ActivityManagerInternal { |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 41 | |
| 42 | /** |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 43 | * Type for {@link #notifyAppTransitionStarting}: The transition was started because we drew |
Jorim Jaggi | 3878ca3 | 2017-02-02 17:13:05 -0800 | [diff] [blame] | 44 | * the splash screen. |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 45 | */ |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 46 | public static final int APP_TRANSITION_SPLASH_SCREEN = |
| 47 | AppProtoEnums.APP_TRANSITION_SPLASH_SCREEN; // 1 |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 48 | |
| 49 | /** |
| 50 | * Type for {@link #notifyAppTransitionStarting}: The transition was started because we all |
| 51 | * app windows were drawn |
| 52 | */ |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 53 | public static final int APP_TRANSITION_WINDOWS_DRAWN = |
| 54 | AppProtoEnums.APP_TRANSITION_WINDOWS_DRAWN; // 2 |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * Type for {@link #notifyAppTransitionStarting}: The transition was started because of a |
| 58 | * timeout. |
| 59 | */ |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 60 | public static final int APP_TRANSITION_TIMEOUT = |
| 61 | AppProtoEnums.APP_TRANSITION_TIMEOUT; // 3 |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 62 | |
Jeff Sharkey | 923e0b8 | 2016-11-16 17:22:48 -0700 | [diff] [blame] | 63 | /** |
Jorim Jaggi | 3878ca3 | 2017-02-02 17:13:05 -0800 | [diff] [blame] | 64 | * Type for {@link #notifyAppTransitionStarting}: The transition was started because of a |
| 65 | * we drew a task snapshot. |
| 66 | */ |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 67 | public static final int APP_TRANSITION_SNAPSHOT = |
| 68 | AppProtoEnums.APP_TRANSITION_SNAPSHOT; // 4 |
Jorim Jaggi | 3878ca3 | 2017-02-02 17:13:05 -0800 | [diff] [blame] | 69 | |
| 70 | /** |
Winson Chung | ec1ef09 | 2017-10-25 16:22:34 -0700 | [diff] [blame] | 71 | * The bundle key to extract the assist data. |
| 72 | */ |
| 73 | public static final String ASSIST_KEY_DATA = "data"; |
| 74 | |
| 75 | /** |
| 76 | * The bundle key to extract the assist structure. |
| 77 | */ |
| 78 | public static final String ASSIST_KEY_STRUCTURE = "structure"; |
| 79 | |
| 80 | /** |
| 81 | * The bundle key to extract the assist content. |
| 82 | */ |
| 83 | public static final String ASSIST_KEY_CONTENT = "content"; |
| 84 | |
| 85 | /** |
| 86 | * The bundle key to extract the assist receiver extras. |
| 87 | */ |
| 88 | public static final String ASSIST_KEY_RECEIVER_EXTRAS = "receiverExtras"; |
| 89 | |
| 90 | |
| 91 | /** |
Jeff Sharkey | 7ff418d | 2016-11-30 14:29:59 -0700 | [diff] [blame] | 92 | * Grant Uri permissions from one app to another. This method only extends |
| 93 | * permission grants if {@code callingUid} has permission to them. |
| 94 | */ |
| 95 | public abstract void grantUriPermissionFromIntent(int callingUid, String targetPkg, |
| 96 | Intent intent, int targetUserId); |
| 97 | |
| 98 | /** |
Jeff Sharkey | 923e0b8 | 2016-11-16 17:22:48 -0700 | [diff] [blame] | 99 | * Verify that calling app has access to the given provider. |
| 100 | */ |
| 101 | public abstract String checkContentProviderAccess(String authority, int userId); |
| 102 | |
Jeff Brown | 13014b5 | 2014-04-07 19:45:27 -0700 | [diff] [blame] | 103 | // Called by the power manager. |
Jeff Brown | fbe9670 | 2014-11-19 18:30:58 -0800 | [diff] [blame] | 104 | public abstract void onWakefulnessChanged(int wakefulness); |
| 105 | |
Sudheer Shanka | f669010 | 2017-10-16 10:20:32 -0700 | [diff] [blame] | 106 | /** |
| 107 | * @return {@code true} if process start is successful, {@code false} otherwise. |
| 108 | */ |
| 109 | public abstract boolean startIsolatedProcess(String entryPoint, String[] mainArgs, |
Primiano Tucci | 810c052 | 2014-07-25 18:03:16 +0100 | [diff] [blame] | 110 | String processName, String abiOverride, int uid, Runnable crashHandler); |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 111 | |
| 112 | /** |
David Stevens | f62360c | 2017-03-16 19:00:20 -0700 | [diff] [blame] | 113 | * Acquires a sleep token for the specified display with the specified tag. |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 114 | * |
| 115 | * @param tag A string identifying the purpose of the token (eg. "Dream"). |
David Stevens | f62360c | 2017-03-16 19:00:20 -0700 | [diff] [blame] | 116 | * @param displayId The display to apply the sleep token to. |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 117 | */ |
David Stevens | f62360c | 2017-03-16 19:00:20 -0700 | [diff] [blame] | 118 | public abstract SleepToken acquireSleepToken(@NonNull String tag, int displayId); |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 119 | |
| 120 | /** |
| 121 | * Sleep tokens cause the activity manager to put the top activity to sleep. |
| 122 | * They are used by components such as dreams that may hide and block interaction |
| 123 | * with underlying activities. |
| 124 | */ |
| 125 | public static abstract class SleepToken { |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 126 | |
Jeff Brown | 061ea99 | 2015-04-17 19:55:47 -0700 | [diff] [blame] | 127 | /** |
| 128 | * Releases the sleep token. |
| 129 | */ |
| 130 | public abstract void release(); |
| 131 | } |
Fyodor Kupolov | b501330 | 2015-04-17 17:59:14 -0700 | [diff] [blame] | 132 | |
| 133 | /** |
| 134 | * Returns home activity for the specified user. |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 135 | * |
Fyodor Kupolov | b501330 | 2015-04-17 17:59:14 -0700 | [diff] [blame] | 136 | * @param userId ID of the user or {@link android.os.UserHandle#USER_ALL} |
| 137 | */ |
| 138 | public abstract ComponentName getHomeActivityForUser(int userId); |
Amith Yamasani | 515d406 | 2015-09-28 11:30:06 -0700 | [diff] [blame] | 139 | |
| 140 | /** |
| 141 | * Called when a user has been deleted. This can happen during normal device usage |
| 142 | * or just at startup, when partially removed users are purged. Any state persisted by the |
| 143 | * ActivityManager should be purged now. |
| 144 | * |
| 145 | * @param userId The user being cleaned up. |
| 146 | */ |
| 147 | public abstract void onUserRemoved(int userId); |
Amith Yamasani | 0af6fa7 | 2016-01-17 15:36:19 -0800 | [diff] [blame] | 148 | |
| 149 | public abstract void onLocalVoiceInteractionStarted(IBinder callingActivity, |
| 150 | IVoiceInteractionSession mSession, |
| 151 | IVoiceInteractor mInteractor); |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 152 | |
| 153 | /** |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 154 | * Callback for window manager to let activity manager know that we are finally starting the |
| 155 | * app transition; |
| 156 | * |
Jorim Jaggi | 9b58f2d | 2018-02-19 17:48:44 +0100 | [diff] [blame] | 157 | * @param reasons A map from windowing mode to a reason integer why the transition was started, |
| 158 | * which must be one of the APP_TRANSITION_* values. |
Sudheer Shanka | c766db0 | 2017-06-12 10:37:29 -0700 | [diff] [blame] | 159 | * @param timestamp The time at which the app transition started in |
| 160 | * {@link SystemClock#uptimeMillis()} timebase. |
Jorim Jaggi | 275561a | 2016-02-23 10:11:02 -0500 | [diff] [blame] | 161 | */ |
Sudheer Shanka | c766db0 | 2017-06-12 10:37:29 -0700 | [diff] [blame] | 162 | public abstract void notifyAppTransitionStarting(SparseIntArray reasons, long timestamp); |
Jorim Jaggi | 192086e | 2016-03-11 17:17:03 +0100 | [diff] [blame] | 163 | |
| 164 | /** |
| 165 | * Callback for window manager to let activity manager know that the app transition was |
| 166 | * cancelled. |
| 167 | */ |
| 168 | public abstract void notifyAppTransitionCancelled(); |
| 169 | |
| 170 | /** |
| 171 | * Callback for window manager to let activity manager know that the app transition is finished. |
| 172 | */ |
| 173 | public abstract void notifyAppTransitionFinished(); |
Amith Yamasani | e8222e5 | 2016-04-08 15:28:47 -0700 | [diff] [blame] | 174 | |
| 175 | /** |
| 176 | * Returns the top activity from each of the currently visible stacks. The first entry will be |
| 177 | * the focused activity. |
| 178 | */ |
| 179 | public abstract List<IBinder> getTopVisibleActivities(); |
Tony Mak | 853304c | 2016-04-18 15:17:41 +0100 | [diff] [blame] | 180 | |
| 181 | /** |
| 182 | * Callback for window manager to let activity manager know that docked stack changes its |
| 183 | * minimized state. |
| 184 | */ |
| 185 | public abstract void notifyDockedStackMinimizedChanged(boolean minimized); |
Rubin Xu | f8451b9 | 2016-04-01 15:50:58 +0100 | [diff] [blame] | 186 | |
| 187 | /** |
| 188 | * Kill foreground apps from the specified user. |
| 189 | */ |
| 190 | public abstract void killForegroundAppsForUser(int userHandle); |
Felipe Leme | a1b79bf | 2016-05-24 13:06:54 -0700 | [diff] [blame] | 191 | |
| 192 | /** |
| 193 | * Sets how long a {@link PendingIntent} can be temporarily whitelist to by bypass restrictions |
| 194 | * such as Power Save mode. |
| 195 | */ |
Dianne Hackborn | 9830552 | 2017-05-05 17:53:53 -0700 | [diff] [blame] | 196 | public abstract void setPendingIntentWhitelistDuration(IIntentSender target, |
| 197 | IBinder whitelistToken, long duration); |
Suprabh Shukla | 6472501 | 2016-06-15 13:19:28 -0700 | [diff] [blame] | 198 | |
| 199 | /** |
Dianne Hackborn | 85e3564 | 2017-01-12 15:10:57 -0800 | [diff] [blame] | 200 | * Allow DeviceIdleController to tell us about what apps are whitelisted. |
| 201 | */ |
| 202 | public abstract void setDeviceIdleWhitelist(int[] appids); |
| 203 | |
| 204 | /** |
| 205 | * Update information about which app IDs are on the temp whitelist. |
| 206 | */ |
| 207 | public abstract void updateDeviceIdleTempWhitelist(int[] appids, int changingAppId, |
| 208 | boolean adding); |
| 209 | |
| 210 | /** |
Suprabh Shukla | 6472501 | 2016-06-15 13:19:28 -0700 | [diff] [blame] | 211 | * Updates and persists the {@link Configuration} for a given user. |
| 212 | * |
| 213 | * @param values the configuration to update |
| 214 | * @param userId the user to update the configuration for |
| 215 | */ |
| 216 | public abstract void updatePersistentConfigurationForUser(@NonNull Configuration values, |
| 217 | int userId); |
Makoto Onuki | ea11db1 | 2016-06-24 15:17:44 -0700 | [diff] [blame] | 218 | |
| 219 | /** |
Makoto Onuki | 440a1ea | 2016-07-20 14:21:18 -0700 | [diff] [blame] | 220 | * Start activity {@code intents} as if {@code packageName} on user {@code userId} did it. |
Makoto Onuki | 83f6d2d | 2016-07-11 14:30:19 -0700 | [diff] [blame] | 221 | * |
Makoto Onuki | 7041c4b | 2018-02-06 13:36:34 -0800 | [diff] [blame] | 222 | * - DO NOT call it with the calling UID cleared. |
| 223 | * - All the necessary caller permission checks must be done at callsites. |
| 224 | * |
Makoto Onuki | 83f6d2d | 2016-07-11 14:30:19 -0700 | [diff] [blame] | 225 | * @return error codes used by {@link IActivityManager#startActivity} and its siblings. |
Makoto Onuki | ea11db1 | 2016-06-24 15:17:44 -0700 | [diff] [blame] | 226 | */ |
Makoto Onuki | 440a1ea | 2016-07-20 14:21:18 -0700 | [diff] [blame] | 227 | public abstract int startActivitiesAsPackage(String packageName, |
| 228 | int userId, Intent[] intents, Bundle bOptions); |
Makoto Onuki | 33525d2 | 2016-08-03 15:45:24 -0700 | [diff] [blame] | 229 | |
| 230 | /** |
| 231 | * Get the procstate for the UID. The return value will be between |
| 232 | * {@link ActivityManager#MIN_PROCESS_STATE} and {@link ActivityManager#MAX_PROCESS_STATE}. |
| 233 | * Note if the UID doesn't exist, it'll return {@link ActivityManager#PROCESS_STATE_NONEXISTENT} |
| 234 | * (-1). |
| 235 | */ |
| 236 | public abstract int getUidProcessState(int uid); |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 237 | |
| 238 | /** |
| 239 | * Called when Keyguard flags might have changed. |
| 240 | * |
| 241 | * @param callback Callback to run after activity visibilities have been reevaluated. This can |
| 242 | * be used from window manager so that when the callback is called, it's |
| 243 | * guaranteed that all apps have their visibility updated accordingly. |
| 244 | */ |
| 245 | public abstract void notifyKeyguardFlagsChanged(@Nullable Runnable callback); |
Sudheer Shanka | fc46e9b | 2016-10-21 17:55:27 -0700 | [diff] [blame] | 246 | |
| 247 | /** |
| 248 | * @return {@code true} if system is ready, {@code false} otherwise. |
| 249 | */ |
| 250 | public abstract boolean isSystemReady(); |
Jorim Jaggi | e69c931 | 2016-10-31 18:24:38 -0700 | [diff] [blame] | 251 | |
| 252 | /** |
| 253 | * Called when the trusted state of Keyguard has changed. |
| 254 | */ |
| 255 | public abstract void notifyKeyguardTrustedChanged(); |
Wale Ogunwale | d993a57 | 2017-02-05 13:52:09 -0800 | [diff] [blame] | 256 | |
| 257 | /** |
| 258 | * Sets if the given pid has an overlay UI or not. |
| 259 | * |
| 260 | * @param pid The pid we are setting overlay UI for. |
| 261 | * @param hasOverlayUi True if the process has overlay UI. |
| 262 | * @see android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY |
| 263 | */ |
| 264 | public abstract void setHasOverlayUi(int pid, boolean hasOverlayUi); |
Sudheer Shanka | e736185 | 2017-03-07 11:51:46 -0800 | [diff] [blame] | 265 | |
| 266 | /** |
| 267 | * Called after the network policy rules are updated by |
| 268 | * {@link com.android.server.net.NetworkPolicyManagerService} for a specific {@param uid} and |
| 269 | * {@param procStateSeq}. |
| 270 | */ |
| 271 | public abstract void notifyNetworkPolicyRulesUpdated(int uid, long procStateSeq); |
Karthik Ravi Shankar | 99493db | 2017-03-08 18:30:19 -0800 | [diff] [blame] | 272 | |
| 273 | /** |
Winson Chung | bccd4b5 | 2017-12-13 11:08:39 -0800 | [diff] [blame] | 274 | * Called after the voice interaction service has changed. |
| 275 | */ |
| 276 | public abstract void notifyActiveVoiceInteractionServiceChanged(ComponentName component); |
| 277 | |
| 278 | /** |
Karthik Ravi Shankar | 99493db | 2017-03-08 18:30:19 -0800 | [diff] [blame] | 279 | * Called after virtual display Id is updated by |
Karthik Ravi Shankar | 2b9aaed | 2017-05-01 01:34:19 -0700 | [diff] [blame] | 280 | * {@link com.android.server.vr.Vr2dDisplay} with a specific |
| 281 | * {@param vr2dDisplayId}. |
Karthik Ravi Shankar | 99493db | 2017-03-08 18:30:19 -0800 | [diff] [blame] | 282 | */ |
Karthik Ravi Shankar | 2b9aaed | 2017-05-01 01:34:19 -0700 | [diff] [blame] | 283 | public abstract void setVr2dDisplayId(int vr2dDisplayId); |
Wale Ogunwale | f128591 | 2017-06-09 15:20:29 -0700 | [diff] [blame] | 284 | |
| 285 | /** |
| 286 | * Saves the current activity manager state and includes the saved state in the next dump of |
| 287 | * activity manager. |
| 288 | */ |
| 289 | public abstract void saveANRState(String reason); |
| 290 | |
| 291 | /** |
| 292 | * Clears the previously saved activity manager ANR state. |
| 293 | */ |
| 294 | public abstract void clearSavedANRState(); |
Phil Weaver | 5dc3ebc | 2017-08-16 13:04:20 -0700 | [diff] [blame] | 295 | |
| 296 | /** |
| 297 | * Set focus on an activity. |
| 298 | * @param token The IApplicationToken for the activity |
| 299 | */ |
| 300 | public abstract void setFocusedActivity(IBinder token); |
Dianne Hackborn | 08bd3ea | 2017-11-22 13:59:17 -0800 | [diff] [blame] | 301 | |
| 302 | /** |
| 303 | * Set a uid that is allowed to bypass stopped app switches, launching an app |
| 304 | * whenever it wants. |
| 305 | * |
| 306 | * @param type Type of the caller -- unique string the caller supplies to identify itself |
| 307 | * and disambiguate with other calles. |
| 308 | * @param uid The uid of the app to be allowed, or -1 to clear the uid for this type. |
| 309 | * @param userId The user it is allowed for. |
| 310 | */ |
| 311 | public abstract void setAllowAppSwitches(@NonNull String type, int uid, int userId); |
Makoto Onuki | e098b759 | 2017-11-27 17:50:41 -0800 | [diff] [blame] | 312 | |
| 313 | /** |
| 314 | * @return true if runtime was restarted, false if it's normal boot |
| 315 | */ |
| 316 | public abstract boolean isRuntimeRestarted(); |
Felipe Leme | 2a580d1 | 2017-12-11 14:37:35 -0800 | [diff] [blame] | 317 | |
| 318 | /** |
| 319 | * Returns {@code true} if {@code uid} is running an activity from {@code packageName}. |
| 320 | */ |
| 321 | public abstract boolean hasRunningActivity(int uid, @Nullable String packageName); |
Jeff Sharkey | 9765e44 | 2017-12-14 22:15:14 -0700 | [diff] [blame] | 322 | |
| 323 | public interface ScreenObserver { |
| 324 | public void onAwakeStateChanged(boolean isAwake); |
| 325 | public void onKeyguardStateChanged(boolean isShowing); |
| 326 | } |
| 327 | |
| 328 | public abstract void registerScreenObserver(ScreenObserver observer); |
Alex Chau | b6ef869 | 2018-01-09 14:16:36 +0000 | [diff] [blame] | 329 | |
| 330 | /** |
| 331 | * Returns if more users can be started without stopping currently running users. |
| 332 | */ |
| 333 | public abstract boolean canStartMoreUsers(); |
Alex Chau | 93ae42b | 2018-01-11 15:10:12 +0000 | [diff] [blame] | 334 | |
| 335 | /** |
| 336 | * Sets the user switcher message for switching from {@link android.os.UserHandle#SYSTEM}. |
| 337 | */ |
| 338 | public abstract void setSwitchingFromSystemUserMessage(String switchingFromSystemUserMessage); |
| 339 | |
| 340 | /** |
| 341 | * Sets the user switcher message for switching to {@link android.os.UserHandle#SYSTEM}. |
| 342 | */ |
| 343 | public abstract void setSwitchingToSystemUserMessage(String switchingToSystemUserMessage); |
Alex Chau | c12189b | 2018-01-16 15:01:15 +0000 | [diff] [blame] | 344 | |
| 345 | /** |
| 346 | * Returns maximum number of users that can run simultaneously. |
| 347 | */ |
| 348 | public abstract int getMaxRunningUsers(); |
Tony Mak | e839d70 | 2018-01-22 15:34:46 +0000 | [diff] [blame] | 349 | |
| 350 | /** |
| 351 | * Returns is the caller has the same uid as the Recents component |
| 352 | */ |
| 353 | public abstract boolean isCallerRecents(int callingUid); |
Makoto Onuki | e491821 | 2018-02-06 11:30:15 -0800 | [diff] [blame] | 354 | |
| 355 | /** |
| 356 | * Whether an UID is active or idle. |
| 357 | */ |
| 358 | public abstract boolean isUidActive(int uid); |
Rajeev Kumar | 22d92b7 | 2018-02-07 18:38:36 -0800 | [diff] [blame] | 359 | |
| 360 | /** |
| 361 | * Returns a list that contains the memory stats for currently running processes. |
| 362 | */ |
| 363 | public abstract List<ProcessMemoryState> getMemoryStateForProcesses(); |
Jeff Brown | 13014b5 | 2014-04-07 19:45:27 -0700 | [diff] [blame] | 364 | } |