• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 package android.app;
18 
19 import android.app.ActivityManager;
20 import android.app.ApplicationErrorReport;
21 import android.app.ContentProviderHolder;
22 import android.app.IApplicationThread;
23 import android.app.IActivityController;
24 import android.app.IAppTask;
25 import android.app.IInstrumentationWatcher;
26 import android.app.IProcessObserver;
27 import android.app.IServiceConnection;
28 import android.app.IStopUserCallback;
29 import android.app.ITaskStackListener;
30 import android.app.IUiAutomationConnection;
31 import android.app.IUidObserver;
32 import android.app.IUserSwitchObserver;
33 import android.app.Notification;
34 import android.app.PendingIntent;
35 import android.app.PictureInPictureParams;
36 import android.app.ProfilerInfo;
37 import android.app.WaitResult;
38 import android.app.assist.AssistContent;
39 import android.app.assist.AssistStructure;
40 import android.content.ComponentName;
41 import android.content.IIntentReceiver;
42 import android.content.IIntentSender;
43 import android.content.Intent;
44 import android.content.IntentFilter;
45 import android.content.IntentSender;
46 import android.content.pm.ApplicationInfo;
47 import android.content.pm.ConfigurationInfo;
48 import android.content.pm.IPackageDataObserver;
49 import android.content.pm.ParceledListSlice;
50 import android.content.pm.ProviderInfo;
51 import android.content.pm.UserInfo;
52 import android.content.res.Configuration;
53 import android.graphics.Bitmap;
54 import android.graphics.GraphicBuffer;
55 import android.graphics.Point;
56 import android.graphics.Rect;
57 import android.net.Uri;
58 import android.os.Bundle;
59 import android.os.Debug;
60 import android.os.IBinder;
61 import android.os.IProgressListener;
62 import android.os.ParcelFileDescriptor;
63 import android.os.PersistableBundle;
64 import android.os.StrictMode;
65 import android.service.voice.IVoiceInteractionSession;
66 import com.android.internal.app.IVoiceInteractor;
67 import com.android.internal.os.IResultReceiver;
68 import com.android.internal.policy.IKeyguardDismissCallback;
69 
70 import java.util.List;
71 
72 /**
73  * System private API for talking with the activity manager service.  This
74  * provides calls from the application back to the activity manager.
75  *
76  * {@hide}
77  */
78 interface IActivityManager {
79     // WARNING: when these transactions are updated, check if they are any callers on the native
80     // side. If so, make sure they are using the correct transaction ids and arguments.
81     // If a transaction which will also be used on the native side is being inserted, add it to
82     // below block of transactions.
83 
84     // Since these transactions are also called from native code, these must be kept in sync with
85     // the ones in frameworks/native/include/binder/IActivityManager.h
86     // =============== Beginning of transactions used on native side as well ======================
openContentUri(in String uriString)87     ParcelFileDescriptor openContentUri(in String uriString);
88     // =============== End of transactions used on native side as well ============================
89 
90     // Special low-level communication with activity manager.
handleApplicationCrash(in IBinder app, in ApplicationErrorReport.ParcelableCrashInfo crashInfo)91     void handleApplicationCrash(in IBinder app,
92             in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options)93     int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
94             in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
95             int flags, in ProfilerInfo profilerInfo, in Bundle options);
unhandledBack()96     void unhandledBack();
97 
finishActivity(in IBinder token, int code, in Intent data, int finishTask)98     boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
registerReceiver(in IApplicationThread caller, in String callerPackage, in IIntentReceiver receiver, in IntentFilter filter, in String requiredPermission, int userId, int flags)99     Intent registerReceiver(in IApplicationThread caller, in String callerPackage,
100             in IIntentReceiver receiver, in IntentFilter filter,
101             in String requiredPermission, int userId, int flags);
unregisterReceiver(in IIntentReceiver receiver)102     void unregisterReceiver(in IIntentReceiver receiver);
broadcastIntent(in IApplicationThread caller, in Intent intent, in String resolvedType, in IIntentReceiver resultTo, int resultCode, in String resultData, in Bundle map, in String[] requiredPermissions, int appOp, in Bundle options, boolean serialized, boolean sticky, int userId)103     int broadcastIntent(in IApplicationThread caller, in Intent intent,
104             in String resolvedType, in IIntentReceiver resultTo, int resultCode,
105             in String resultData, in Bundle map, in String[] requiredPermissions,
106             int appOp, in Bundle options, boolean serialized, boolean sticky, int userId);
unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId)107     void unbroadcastIntent(in IApplicationThread caller, in Intent intent, int userId);
finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map, boolean abortBroadcast, int flags)108     oneway void finishReceiver(in IBinder who, int resultCode, in String resultData, in Bundle map,
109             boolean abortBroadcast, int flags);
attachApplication(in IApplicationThread app)110     void attachApplication(in IApplicationThread app);
activityIdle(in IBinder token, in Configuration config, in boolean stopProfiling)111     oneway void activityIdle(in IBinder token, in Configuration config,
112             in boolean stopProfiling);
activityPaused(in IBinder token)113     void activityPaused(in IBinder token);
activityStopped(in IBinder token, in Bundle state, in PersistableBundle persistentState, in CharSequence description)114     oneway void activityStopped(in IBinder token, in Bundle state,
115             in PersistableBundle persistentState, in CharSequence description);
getCallingPackage(in IBinder token)116     String getCallingPackage(in IBinder token);
getCallingActivity(in IBinder token)117     ComponentName getCallingActivity(in IBinder token);
getTasks(int maxNum, int flags)118     List<ActivityManager.RunningTaskInfo> getTasks(int maxNum, int flags);
moveTaskToFront(int task, int flags, in Bundle options)119     void moveTaskToFront(int task, int flags, in Bundle options);
moveTaskBackwards(int task)120     void moveTaskBackwards(int task);
getTaskForActivity(in IBinder token, in boolean onlyRoot)121     int getTaskForActivity(in IBinder token, in boolean onlyRoot);
getContentProvider(in IApplicationThread caller, in String name, int userId, boolean stable)122     ContentProviderHolder getContentProvider(in IApplicationThread caller,
123             in String name, int userId, boolean stable);
publishContentProviders(in IApplicationThread caller, in List<ContentProviderHolder> providers)124     void publishContentProviders(in IApplicationThread caller,
125             in List<ContentProviderHolder> providers);
refContentProvider(in IBinder connection, int stableDelta, int unstableDelta)126     boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta);
finishSubActivity(in IBinder token, in String resultWho, int requestCode)127     void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
getRunningServiceControlPanel(in ComponentName service)128     PendingIntent getRunningServiceControlPanel(in ComponentName service);
startService(in IApplicationThread caller, in Intent service, in String resolvedType, boolean requireForeground, in String callingPackage, int userId)129     ComponentName startService(in IApplicationThread caller, in Intent service,
130             in String resolvedType, boolean requireForeground, in String callingPackage, int userId);
stopService(in IApplicationThread caller, in Intent service, in String resolvedType, int userId)131     int stopService(in IApplicationThread caller, in Intent service,
132             in String resolvedType, int userId);
bindService(in IApplicationThread caller, in IBinder token, in Intent service, in String resolvedType, in IServiceConnection connection, int flags, in String callingPackage, int userId)133     int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
134             in String resolvedType, in IServiceConnection connection, int flags,
135             in String callingPackage, int userId);
unbindService(in IServiceConnection connection)136     boolean unbindService(in IServiceConnection connection);
publishService(in IBinder token, in Intent intent, in IBinder service)137     void publishService(in IBinder token, in Intent intent, in IBinder service);
activityResumed(in IBinder token)138     void activityResumed(in IBinder token);
setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent)139     void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
setAlwaysFinish(boolean enabled)140     void setAlwaysFinish(boolean enabled);
startInstrumentation(in ComponentName className, in String profileFile, int flags, in Bundle arguments, in IInstrumentationWatcher watcher, in IUiAutomationConnection connection, int userId, in String abiOverride)141     boolean startInstrumentation(in ComponentName className, in String profileFile,
142             int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
143             in IUiAutomationConnection connection, int userId,
144             in String abiOverride);
addInstrumentationResults(in IApplicationThread target, in Bundle results)145     void addInstrumentationResults(in IApplicationThread target, in Bundle results);
finishInstrumentation(in IApplicationThread target, int resultCode, in Bundle results)146     void finishInstrumentation(in IApplicationThread target, int resultCode,
147             in Bundle results);
148     /**
149      * @return A copy of global {@link Configuration}, contains general settings for the entire
150      *         system. Corresponds to the configuration of the default display.
151      * @throws RemoteException
152      */
getConfiguration()153     Configuration getConfiguration();
154     /**
155      * Updates global configuration and applies changes to the entire system.
156      * @param values Update values for global configuration. If null is passed it will request the
157      *               Window Manager to compute new config for the default display.
158      * @throws RemoteException
159      * @return Returns true if the configuration was updated.
160      */
updateConfiguration(in Configuration values)161     boolean updateConfiguration(in Configuration values);
stopServiceToken(in ComponentName className, in IBinder token, int startId)162     boolean stopServiceToken(in ComponentName className, in IBinder token, int startId);
getActivityClassForToken(in IBinder token)163     ComponentName getActivityClassForToken(in IBinder token);
getPackageForToken(in IBinder token)164     String getPackageForToken(in IBinder token);
setProcessLimit(int max)165     void setProcessLimit(int max);
getProcessLimit()166     int getProcessLimit();
checkPermission(in String permission, int pid, int uid)167     int checkPermission(in String permission, int pid, int uid);
checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId, in IBinder callerToken)168     int checkUriPermission(in Uri uri, int pid, int uid, int mode, int userId,
169             in IBinder callerToken);
grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri, int mode, int userId)170     void grantUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
171             int mode, int userId);
revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri, int mode, int userId)172     void revokeUriPermission(in IApplicationThread caller, in String targetPkg, in Uri uri,
173             int mode, int userId);
setActivityController(in IActivityController watcher, boolean imAMonkey)174     void setActivityController(in IActivityController watcher, boolean imAMonkey);
showWaitingForDebugger(in IApplicationThread who, boolean waiting)175     void showWaitingForDebugger(in IApplicationThread who, boolean waiting);
176     /*
177      * This will deliver the specified signal to all the persistent processes. Currently only
178      * SIGUSR1 is delivered. All others are ignored.
179      */
signalPersistentProcesses(int signal)180     void signalPersistentProcesses(int signal);
getRecentTasks(int maxNum, int flags, int userId)181     ParceledListSlice getRecentTasks(int maxNum,
182             int flags, int userId);
serviceDoneExecuting(in IBinder token, int type, int startId, int res)183     oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res);
activityDestroyed(in IBinder token)184     oneway void activityDestroyed(in IBinder token);
getIntentSender(int type, in String packageName, in IBinder token, in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes, int flags, in Bundle options, int userId)185     IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
186             in String resultWho, int requestCode, in Intent[] intents, in String[] resolvedTypes,
187             int flags, in Bundle options, int userId);
cancelIntentSender(in IIntentSender sender)188     void cancelIntentSender(in IIntentSender sender);
getPackageForIntentSender(in IIntentSender sender)189     String getPackageForIntentSender(in IIntentSender sender);
registerIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver)190     void registerIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
unregisterIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver)191     void unregisterIntentSenderCancelListener(in IIntentSender sender, in IResultReceiver receiver);
enterSafeMode()192     void enterSafeMode();
startNextMatchingActivity(in IBinder callingActivity, in Intent intent, in Bundle options)193     boolean startNextMatchingActivity(in IBinder callingActivity,
194             in Intent intent, in Bundle options);
noteWakeupAlarm(in IIntentSender sender, int sourceUid, in String sourcePkg, in String tag)195     void noteWakeupAlarm(in IIntentSender sender, int sourceUid,
196             in String sourcePkg, in String tag);
removeContentProvider(in IBinder connection, boolean stable)197     void removeContentProvider(in IBinder connection, boolean stable);
setRequestedOrientation(in IBinder token, int requestedOrientation)198     void setRequestedOrientation(in IBinder token, int requestedOrientation);
getRequestedOrientation(in IBinder token)199     int getRequestedOrientation(in IBinder token);
unbindFinished(in IBinder token, in Intent service, boolean doRebind)200     void unbindFinished(in IBinder token, in Intent service, boolean doRebind);
setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason)201     void setProcessImportant(in IBinder token, int pid, boolean isForeground, String reason);
setServiceForeground(in ComponentName className, in IBinder token, int id, in Notification notification, int flags)202     void setServiceForeground(in ComponentName className, in IBinder token,
203             int id, in Notification notification, int flags);
moveActivityTaskToBack(in IBinder token, boolean nonRoot)204     boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
getMemoryInfo(out ActivityManager.MemoryInfo outInfo)205     void getMemoryInfo(out ActivityManager.MemoryInfo outInfo);
getProcessesInErrorState()206     List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
clearApplicationUserData(in String packageName, in IPackageDataObserver observer, int userId)207     boolean clearApplicationUserData(in String packageName,
208             in IPackageDataObserver observer, int userId);
forceStopPackage(in String packageName, int userId)209     void forceStopPackage(in String packageName, int userId);
killPids(in int[] pids, in String reason, boolean secure)210     boolean killPids(in int[] pids, in String reason, boolean secure);
getServices(int maxNum, int flags)211     List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags);
getTaskThumbnail(int taskId)212     ActivityManager.TaskThumbnail getTaskThumbnail(int taskId);
getTaskDescription(int taskId)213     ActivityManager.TaskDescription getTaskDescription(int taskId);
214     // Retrieve running application processes in the system
getRunningAppProcesses()215     List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
216     // Get device configuration
getDeviceConfigurationInfo()217     ConfigurationInfo getDeviceConfigurationInfo();
peekService(in Intent service, in String resolvedType, in String callingPackage)218     IBinder peekService(in Intent service, in String resolvedType, in String callingPackage);
219     // Turn on/off profiling in a particular process.
profileControl(in String process, int userId, boolean start, in ProfilerInfo profilerInfo, int profileType)220     boolean profileControl(in String process, int userId, boolean start,
221             in ProfilerInfo profilerInfo, int profileType);
shutdown(int timeout)222     boolean shutdown(int timeout);
stopAppSwitches()223     void stopAppSwitches();
resumeAppSwitches()224     void resumeAppSwitches();
bindBackupAgent(in String packageName, int backupRestoreMode, int userId)225     boolean bindBackupAgent(in String packageName, int backupRestoreMode, int userId);
backupAgentCreated(in String packageName, in IBinder agent)226     void backupAgentCreated(in String packageName, in IBinder agent);
unbindBackupAgent(in ApplicationInfo appInfo)227     void unbindBackupAgent(in ApplicationInfo appInfo);
getUidForIntentSender(in IIntentSender sender)228     int getUidForIntentSender(in IIntentSender sender);
handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll, boolean requireFull, in String name, in String callerPackage)229     int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
230             boolean requireFull, in String name, in String callerPackage);
addPackageDependency(in String packageName)231     void addPackageDependency(in String packageName);
killApplication(in String pkg, int appId, int userId, in String reason)232     void killApplication(in String pkg, int appId, int userId, in String reason);
closeSystemDialogs(in String reason)233     void closeSystemDialogs(in String reason);
getProcessMemoryInfo(in int[] pids)234     Debug.MemoryInfo[] getProcessMemoryInfo(in int[] pids);
killApplicationProcess(in String processName, int uid)235     void killApplicationProcess(in String processName, int uid);
startActivityIntentSender(in IApplicationThread caller, in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent, in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, int flagsMask, int flagsValues, in Bundle options)236     int startActivityIntentSender(in IApplicationThread caller,
237             in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent,
238             in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
239             int flagsMask, int flagsValues, in Bundle options);
overridePendingTransition(in IBinder token, in String packageName, int enterAnim, int exitAnim)240     void overridePendingTransition(in IBinder token, in String packageName,
241             int enterAnim, int exitAnim);
242     // Special low-level communication with activity manager.
handleApplicationWtf(in IBinder app, in String tag, boolean system, in ApplicationErrorReport.ParcelableCrashInfo crashInfo)243     boolean handleApplicationWtf(in IBinder app, in String tag, boolean system,
244             in ApplicationErrorReport.ParcelableCrashInfo crashInfo);
killBackgroundProcesses(in String packageName, int userId)245     void killBackgroundProcesses(in String packageName, int userId);
isUserAMonkey()246     boolean isUserAMonkey();
startActivityAndWait(in IApplicationThread caller, in String callingPackage, in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options, int userId)247     WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
248             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
249             int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
250             int userId);
willActivityBeVisible(in IBinder token)251     boolean willActivityBeVisible(in IBinder token);
startActivityWithConfig(in IApplicationThread caller, in String callingPackage, in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, int startFlags, in Configuration newConfig, in Bundle options, int userId)252     int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
253             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
254             int requestCode, int startFlags, in Configuration newConfig,
255             in Bundle options, int userId);
256     // Retrieve info of applications installed on external media that are currently
257     // running.
getRunningExternalApplications()258     List<ApplicationInfo> getRunningExternalApplications();
finishHeavyWeightApp()259     void finishHeavyWeightApp();
260     // A StrictMode violation to be handled.  The violationMask is a
261     // subset of the original StrictMode policy bitmask, with only the
262     // bit violated and penalty bits to be executed by the
263     // ActivityManagerService remaining set.
handleApplicationStrictModeViolation(in IBinder app, int violationMask, in StrictMode.ViolationInfo crashInfo)264     void handleApplicationStrictModeViolation(in IBinder app, int violationMask,
265             in StrictMode.ViolationInfo crashInfo);
isImmersive(in IBinder token)266     boolean isImmersive(in IBinder token);
setImmersive(in IBinder token, boolean immersive)267     void setImmersive(in IBinder token, boolean immersive);
isTopActivityImmersive()268     boolean isTopActivityImmersive();
crashApplication(int uid, int initialPid, in String packageName, int userId, in String message, boolean force)269     void crashApplication(int uid, int initialPid, in String packageName, int userId,
270             in String message, boolean force);
getProviderMimeType(in Uri uri, int userId)271     String getProviderMimeType(in Uri uri, int userId);
newUriPermissionOwner(in String name)272     IBinder newUriPermissionOwner(in String name);
grantUriPermissionFromOwner(in IBinder owner, int fromUid, in String targetPkg, in Uri uri, int mode, int sourceUserId, int targetUserId)273     void grantUriPermissionFromOwner(in IBinder owner, int fromUid, in String targetPkg,
274             in Uri uri, int mode, int sourceUserId, int targetUserId);
revokeUriPermissionFromOwner(in IBinder owner, in Uri uri, int mode, int userId)275     void revokeUriPermissionFromOwner(in IBinder owner, in Uri uri, int mode, int userId);
checkGrantUriPermission(int callingUid, in String targetPkg, in Uri uri, int modeFlags, int userId)276     int checkGrantUriPermission(int callingUid, in String targetPkg, in Uri uri,
277             int modeFlags, int userId);
278     // Cause the specified process to dump the specified heap.
dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo, boolean runGc, in String path, in ParcelFileDescriptor fd)279     boolean dumpHeap(in String process, int userId, boolean managed, boolean mallocInfo,
280             boolean runGc, in String path, in ParcelFileDescriptor fd);
startActivities(in IApplicationThread caller, in String callingPackage, in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo, in Bundle options, int userId)281     int startActivities(in IApplicationThread caller, in String callingPackage,
282             in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
283             in Bundle options, int userId);
isUserRunning(int userid, int flags)284     boolean isUserRunning(int userid, int flags);
activitySlept(in IBinder token)285     oneway void activitySlept(in IBinder token);
getFrontActivityScreenCompatMode()286     int getFrontActivityScreenCompatMode();
setFrontActivityScreenCompatMode(int mode)287     void setFrontActivityScreenCompatMode(int mode);
getPackageScreenCompatMode(in String packageName)288     int getPackageScreenCompatMode(in String packageName);
setPackageScreenCompatMode(in String packageName, int mode)289     void setPackageScreenCompatMode(in String packageName, int mode);
getPackageAskScreenCompat(in String packageName)290     boolean getPackageAskScreenCompat(in String packageName);
setPackageAskScreenCompat(in String packageName, boolean ask)291     void setPackageAskScreenCompat(in String packageName, boolean ask);
switchUser(int userid)292     boolean switchUser(int userid);
setFocusedTask(int taskId)293     void setFocusedTask(int taskId);
removeTask(int taskId)294     boolean removeTask(int taskId);
registerProcessObserver(in IProcessObserver observer)295     void registerProcessObserver(in IProcessObserver observer);
unregisterProcessObserver(in IProcessObserver observer)296     void unregisterProcessObserver(in IProcessObserver observer);
isIntentSenderTargetedToPackage(in IIntentSender sender)297     boolean isIntentSenderTargetedToPackage(in IIntentSender sender);
updatePersistentConfiguration(in Configuration values)298     void updatePersistentConfiguration(in Configuration values);
getProcessPss(in int[] pids)299     long[] getProcessPss(in int[] pids);
showBootMessage(in CharSequence msg, boolean always)300     void showBootMessage(in CharSequence msg, boolean always);
killAllBackgroundProcesses()301     void killAllBackgroundProcesses();
getContentProviderExternal(in String name, int userId, in IBinder token)302     ContentProviderHolder getContentProviderExternal(in String name, int userId,
303             in IBinder token);
removeContentProviderExternal(in String name, in IBinder token)304     void removeContentProviderExternal(in String name, in IBinder token);
305     // Get memory information about the calling process.
getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo)306     void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo);
killProcessesBelowForeground(in String reason)307     boolean killProcessesBelowForeground(in String reason);
getCurrentUser()308     UserInfo getCurrentUser();
shouldUpRecreateTask(in IBinder token, in String destAffinity)309     boolean shouldUpRecreateTask(in IBinder token, in String destAffinity);
navigateUpTo(in IBinder token, in Intent target, int resultCode, in Intent resultData)310     boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
311             in Intent resultData);
312     /**
313      * Informs ActivityManagerService that the keyguard is showing.
314      *
315      * @param showing True if the keyguard is showing, false otherwise.
316      * @param secondaryDisplayShowing The displayId of the secondary display on which the keyguard
317      *        is showing, or INVALID_DISPLAY if there is no such display. Only meaningful if
318      *        showing is true.
319      */
setLockScreenShown(boolean showing, int secondaryDisplayShowing)320     void setLockScreenShown(boolean showing, int secondaryDisplayShowing);
finishActivityAffinity(in IBinder token)321     boolean finishActivityAffinity(in IBinder token);
322     // This is not public because you need to be very careful in how you
323     // manage your activity to make sure it is always the uid you expect.
getLaunchedFromUid(in IBinder activityToken)324     int getLaunchedFromUid(in IBinder activityToken);
unstableProviderDied(in IBinder connection)325     void unstableProviderDied(in IBinder connection);
isIntentSenderAnActivity(in IIntentSender sender)326     boolean isIntentSenderAnActivity(in IIntentSender sender);
startActivityAsUser(in IApplicationThread caller, in String callingPackage, in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options, int userId)327     int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
328             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
329             int requestCode, int flags, in ProfilerInfo profilerInfo,
330             in Bundle options, int userId);
stopUser(int userid, boolean force, in IStopUserCallback callback)331     int stopUser(int userid, boolean force, in IStopUserCallback callback);
registerUserSwitchObserver(in IUserSwitchObserver observer, in String name)332     void registerUserSwitchObserver(in IUserSwitchObserver observer, in String name);
unregisterUserSwitchObserver(in IUserSwitchObserver observer)333     void unregisterUserSwitchObserver(in IUserSwitchObserver observer);
getRunningUserIds()334     int[] getRunningUserIds();
335 
336     // Deprecated - This method is only used by a few internal components and it will soon be
337     // replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
338     // No new code should be calling it.
requestBugReport(int bugreportType)339     void requestBugReport(int bugreportType);
340 
341     /**
342      *  Takes a telephony bug report and notifies the user with the title and description
343      *  that are passed to this API as parameters
344      *
345      *  @param shareTitle should be a valid legible string less than 50 chars long
346      *  @param shareDescription should be less than 91 bytes when encoded into UTF-8 format
347      *
348      *  @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the
349      *          paremeters cannot be encoding to an UTF-8 charset.
350      */
requestTelephonyBugReport(in String shareTitle, in String shareDescription)351     void requestTelephonyBugReport(in String shareTitle, in String shareDescription);
352 
inputDispatchingTimedOut(int pid, boolean aboveSystem, in String reason)353     long inputDispatchingTimedOut(int pid, boolean aboveSystem, in String reason);
clearPendingBackup()354     void clearPendingBackup();
getIntentForIntentSender(in IIntentSender sender)355     Intent getIntentForIntentSender(in IIntentSender sender);
getAssistContextExtras(int requestType)356     Bundle getAssistContextExtras(int requestType);
reportAssistContextExtras(in IBinder token, in Bundle extras, in AssistStructure structure, in AssistContent content, in Uri referrer)357     void reportAssistContextExtras(in IBinder token, in Bundle extras,
358             in AssistStructure structure, in AssistContent content, in Uri referrer);
359     // This is not public because you need to be very careful in how you
360     // manage your activity to make sure it is always the uid you expect.
getLaunchedFromPackage(in IBinder activityToken)361     String getLaunchedFromPackage(in IBinder activityToken);
killUid(int appId, int userId, in String reason)362     void killUid(int appId, int userId, in String reason);
setUserIsMonkey(boolean monkey)363     void setUserIsMonkey(boolean monkey);
hang(in IBinder who, boolean allowRestart)364     void hang(in IBinder who, boolean allowRestart);
moveTaskToStack(int taskId, int stackId, boolean toTop)365     void moveTaskToStack(int taskId, int stackId, boolean toTop);
366     /**
367      * Resizes the input stack id to the given bounds.
368      *
369      * @param stackId Id of the stack to resize.
370      * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
371      * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
372      *                                active.
373      * @param preserveWindows True if the windows of activities contained in the stack should be
374      *                        preserved.
375      * @param animate True if the stack resize should be animated.
376      * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
377      *                          default animation duration should be used.
378      * @throws RemoteException
379      */
resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate, int animationDuration)380     void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
381             boolean preserveWindows, boolean animate, int animationDuration);
getAllStackInfos()382     List<ActivityManager.StackInfo> getAllStackInfos();
setFocusedStack(int stackId)383     void setFocusedStack(int stackId);
getStackInfo(int stackId)384     ActivityManager.StackInfo getStackInfo(int stackId);
convertFromTranslucent(in IBinder token)385     boolean convertFromTranslucent(in IBinder token);
convertToTranslucent(in IBinder token, in Bundle options)386     boolean convertToTranslucent(in IBinder token, in Bundle options);
notifyActivityDrawn(in IBinder token)387     void notifyActivityDrawn(in IBinder token);
reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle)388     void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
restart()389     void restart();
performIdleMaintenance()390     void performIdleMaintenance();
takePersistableUriPermission(in Uri uri, int modeFlags, int userId)391     void takePersistableUriPermission(in Uri uri, int modeFlags, int userId);
releasePersistableUriPermission(in Uri uri, int modeFlags, int userId)392     void releasePersistableUriPermission(in Uri uri, int modeFlags, int userId);
getPersistedUriPermissions(in String packageName, boolean incoming)393     ParceledListSlice getPersistedUriPermissions(in String packageName, boolean incoming);
appNotRespondingViaProvider(in IBinder connection)394     void appNotRespondingViaProvider(in IBinder connection);
getTaskBounds(int taskId)395     Rect getTaskBounds(int taskId);
getActivityDisplayId(in IBinder activityToken)396     int getActivityDisplayId(in IBinder activityToken);
setProcessMemoryTrimLevel(in String process, int uid, int level)397     boolean setProcessMemoryTrimLevel(in String process, int uid, int level);
398 
399 
400     // Start of L transactions
getTagForIntentSender(in IIntentSender sender, in String prefix)401     String getTagForIntentSender(in IIntentSender sender, in String prefix);
startUserInBackground(int userid)402     boolean startUserInBackground(int userid);
startLockTaskModeById(int taskId)403     void startLockTaskModeById(int taskId);
startLockTaskModeByToken(in IBinder token)404     void startLockTaskModeByToken(in IBinder token);
stopLockTaskMode()405     void stopLockTaskMode();
isInLockTaskMode()406     boolean isInLockTaskMode();
setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values)407     void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values);
startVoiceActivity(in String callingPackage, int callingPid, int callingUid, in Intent intent, in String resolvedType, in IVoiceInteractionSession session, in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo, in Bundle options, int userId)408     int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
409             in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
410             in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
411             in Bundle options, int userId);
startAssistantActivity(in String callingPackage, int callingPid, int callingUid, in Intent intent, in String resolvedType, in Bundle options, int userId)412     int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
413             in Intent intent, in String resolvedType, in Bundle options, int userId);
getActivityOptions(in IBinder token)414     Bundle getActivityOptions(in IBinder token);
getAppTasks(in String callingPackage)415     List<IBinder> getAppTasks(in String callingPackage);
startSystemLockTaskMode(int taskId)416     void startSystemLockTaskMode(int taskId);
stopSystemLockTaskMode()417     void stopSystemLockTaskMode();
finishVoiceTask(in IVoiceInteractionSession session)418     void finishVoiceTask(in IVoiceInteractionSession session);
isTopOfTask(in IBinder token)419     boolean isTopOfTask(in IBinder token);
notifyLaunchTaskBehindComplete(in IBinder token)420     void notifyLaunchTaskBehindComplete(in IBinder token);
startActivityFromRecents(int taskId, in Bundle options)421     int startActivityFromRecents(int taskId, in Bundle options);
notifyEnterAnimationComplete(in IBinder token)422     void notifyEnterAnimationComplete(in IBinder token);
startActivityAsCaller(in IApplicationThread caller, in String callingPackage, in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options, boolean ignoreTargetSecurity, int userId)423     int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
424             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
425             int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
426             boolean ignoreTargetSecurity, int userId);
addAppTask(in IBinder activityToken, in Intent intent, in ActivityManager.TaskDescription description, in Bitmap thumbnail)427     int addAppTask(in IBinder activityToken, in Intent intent,
428             in ActivityManager.TaskDescription description, in Bitmap thumbnail);
getAppTaskThumbnailSize()429     Point getAppTaskThumbnailSize();
releaseActivityInstance(in IBinder token)430     boolean releaseActivityInstance(in IBinder token);
releaseSomeActivities(in IApplicationThread app)431     void releaseSomeActivities(in IApplicationThread app);
bootAnimationComplete()432     void bootAnimationComplete();
getTaskDescriptionIcon(in String filename, int userId)433     Bitmap getTaskDescriptionIcon(in String filename, int userId);
launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle, in Bundle args)434     boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
435             in Bundle args);
startInPlaceAnimationOnFrontMostApplication(in Bundle opts)436     void startInPlaceAnimationOnFrontMostApplication(in Bundle opts);
checkPermissionWithToken(in String permission, int pid, int uid, in IBinder callerToken)437     int checkPermissionWithToken(in String permission, int pid, int uid,
438             in IBinder callerToken);
registerTaskStackListener(in ITaskStackListener listener)439     void registerTaskStackListener(in ITaskStackListener listener);
440 
441 
442     // Start of M transactions
notifyCleartextNetwork(int uid, in byte[] firstPacket)443     void notifyCleartextNetwork(int uid, in byte[] firstPacket);
createStackOnDisplay(int displayId)444     int createStackOnDisplay(int displayId);
getFocusedStackId()445     int getFocusedStackId();
setTaskResizeable(int taskId, int resizeableMode)446     void setTaskResizeable(int taskId, int resizeableMode);
requestAssistContextExtras(int requestType, in IResultReceiver receiver, in Bundle receiverExtras, in IBinder activityToken, boolean focused, boolean newSessionId)447     boolean requestAssistContextExtras(int requestType, in IResultReceiver receiver,
448             in Bundle receiverExtras, in IBinder activityToken,
449             boolean focused, boolean newSessionId);
resizeTask(int taskId, in Rect bounds, int resizeMode)450     void resizeTask(int taskId, in Rect bounds, int resizeMode);
getLockTaskModeState()451     int getLockTaskModeState();
setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize, in String reportPackage)452     void setDumpHeapDebugLimit(in String processName, int uid, long maxMemSize,
453             in String reportPackage);
dumpHeapFinished(in String path)454     void dumpHeapFinished(in String path);
setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake)455     void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
updateLockTaskPackages(int userId, in String[] packages)456     void updateLockTaskPackages(int userId, in String[] packages);
noteAlarmStart(in IIntentSender sender, int sourceUid, in String tag)457     void noteAlarmStart(in IIntentSender sender, int sourceUid, in String tag);
noteAlarmFinish(in IIntentSender sender, int sourceUid, in String tag)458     void noteAlarmFinish(in IIntentSender sender, int sourceUid, in String tag);
getPackageProcessState(in String packageName, in String callingPackage)459     int getPackageProcessState(in String packageName, in String callingPackage);
showLockTaskEscapeMessage(in IBinder token)460     oneway void showLockTaskEscapeMessage(in IBinder token);
updateDeviceOwner(in String packageName)461     void updateDeviceOwner(in String packageName);
462     /**
463      * Notify the system that the keyguard is going away.
464      *
465      * @param flags See {@link android.view.WindowManagerPolicy#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
466      *              etc.
467      */
keyguardGoingAway(int flags)468     void keyguardGoingAway(int flags);
getUidProcessState(int uid, in String callingPackage)469     int getUidProcessState(int uid, in String callingPackage);
registerUidObserver(in IUidObserver observer, int which, int cutpoint, String callingPackage)470     void registerUidObserver(in IUidObserver observer, int which, int cutpoint,
471             String callingPackage);
unregisterUidObserver(in IUidObserver observer)472     void unregisterUidObserver(in IUidObserver observer);
isAssistDataAllowedOnCurrentActivity()473     boolean isAssistDataAllowedOnCurrentActivity();
showAssistFromActivity(in IBinder token, in Bundle args)474     boolean showAssistFromActivity(in IBinder token, in Bundle args);
isRootVoiceInteraction(in IBinder token)475     boolean isRootVoiceInteraction(in IBinder token);
476 
477 
478     // Start of N transactions
479     // Start Binder transaction tracking for all applications.
startBinderTracking()480     boolean startBinderTracking();
481     // Stop Binder transaction tracking for all applications and dump trace data to the given file
482     // descriptor.
stopBinderTrackingAndDump(in ParcelFileDescriptor fd)483     boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
484     /**
485      * Try to place task to provided position. The final position might be different depending on
486      * current user and stacks state. The task will be moved to target stack if it's currently in
487      * different stack.
488      */
positionTaskInStack(int taskId, int stackId, int position)489     void positionTaskInStack(int taskId, int stackId, int position);
getActivityStackId(in IBinder token)490     int getActivityStackId(in IBinder token);
exitFreeformMode(in IBinder token)491     void exitFreeformMode(in IBinder token);
reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration, in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations)492     void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
493             in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, in Rect initialBounds)494     boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate,
495             in Rect initialBounds);
suppressResizeConfigChanges(boolean suppress)496     void suppressResizeConfigChanges(boolean suppress);
moveTasksToFullscreenStack(int fromStackId, boolean onTop)497     void moveTasksToFullscreenStack(int fromStackId, boolean onTop);
moveTopActivityToPinnedStack(int stackId, in Rect bounds)498     boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
isAppStartModeDisabled(int uid, in String packageName)499     boolean isAppStartModeDisabled(int uid, in String packageName);
unlockUser(int userid, in byte[] token, in byte[] secret, in IProgressListener listener)500     boolean unlockUser(int userid, in byte[] token, in byte[] secret,
501             in IProgressListener listener);
isInMultiWindowMode(in IBinder token)502     boolean isInMultiWindowMode(in IBinder token);
isInPictureInPictureMode(in IBinder token)503     boolean isInPictureInPictureMode(in IBinder token);
killPackageDependents(in String packageName, int userId)504     void killPackageDependents(in String packageName, int userId);
enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params)505     boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
setPictureInPictureParams(in IBinder token, in PictureInPictureParams params)506     void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
getMaxNumPictureInPictureActions(in IBinder token)507     int getMaxNumPictureInPictureActions(in IBinder token);
activityRelaunched(in IBinder token)508     void activityRelaunched(in IBinder token);
getUriPermissionOwnerForActivity(in IBinder activityToken)509     IBinder getUriPermissionOwnerForActivity(in IBinder activityToken);
510     /**
511      * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
512      *
513      * @param dockedBounds The bounds for the docked stack.
514      * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
515      *                             might be different from the stack bounds to allow more
516      *                             flexibility while resizing, or {@code null} if they should be the
517      *                             same as the stack bounds.
518      * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
519      *                                  When resizing, we usually "freeze" the layout of a task. To
520      *                                  achieve that, we also need to "freeze" the insets, which
521      *                                  gets achieved by changing task bounds but not bounds used
522      *                                  to calculate the insets in this transient state
523      * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
524      *                            {@code null} if they should be the same as the stack bounds.
525      * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
526      *                                 stacks.
527      * @throws RemoteException
528      */
resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds, in Rect tempDockedTaskInsetBounds, in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds)529     void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
530             in Rect tempDockedTaskInsetBounds,
531             in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
setVrMode(in IBinder token, boolean enabled, in ComponentName packageName)532     int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
533     // Gets the URI permissions granted to an arbitrary package.
534     // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package
535     // granted to another packages (instead of those granted to it).
getGrantedUriPermissions(in String packageName, int userId)536     ParceledListSlice getGrantedUriPermissions(in String packageName, int userId);
537     // Clears the URI permissions granted to an arbitrary package.
clearGrantedUriPermissions(in String packageName, int userId)538     void clearGrantedUriPermissions(in String packageName, int userId);
isAppForeground(int uid)539     boolean isAppForeground(int uid);
startLocalVoiceInteraction(in IBinder token, in Bundle options)540     void startLocalVoiceInteraction(in IBinder token, in Bundle options);
stopLocalVoiceInteraction(in IBinder token)541     void stopLocalVoiceInteraction(in IBinder token);
supportsLocalVoiceInteraction()542     boolean supportsLocalVoiceInteraction();
notifyPinnedStackAnimationStarted()543     void notifyPinnedStackAnimationStarted();
notifyPinnedStackAnimationEnded()544     void notifyPinnedStackAnimationEnded();
removeStack(int stackId)545     void removeStack(int stackId);
makePackageIdle(String packageName, int userId)546     void makePackageIdle(String packageName, int userId);
getMemoryTrimLevel()547     int getMemoryTrimLevel();
548     /**
549      * Resizes the pinned stack.
550      *
551      * @param pinnedBounds The bounds for the pinned stack.
552      * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
553      *                             might be different from the stack bounds to allow more
554      *                             flexibility while resizing, or {@code null} if they should be the
555      *                             same as the stack bounds.
556      */
resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds)557     void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
isVrModePackageEnabled(in ComponentName packageName)558     boolean isVrModePackageEnabled(in ComponentName packageName);
559     /**
560      * Moves all tasks from the docked stack in the fullscreen stack and puts the top task of the
561      * fullscreen stack into the docked stack.
562      */
swapDockedAndFullscreenStack()563     void swapDockedAndFullscreenStack();
notifyLockedProfile(int userId)564     void notifyLockedProfile(int userId);
startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options)565     void startConfirmDeviceCredentialIntent(in Intent intent, in Bundle options);
sendIdleJobTrigger()566     void sendIdleJobTrigger();
sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code, in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver, in String requiredPermission, in Bundle options)567     int sendIntentSender(in IIntentSender target, in IBinder whitelistToken, int code,
568             in Intent intent, in String resolvedType, in IIntentReceiver finishedReceiver,
569             in String requiredPermission, in Bundle options);
570 
571 
572     // Start of N MR1 transactions
setVrThread(int tid)573     void setVrThread(int tid);
setRenderThread(int tid)574     void setRenderThread(int tid);
575     /**
576      * Lets activity manager know whether the calling process is currently showing "top-level" UI
577      * that is not an activity, i.e. windows on the screen the user is currently interacting with.
578      *
579      * <p>This flag can only be set for persistent processes.
580      *
581      * @param hasTopUi Whether the calling process has "top-level" UI.
582      */
setHasTopUi(boolean hasTopUi)583     void setHasTopUi(boolean hasTopUi);
584 
585     // Start of O transactions
requestActivityRelaunch(in IBinder token)586     void requestActivityRelaunch(in IBinder token);
587     /**
588      * Updates override configuration applied to specific display.
589      * @param values Update values for display configuration. If null is passed it will request the
590      *               Window Manager to compute new config for the specified display.
591      * @param displayId Id of the display to apply the config to.
592      * @throws RemoteException
593      * @return Returns true if the configuration was updated.
594      */
updateDisplayOverrideConfiguration(in Configuration values, int displayId)595     boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId);
unregisterTaskStackListener(ITaskStackListener listener)596     void unregisterTaskStackListener(ITaskStackListener listener);
moveStackToDisplay(int stackId, int displayId)597     void moveStackToDisplay(int stackId, int displayId);
requestAutofillData(in IResultReceiver receiver, in Bundle receiverExtras, in IBinder activityToken, int flags)598     boolean requestAutofillData(in IResultReceiver receiver, in Bundle receiverExtras,
599                                 in IBinder activityToken, int flags);
dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback)600     void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback);
restartUserInBackground(int userId)601     int restartUserInBackground(int userId);
602 
603     /** Cancels the window transitions for the given task. */
cancelTaskWindowTransition(int taskId)604     void cancelTaskWindowTransition(int taskId);
605 
606     /** Cancels the thumbnail transitions for the given task. */
cancelTaskThumbnailTransition(int taskId)607     void cancelTaskThumbnailTransition(int taskId);
608 
609     /**
610      * @param taskId the id of the task to retrieve the sAutoapshots for
611      * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
612      *                          a reduced resolution of it, which is much faster
613      * @return a graphic buffer representing a screenshot of a task
614      */
getTaskSnapshot(int taskId, boolean reducedResolution)615     ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
616 
scheduleApplicationInfoChanged(in List<String> packageNames, int userId)617     void scheduleApplicationInfoChanged(in List<String> packageNames, int userId);
setPersistentVrThread(int tid)618     void setPersistentVrThread(int tid);
619 
waitForNetworkStateUpdate(long procStateSeq)620     void waitForNetworkStateUpdate(long procStateSeq);
621 
622     /**
623      * See {@link android.app.Activity#setDisablePreviewScreenshots}
624      */
setDisablePreviewScreenshots(IBinder token, boolean disable)625     void setDisablePreviewScreenshots(IBinder token, boolean disable);
626 
627     /**
628      * Return the user id of last resumed activity.
629      */
getLastResumedActivityUserId()630     int getLastResumedActivityUserId();
631 
632     /**
633      * Add a bare uid to the background restrictions whitelist.  Only the system uid may call this.
634      */
backgroundWhitelistUid(int uid)635      void backgroundWhitelistUid(int uid);
636 
637     // WARNING: when these transactions are updated, check if they are any callers on the native
638     // side. If so, make sure they are using the correct transaction ids and arguments.
639     // If a transaction which will also be used on the native side is being inserted, add it
640     // alongside with other transactions of this kind at the top of this file.
641 
setShowWhenLocked(in IBinder token, boolean showWhenLocked)642      void setShowWhenLocked(in IBinder token, boolean showWhenLocked);
setTurnScreenOn(in IBinder token, boolean turnScreenOn)643      void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
644 }
645