blob: 16fe7dba0fbe280338daeb094bc87dcd86be49ee [file] [log] [blame]
Sudheer Shankafc46e9b2016-10-21 17:55:27 -07001/*
2 * Copyright (C) 2016 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
17package android.app;
18
19import android.app.ActivityManager;
20import android.app.ApplicationErrorReport;
21import android.app.ContentProviderHolder;
Felipe Leme23a0c7a2018-01-24 08:43:34 -080022import android.app.GrantedUriPermission;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070023import android.app.IApplicationThread;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070024import android.app.IActivityController;
25import android.app.IAppTask;
Winson Chunge2104682017-11-08 17:31:14 -080026import android.app.IAssistDataReceiver;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070027import android.app.IInstrumentationWatcher;
28import android.app.IProcessObserver;
29import android.app.IServiceConnection;
30import android.app.IStopUserCallback;
31import android.app.ITaskStackListener;
32import android.app.IUiAutomationConnection;
33import android.app.IUidObserver;
34import android.app.IUserSwitchObserver;
35import android.app.Notification;
36import android.app.PendingIntent;
Winson Chung709904f2017-04-25 11:00:48 -070037import android.app.PictureInPictureParams;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070038import android.app.ProfilerInfo;
39import android.app.WaitResult;
40import android.app.assist.AssistContent;
41import android.app.assist.AssistStructure;
42import android.content.ComponentName;
43import android.content.IIntentReceiver;
44import android.content.IIntentSender;
45import android.content.Intent;
46import android.content.IntentFilter;
47import android.content.IntentSender;
48import android.content.pm.ApplicationInfo;
49import android.content.pm.ConfigurationInfo;
50import android.content.pm.IPackageDataObserver;
51import android.content.pm.ParceledListSlice;
52import android.content.pm.ProviderInfo;
53import android.content.pm.UserInfo;
54import android.content.res.Configuration;
55import android.graphics.Bitmap;
Jorim Jaggi02886a82016-12-06 09:10:06 -080056import android.graphics.GraphicBuffer;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070057import android.graphics.Point;
58import android.graphics.Rect;
59import android.net.Uri;
60import android.os.Bundle;
61import android.os.Debug;
62import android.os.IBinder;
63import android.os.IProgressListener;
64import android.os.ParcelFileDescriptor;
65import android.os.PersistableBundle;
Makoto Onuki2c6657f2018-06-06 15:24:02 -070066import android.os.RemoteCallback;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070067import android.os.StrictMode;
Narayan Kamath695cf722017-12-21 18:32:47 +000068import android.os.WorkSource;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070069import android.service.voice.IVoiceInteractionSession;
Winson Chunge2d72172018-01-25 17:46:20 +000070import android.view.IRecentsAnimationRunner;
Jorim Jaggif84e2f62018-01-16 14:17:59 +010071import android.view.RemoteAnimationDefinition;
Jorim Jaggi04dc5962018-01-29 18:54:13 +010072import android.view.RemoteAnimationAdapter;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070073import com.android.internal.app.IVoiceInteractor;
74import com.android.internal.os.IResultReceiver;
Jorim Jaggi241ae102016-11-02 21:57:33 -070075import com.android.internal.policy.IKeyguardDismissCallback;
Sudheer Shankafc46e9b2016-10-21 17:55:27 -070076
77import java.util.List;
78
79/**
80 * System private API for talking with the activity manager service. This
81 * provides calls from the application back to the activity manager.
82 *
83 * {@hide}
84 */
85interface IActivityManager {
Sudheer Shankaee148f92016-11-14 16:21:07 -080086 // WARNING: when these transactions are updated, check if they are any callers on the native
Sudheer Shanka027a33d2016-11-23 15:24:51 -080087 // side. If so, make sure they are using the correct transaction ids and arguments.
Sudheer Shankaee148f92016-11-14 16:21:07 -080088 // If a transaction which will also be used on the native side is being inserted, add it to
89 // below block of transactions.
90
Sudheer Shanka027a33d2016-11-23 15:24:51 -080091 // Since these transactions are also called from native code, these must be kept in sync with
Peter Visontaycee76322017-09-05 11:43:36 +010092 // the ones in frameworks/native/libs/binder/include/binder/IActivityManager.h
Sudheer Shankaee148f92016-11-14 16:21:07 -080093 // =============== Beginning of transactions used on native side as well ======================
94 ParcelFileDescriptor openContentUri(in String uriString);
Svet Ganov14ab9672017-11-22 18:49:32 -080095 void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
96 String callingPackage);
97 void unregisterUidObserver(in IUidObserver observer);
Svet Ganov0c1c9cd2018-03-25 13:14:47 -070098 boolean isUidActive(int uid, String callingPackage);
Eric Laurent25f2eac2018-10-18 14:58:22 -070099 int getUidProcessState(int uid, in String callingPackage);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800100 // =============== End of transactions used on native side as well ============================
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700101
102 // Special low-level communication with activity manager.
103 void handleApplicationCrash(in IBinder app,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800104 in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000105 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700106 int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
107 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800108 int flags, in ProfilerInfo profilerInfo, in Bundle options);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000109 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800110 void unhandledBack();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000111 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800112 boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000113 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700114 Intent registerReceiver(in IApplicationThread caller, in String callerPackage,
115 in IIntentReceiver receiver, in IntentFilter filter,
Chad Brubaker6d6015f2017-04-18 11:25:16 -0700116 in String requiredPermission, int userId, int flags);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000117 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800118 void unregisterReceiver(in IIntentReceiver receiver);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000119 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700120 int broadcastIntent(in IApplicationThread caller, in Intent intent,
121 in String resolvedType, in IIntentReceiver resultTo, int resultCode,
122 in String resultData, in Bundle map, in String[] requiredPermissions,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800123 int appOp, in Bundle options, boolean serialized, boolean sticky, int userId);
124 void unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700125 oneway void finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800126 boolean abortBroadcast, int flags);
Sudheer Shankaf6690102017-10-16 10:20:32 -0700127 void attachApplication(in IApplicationThread app, long startSeq);
Winson Chung61c9e5a2017-10-11 10:39:32 -0700128 List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000129 @UnsupportedAppUsage
Winson Chung61c9e5a2017-10-11 10:39:32 -0700130 List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
131 int ignoreWindowingMode);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000132 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800133 void moveTaskToFront(int task, int flags, in Bundle options);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000134 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800135 int getTaskForActivity(in IBinder token, in boolean onlyRoot);
Dianne Hackborn24bbe582018-12-17 11:58:31 -0800136 ContentProviderHolder getContentProvider(in IApplicationThread caller, in String callingPackage,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800137 in String name, int userId, boolean stable);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000138 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700139 void publishContentProviders(in IApplicationThread caller,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800140 in List<ContentProviderHolder> providers);
141 boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800142 PendingIntent getRunningServiceControlPanel(in ComponentName service);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700143 ComponentName startService(in IApplicationThread caller, in Intent service,
Christopher Tate242ba3e92017-04-14 15:07:06 -0700144 in String resolvedType, boolean requireForeground, in String callingPackage, int userId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000145 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700146 int stopService(in IApplicationThread caller, in Intent service,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800147 in String resolvedType, int userId);
Dianne Hackborn27b4d942018-11-12 15:01:40 -0800148 // Currently keeping old bindService because it is on the greylist
Andrei Onea4b2116c2019-02-28 15:13:42 +0000149 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700150 int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
151 in String resolvedType, in IServiceConnection connection, int flags,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800152 in String callingPackage, int userId);
Dianne Hackborn27b4d942018-11-12 15:01:40 -0800153 int bindIsolatedService(in IApplicationThread caller, in IBinder token, in Intent service,
154 in String resolvedType, in IServiceConnection connection, int flags,
155 in String instanceName, in String callingPackage, int userId);
Dianne Hackborna631d562018-11-20 15:58:15 -0800156 void updateServiceGroup(in IServiceConnection connection, int group, int importance);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000157 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800158 boolean unbindService(in IServiceConnection connection);
159 void publishService(in IBinder token, in Intent intent, in IBinder service);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000160 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800161 void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
Andreas Gampe5b495d52018-01-22 15:15:54 -0800162 void setAgentApp(in String packageName, @nullable String agent);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000163 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800164 void setAlwaysFinish(boolean enabled);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000165 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700166 boolean startInstrumentation(in ComponentName className, in String profileFile,
167 int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
168 in IUiAutomationConnection connection, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800169 in String abiOverride);
Dianne Hackborn34041732017-01-31 15:27:13 -0800170 void addInstrumentationResults(in IApplicationThread target, in Bundle results);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700171 void finishInstrumentation(in IApplicationThread target, int resultCode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800172 in Bundle results);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700173 /**
174 * @return A copy of global {@link Configuration}, contains general settings for the entire
175 * system. Corresponds to the configuration of the default display.
176 * @throws RemoteException
177 */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000178 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800179 Configuration getConfiguration();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700180 /**
181 * Updates global configuration and applies changes to the entire system.
182 * @param values Update values for global configuration. If null is passed it will request the
183 * Window Manager to compute new config for the default display.
184 * @throws RemoteException
185 * @return Returns true if the configuration was updated.
186 */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000187 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800188 boolean updateConfiguration(in Configuration values);
189 boolean stopServiceToken(in ComponentName className, in IBinder token, int startId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000190 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800191 void setProcessLimit(int max);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000192 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800193 int getProcessLimit();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000194 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800195 int checkPermission(in String permission, int pid, int uid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700196 int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800197 in IBinder callerToken);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700198 void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800199 int mode, int userId);
Dianne Hackborna47223f2017-03-30 13:49:13 -0700200 void revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
201 int mode, int userId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000202 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800203 void setActivityController(in IActivityController watcher, boolean imAMonkey);
204 void showWaitingForDebugger(in IApplicationThread who, boolean waiting);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700205 /*
206 * This will deliver the specified signal to all the persistent processes. Currently only
207 * SIGUSR1 is delivered. All others are ignored.
208 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800209 void signalPersistentProcesses(int signal);
Winson Chung5fa39752017-10-04 14:50:15 -0700210
Andrei Onea4b2116c2019-02-28 15:13:42 +0000211 @UnsupportedAppUsage
Winson Chung5fa39752017-10-04 14:50:15 -0700212 ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800213 oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000214 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700215 IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
216 in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800217 int flags, in Bundle options, int userId);
218 void cancelIntentSender(in IIntentSender sender);
219 String getPackageForIntentSender(in IIntentSender sender);
Dianne Hackbornf66adfd2017-04-13 11:01:48 -0700220 void registerIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
221 void unregisterIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800222 void enterSafeMode();
Narayan Kamath695cf722017-12-21 18:32:47 +0000223 void noteWakeupAlarm(in IIntentSender sender, in WorkSource workSource, int sourceUid,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800224 in String sourcePkg, in String tag);
225 void removeContentProvider(in IBinder connection, boolean stable);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000226 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800227 void setRequestedOrientation(in IBinder token, int requestedOrientation);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800228 void unbindFinished(in IBinder token, in Intent service, boolean doRebind);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000229 @UnsupportedAppUsage
Dianne Hackbornf965f402017-05-04 23:27:23 -0700230 void setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason);
Sudheer Shankac9d94072017-02-22 22:13:55 +0000231 void setServiceForeground(in ComponentName className, in IBinder token,
Hui Yu2d4207f2019-01-22 15:32:20 -0800232 int id, in Notification notification, int flags, int foregroundServiceType);
Hui Yufb72b992019-02-20 10:04:07 -0800233 int getForegroundServiceType(in ComponentName className, in IBinder token);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000234 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800235 boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000236 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800237 void getMemoryInfo(out ActivityManager.MemoryInfo outInfo);
238 List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
Christopher Tate1d99c392017-12-07 16:54:04 -0800239 boolean clearApplicationUserData(in String packageName, boolean keepState,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800240 in IPackageDataObserver observer, int userId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000241 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800242 void forceStopPackage(in String packageName, int userId);
243 boolean killPids(in int[] pids, in String reason, boolean secure);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000244 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800245 List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700246 // Retrieve running application processes in the system
Andrei Onea4b2116c2019-02-28 15:13:42 +0000247 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800248 List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
Sudheer Shankaee148f92016-11-14 16:21:07 -0800249 IBinder peekService(in Intent service, in String resolvedType, in String callingPackage);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700250 // Turn on/off profiling in a particular process.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000251 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700252 boolean profileControl(in String process, int userId, boolean start,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800253 in ProfilerInfo profilerInfo, int profileType);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000254 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800255 boolean shutdown(int timeout);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000256 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800257 void stopAppSwitches();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000258 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800259 void resumeAppSwitches();
Annie Mengd5827872019-01-30 20:28:57 +0000260 boolean bindBackupAgent(in String packageName, int backupRestoreMode, int targetUserId);
261 void backupAgentCreated(in String packageName, in IBinder agent, int userId);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800262 void unbindBackupAgent(in ApplicationInfo appInfo);
263 int getUidForIntentSender(in IIntentSender sender);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700264 int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800265 boolean requireFull, in String name, in String callerPackage);
266 void addPackageDependency(in String packageName);
267 void killApplication(in String pkg, int appId, int userId, in String reason);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000268 @UnsupportedAppUsage
Winson Chung84deaa22017-11-02 15:57:28 -0700269 void closeSystemDialogs(in String reason);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000270 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800271 Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids);
272 void killApplicationProcess(in String processName, int uid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700273 // Special low-level communication with activity manager.
274 boolean handleApplicationWtf(in IBinder app, in String tag, boolean system,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800275 in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000276 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800277 void killBackgroundProcesses(in String packageName, int userId);
278 boolean isUserAMonkey();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700279 // Retrieve info of applications installed on external media that are currently
280 // running.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800281 List<ApplicationInfo> getRunningExternalApplications();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000282 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800283 void finishHeavyWeightApp();
Jeff Sharkey3ac2a432018-06-26 10:52:48 -0600284 // A StrictMode violation to be handled.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000285 @UnsupportedAppUsage
Jeff Sharkey3ac2a432018-06-26 10:52:48 -0600286 void handleApplicationStrictModeViolation(in IBinder app, int penaltyMask,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800287 in StrictMode.ViolationInfo crashInfo);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800288 boolean isTopActivityImmersive();
Christopher Tate8aa8fe12017-01-20 17:50:32 -0800289 void crashApplication(int uid, int initialPid, in String packageName, int userId, in String message);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000290 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800291 String getProviderMimeType(in Uri uri, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700292 // Cause the specified process to dump the specified heap.
Christopher Ferris8d652f82017-04-11 16:29:18 -0700293 boolean dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo,
Makoto Onuki2c6657f2018-06-06 15:24:02 -0700294 boolean runGc, in String path, in ParcelFileDescriptor fd,
295 in RemoteCallback finishCallback);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000296 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800297 boolean isUserRunning(int userid, int flags);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000298 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800299 void setPackageScreenCompatMode(in String packageName, int mode);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000300 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800301 boolean switchUser(int userid);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000302 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800303 boolean removeTask(int taskId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000304 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800305 void registerProcessObserver(in IProcessObserver observer);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000306 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800307 void unregisterProcessObserver(in IProcessObserver observer);
308 boolean isIntentSenderTargetedToPackage(in IIntentSender sender);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000309 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800310 void updatePersistentConfiguration(in Configuration values);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000311 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800312 long[] getProcessPss(in int[] pids);
313 void showBootMessage(in CharSequence msg, boolean always);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000314 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800315 void killAllBackgroundProcesses();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700316 ContentProviderHolder getContentProviderExternal(in String name, int userId,
Dianne Hackborn95031ef2018-07-09 09:09:05 -0700317 in IBinder token, String tag);
Makoto Onuki679760a2018-09-19 09:48:00 -0700318 /** @deprecated - Use {@link #removeContentProviderExternalAsUser} which takes a user ID. */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000319 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800320 void removeContentProviderExternal(in String name, in IBinder token);
Makoto Onuki679760a2018-09-19 09:48:00 -0700321 void removeContentProviderExternalAsUser(in String name, in IBinder token, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700322 // Get memory information about the calling process.
Sudheer Shankaee148f92016-11-14 16:21:07 -0800323 void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo);
324 boolean killProcessesBelowForeground(in String reason);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000325 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800326 UserInfo getCurrentUser();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700327 // This is not public because you need to be very careful in how you
328 // manage your activity to make sure it is always the uid you expect.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000329 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800330 int getLaunchedFromUid(in IBinder activityToken);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000331 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800332 void unstableProviderDied(in IBinder connection);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000333 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800334 boolean isIntentSenderAnActivity(in IIntentSender sender);
Suprabh Shukladb6bf662017-08-30 15:41:53 -0700335 boolean isIntentSenderAForegroundService(in IIntentSender sender);
Christopher Tate2f558d22019-01-17 16:58:31 -0800336 boolean isIntentSenderABroadcast(in IIntentSender sender);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000337 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700338 int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
339 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
340 int requestCode, int flags, in ProfilerInfo profilerInfo,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800341 in Bundle options, int userId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000342 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800343 int stopUser(int userid, boolean force, in IStopUserCallback callback);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000344 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800345 void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name);
346 void unregisterUserSwitchObserver(in IUserSwitchObserver observer);
347 int[] getRunningUserIds();
Felipe Leme10bb9b52016-12-20 09:10:14 -0800348
349 // Deprecated - This method is only used by a few internal components and it will soon be
350 // replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
351 // No new code should be calling it.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000352 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800353 void requestBugReport(int bugreportType);
Felipe Leme10bb9b52016-12-20 09:10:14 -0800354
Naveen Kallaca3d5432017-03-16 19:15:04 -0700355 /**
356 * Takes a telephony bug report and notifies the user with the title and description
357 * that are passed to this API as parameters
358 *
359 * @param shareTitle should be a valid legible string less than 50 chars long
360 * @param shareDescription should be less than 91 bytes when encoded into UTF-8 format
361 *
362 * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the
363 * paremeters cannot be encoding to an UTF-8 charset.
364 */
365 void requestTelephonyBugReport(in String shareTitle, in String shareDescription);
366
mukesh agrawald9e1df52018-01-22 14:07:31 -0800367 /**
368 * Deprecated - This method is only used by Wifi, and it will soon be replaced by a proper
369 * bug report API.
370 *
371 * Takes a minimal bugreport of Wifi-related state.
372 *
373 * @param shareTitle should be a valid legible string less than 50 chars long
374 * @param shareDescription should be less than 91 bytes when encoded into UTF-8 format
375 *
376 * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the
377 * parameters cannot be encoding to an UTF-8 charset.
378 */
379 void requestWifiBugReport(in String shareTitle, in String shareDescription);
380
Andrei Onea4b2116c2019-02-28 15:13:42 +0000381 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800382 Intent getIntentForIntentSender(in IIntentSender sender);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700383 // This is not public because you need to be very careful in how you
384 // manage your activity to make sure it is always the uid you expect.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000385 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800386 String getLaunchedFromPackage(in IBinder activityToken);
387 void killUid(int appId, int userId, in String reason);
388 void setUserIsMonkey(boolean monkey);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000389 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800390 void hang(in IBinder who, boolean allowRestart);
Wale Ogunwale388945c2017-10-04 12:13:46 -0700391
Andrei Onea4b2116c2019-02-28 15:13:42 +0000392 @UnsupportedAppUsage
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700393 List<ActivityManager.StackInfo> getAllStackInfos();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000394 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800395 void moveTaskToStack(int taskId, int stackId, boolean toTop);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700396 /**
397 * Resizes the input stack id to the given bounds.
398 *
399 * @param stackId Id of the stack to resize.
400 * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
401 * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
402 * active.
403 * @param preserveWindows True if the windows of activities contained in the stack should be
404 * preserved.
405 * @param animate True if the stack resize should be animated.
406 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
407 * default animation duration should be used.
408 * @throws RemoteException
409 */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000410 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700411 void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800412 boolean preserveWindows, boolean animate, int animationDuration);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800413 void setFocusedStack(int stackId);
Wale Ogunwale68278562017-09-23 17:13:55 -0700414 ActivityManager.StackInfo getFocusedStackInfo();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000415 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800416 void restart();
417 void performIdleMaintenance();
Sudheer Shankaee148f92016-11-14 16:21:07 -0800418 void appNotRespondingViaProvider(in IBinder connection);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000419 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800420 Rect getTaskBounds(int taskId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000421 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800422 boolean setProcessMemoryTrimLevel(in String process, int uid, int level);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700423
424
425 // Start of L transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800426 String getTagForIntentSender(in IIntentSender sender, in String prefix);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000427 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800428 boolean startUserInBackground(int userid);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000429 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800430 boolean isInLockTaskMode();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000431 @UnsupportedAppUsage
Winson Chunge2d72172018-01-25 17:46:20 +0000432 void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver,
433 in IRecentsAnimationRunner recentsAnimationRunner);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000434 @UnsupportedAppUsage
Winson Chung6a38fca2018-03-28 17:57:09 -0700435 void cancelRecentsAnimation(boolean restoreHomeStackPosition);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000436 @UnsupportedAppUsage
Winson Chungec1ef092017-10-25 16:22:34 -0700437 int startActivityFromRecents(int taskId, in Bundle options);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000438 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800439 void startSystemLockTaskMode(int taskId);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000440 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800441 boolean isTopOfTask(in IBinder token);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800442 void bootAnimationComplete();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700443 int checkPermissionWithToken(in String permission, int pid, int uid,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800444 in IBinder callerToken);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000445 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800446 void registerTaskStackListener(in ITaskStackListener listener);
Winson Chungaa357452017-10-31 11:35:30 -0700447 void unregisterTaskStackListener(in ITaskStackListener listener);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800448 void notifyCleartextNetwork(int uid, in byte[] firstPacket);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000449 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800450 void setTaskResizeable(int taskId, int resizeableMode);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000451 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800452 void resizeTask(int taskId, in Rect bounds, int resizeMode);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000453 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800454 int getLockTaskModeState();
Andrei Onea4b2116c2019-02-28 15:13:42 +0000455 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700456 void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800457 in String reportPackage);
458 void dumpHeapFinished(in String path);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800459 void updateLockTaskPackages(int userId, in String[] packages);
Narayan Kamath695cf722017-12-21 18:32:47 +0000460 void noteAlarmStart(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
461 void noteAlarmFinish(in IIntentSender sender, in WorkSource workSource, int sourceUid, in String tag);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000462 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800463 int getPackageProcessState(in String packageName, in String callingPackage);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800464 void updateDeviceOwner(in String packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700465
466 // Start of N transactions
467 // Start Binder transaction tracking for all applications.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000468 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800469 boolean startBinderTracking();
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700470 // Stop Binder transaction tracking for all applications and dump trace data to the given file
471 // descriptor.
Andrei Onea4b2116c2019-02-28 15:13:42 +0000472 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800473 boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
Andrii Kuliand2765632016-12-12 22:26:34 -0800474 /**
475 * Try to place task to provided position. The final position might be different depending on
476 * current user and stacks state. The task will be moved to target stack if it's currently in
477 * different stack.
478 */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000479 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800480 void positionTaskInStack(int taskId, int stackId, int position);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000481 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800482 void suppressResizeConfigChanges(boolean suppress);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000483 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800484 boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
Dianne Hackbornc3af19a2017-01-20 17:00:44 -0800485 boolean isAppStartModeDisabled(int uid, in String packageName);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000486 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700487 boolean unlockUser(int userid, in byte[] token, in byte[] secret,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800488 in IProgressListener listener);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800489 void killPackageDependents(in String packageName, int userId);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700490 /**
491 * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
492 *
493 * @param dockedBounds The bounds for the docked stack.
494 * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
495 * might be different from the stack bounds to allow more
496 * flexibility while resizing, or {@code null} if they should be the
497 * same as the stack bounds.
498 * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
499 * When resizing, we usually "freeze" the layout of a task. To
500 * achieve that, we also need to "freeze" the insets, which
501 * gets achieved by changing task bounds but not bounds used
502 * to calculate the insets in this transient state
503 * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
504 * {@code null} if they should be the same as the stack bounds.
505 * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
506 * stacks.
507 * @throws RemoteException
508 */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000509 @UnsupportedAppUsage
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700510 void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
511 in Rect tempDockedTaskInsetBounds,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800512 in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000513 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800514 void removeStack(int stackId);
515 void makePackageIdle(String packageName, int userId);
516 int getMemoryTrimLevel();
Sudheer Shankaee148f92016-11-14 16:21:07 -0800517 boolean isVrModePackageEnabled(in ComponentName packageName);
Sudheer Shankaee148f92016-11-14 16:21:07 -0800518 void notifyLockedProfile(int userId);
Robin Lee5d592422017-01-18 13:48:15 +0000519 void startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options);
Andrei Onea4b2116c2019-02-28 15:13:42 +0000520 @UnsupportedAppUsage
Sudheer Shankaee148f92016-11-14 16:21:07 -0800521 void sendIdleJobTrigger();
Dianne Hackborn98305522017-05-05 17:53:53 -0700522 int sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code,
523 in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver,
Sudheer Shankaee148f92016-11-14 16:21:07 -0800524 in String requiredPermission, in Bundle options);
Suprabh Shukla4d64c092018-02-21 20:06:14 -0800525 boolean isBackgroundRestricted(in String packageName);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700526
527 // Start of N MR1 transactions
Sudheer Shankaee148f92016-11-14 16:21:07 -0800528 void setRenderThread(int tid);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700529 /**
530 * Lets activity manager know whether the calling process is currently showing "top-level" UI
531 * that is not an activity, i.e. windows on the screen the user is currently interacting with.
532 *
533 * <p>This flag can only be set for persistent processes.
534 *
535 * @param hasTopUi Whether the calling process has "top-level" UI.
536 */
Sudheer Shankaee148f92016-11-14 16:21:07 -0800537 void setHasTopUi(boolean hasTopUi);
Sudheer Shankafc46e9b2016-10-21 17:55:27 -0700538
539 // Start of O transactions
Andrew Scull85a63bc2016-10-24 13:47:47 +0100540 int restartUserInBackground(int userId);
Wale Ogunwalee1fe7fa22016-12-15 18:27:00 -0800541 /** Cancels the window transitions for the given task. */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000542 @UnsupportedAppUsage
Wale Ogunwalee1fe7fa22016-12-15 18:27:00 -0800543 void cancelTaskWindowTransition(int taskId);
Jorim Jaggi02886a82016-12-06 09:10:06 -0800544 /**
Svet Ganovfd31f852017-04-26 15:54:27 -0700545 * @param taskId the id of the task to retrieve the sAutoapshots for
Jorim Jaggi35e3f532017-03-17 17:06:50 +0100546 * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
547 * a reduced resolution of it, which is much faster
Jorim Jaggi02886a82016-12-06 09:10:06 -0800548 * @return a graphic buffer representing a screenshot of a task
549 */
Andrei Onea4b2116c2019-02-28 15:13:42 +0000550 @UnsupportedAppUsage
Jorim Jaggi35e3f532017-03-17 17:06:50 +0100551 ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
Mårten Kongstad49a4a1d2017-01-12 08:36:37 +0100552 void scheduleApplicationInfoChanged(in List<String> packageNames, int userId);
Craig Donnerdc4796c2017-03-08 09:51:47 -0800553 void setPersistentVrThread(int tid);
Mårten Kongstad49a4a1d2017-01-12 08:36:37 +0100554
Sudheer Shanka84a48952017-03-08 18:19:01 -0800555 void waitForNetworkStateUpdate(long procStateSeq);
Christopher Tate424b03f2017-04-04 14:23:44 -0700556 /**
557 * Add a bare uid to the background restrictions whitelist. Only the system uid may call this.
558 */
Charles Hee078db72017-10-19 18:03:20 +0100559 void backgroundWhitelistUid(int uid);
560
561 // Start of P transactions
Rajeev Kumar22d92b72018-02-07 18:38:36 -0800562 /**
563 * Similar to {@link #startUserInBackground(int userId), but with a listener to report
564 * user unlock progress.
565 */
566 boolean startUserInBackgroundWithListener(int userid, IProgressListener unlockProgressListener);
Svet Ganovd873ae62018-06-25 16:39:23 -0700567
568 /**
569 * Method for the shell UID to start deletating its permission identity to an
570 * active instrumenation. The shell can delegate permissions only to one active
571 * instrumentation at a time. An active instrumentation is one running and
572 * started from the shell.
573 */
Svet Ganov5e869592018-11-09 09:30:52 -0800574 void startDelegateShellPermissionIdentity(int uid, in String[] permissions);
Svet Ganovd873ae62018-06-25 16:39:23 -0700575
576 /**
577 * Method for the shell UID to stop deletating its permission identity to an
578 * active instrumenation. An active instrumentation is one running and
579 * started from the shell.
580 */
581 void stopDelegateShellPermissionIdentity();
Makoto Onukib4469f92019-02-19 15:55:44 -0800582
583 /** Returns a file descriptor that'll be closed when the system server process dies. */
584 ParcelFileDescriptor getLifeMonitor();
Keun-young Park42118d22019-02-19 15:16:29 -0800585
586 /**
587 * Start user, if it us not already running, and bring it to foreground.
588 * unlockProgressListener can be null if monitoring progress is not necessary.
589 */
590 boolean startUserInForegroundWithListener(int userid, IProgressListener unlockProgressListener);
Winson Chungb5c41b72016-12-07 15:00:47 -0800591}