• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2006 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.annotation.UserIdInt;
20 import android.app.ActivityManager.RunningServiceInfo;
21 import android.app.ActivityManager.RunningTaskInfo;
22 import android.app.ActivityManager.StackInfo;
23 import android.app.assist.AssistContent;
24 import android.app.assist.AssistStructure;
25 import android.content.ComponentName;
26 import android.content.ContentProviderNative;
27 import android.content.IContentProvider;
28 import android.content.IIntentReceiver;
29 import android.content.IIntentSender;
30 import android.content.Intent;
31 import android.content.IntentFilter;
32 import android.content.IntentSender;
33 import android.content.UriPermission;
34 import android.content.pm.ApplicationInfo;
35 import android.content.pm.ConfigurationInfo;
36 import android.content.pm.IPackageDataObserver;
37 import android.content.pm.PackageManager.NameNotFoundException;
38 import android.content.pm.ParceledListSlice;
39 import android.content.pm.ProviderInfo;
40 import android.content.pm.UserInfo;
41 import android.content.res.Configuration;
42 import android.graphics.Bitmap;
43 import android.graphics.Point;
44 import android.graphics.Rect;
45 import android.net.Uri;
46 import android.os.Bundle;
47 import android.os.Debug;
48 import android.os.IBinder;
49 import android.os.IInterface;
50 import android.os.IProgressListener;
51 import android.os.Parcel;
52 import android.os.ParcelFileDescriptor;
53 import android.os.Parcelable;
54 import android.os.PersistableBundle;
55 import android.os.RemoteException;
56 import android.os.StrictMode;
57 import android.service.voice.IVoiceInteractionSession;
58 import com.android.internal.app.IVoiceInteractor;
59 import com.android.internal.os.IResultReceiver;
60 
61 import java.util.List;
62 
63 /**
64  * System private API for talking with the activity manager service.  This
65  * provides calls from the application back to the activity manager.
66  *
67  * {@hide}
68  */
69 public interface IActivityManager extends IInterface {
startActivity(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options)70     public int startActivity(IApplicationThread caller, String callingPackage, Intent intent,
71             String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags,
72             ProfilerInfo profilerInfo, Bundle options) throws RemoteException;
startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options, int userId)73     public int startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent,
74             String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags,
75             ProfilerInfo profilerInfo, Bundle options, int userId) throws RemoteException;
startActivityAsCaller(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options, boolean ignoreTargetSecurity, int userId)76     public int startActivityAsCaller(IApplicationThread caller, String callingPackage,
77             Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
78             int flags, ProfilerInfo profilerInfo, Bundle options, boolean ignoreTargetSecurity,
79             int userId) throws RemoteException;
startActivityAndWait(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options, int userId)80     public WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
81             Intent intent, String resolvedType, IBinder resultTo, String resultWho,
82             int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options,
83             int userId) throws RemoteException;
startActivityWithConfig(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, Configuration newConfig, Bundle options, int userId)84     public int startActivityWithConfig(IApplicationThread caller, String callingPackage,
85             Intent intent, String resolvedType, IBinder resultTo, String resultWho,
86             int requestCode, int startFlags, Configuration newConfig,
87             Bundle options, int userId) throws RemoteException;
startActivityIntentSender(IApplicationThread caller, IntentSender intent, Intent fillInIntent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flagsMask, int flagsValues, Bundle options)88     public int startActivityIntentSender(IApplicationThread caller,
89             IntentSender intent, Intent fillInIntent, String resolvedType,
90             IBinder resultTo, String resultWho, int requestCode,
91             int flagsMask, int flagsValues, Bundle options) throws RemoteException;
startVoiceActivity(String callingPackage, int callingPid, int callingUid, Intent intent, String resolvedType, IVoiceInteractionSession session, IVoiceInteractor interactor, int flags, ProfilerInfo profilerInfo, Bundle options, int userId)92     public int startVoiceActivity(String callingPackage, int callingPid, int callingUid,
93             Intent intent, String resolvedType, IVoiceInteractionSession session,
94             IVoiceInteractor interactor, int flags, ProfilerInfo profilerInfo, Bundle options,
95             int userId) throws RemoteException;
startNextMatchingActivity(IBinder callingActivity, Intent intent, Bundle options)96     public boolean startNextMatchingActivity(IBinder callingActivity,
97             Intent intent, Bundle options) throws RemoteException;
startActivityFromRecents(int taskId, Bundle options)98     public int startActivityFromRecents(int taskId, Bundle options)
99             throws RemoteException;
finishActivity(IBinder token, int code, Intent data, int finishTask)100     public boolean finishActivity(IBinder token, int code, Intent data, int finishTask)
101             throws RemoteException;
finishSubActivity(IBinder token, String resultWho, int requestCode)102     public void finishSubActivity(IBinder token, String resultWho, int requestCode) throws RemoteException;
finishActivityAffinity(IBinder token)103     public boolean finishActivityAffinity(IBinder token) throws RemoteException;
finishVoiceTask(IVoiceInteractionSession session)104     public void finishVoiceTask(IVoiceInteractionSession session) throws RemoteException;
releaseActivityInstance(IBinder token)105     public boolean releaseActivityInstance(IBinder token) throws RemoteException;
releaseSomeActivities(IApplicationThread app)106     public void releaseSomeActivities(IApplicationThread app) throws RemoteException;
willActivityBeVisible(IBinder token)107     public boolean willActivityBeVisible(IBinder token) throws RemoteException;
registerReceiver(IApplicationThread caller, String callerPackage, IIntentReceiver receiver, IntentFilter filter, String requiredPermission, int userId)108     public Intent registerReceiver(IApplicationThread caller, String callerPackage,
109             IIntentReceiver receiver, IntentFilter filter,
110             String requiredPermission, int userId) throws RemoteException;
unregisterReceiver(IIntentReceiver receiver)111     public void unregisterReceiver(IIntentReceiver receiver) throws RemoteException;
broadcastIntent(IApplicationThread caller, Intent intent, String resolvedType, IIntentReceiver resultTo, int resultCode, String resultData, Bundle map, String[] requiredPermissions, int appOp, Bundle options, boolean serialized, boolean sticky, int userId)112     public int broadcastIntent(IApplicationThread caller, Intent intent,
113             String resolvedType, IIntentReceiver resultTo, int resultCode,
114             String resultData, Bundle map, String[] requiredPermissions,
115             int appOp, Bundle options, boolean serialized, boolean sticky, int userId) throws RemoteException;
unbroadcastIntent(IApplicationThread caller, Intent intent, int userId)116     public void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId) throws RemoteException;
finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast, int flags)117     public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map,
118             boolean abortBroadcast, int flags) throws RemoteException;
attachApplication(IApplicationThread app)119     public void attachApplication(IApplicationThread app) throws RemoteException;
activityResumed(IBinder token)120     public void activityResumed(IBinder token) throws RemoteException;
activityIdle(IBinder token, Configuration config, boolean stopProfiling)121     public void activityIdle(IBinder token, Configuration config,
122             boolean stopProfiling) throws RemoteException;
activityPaused(IBinder token)123     public void activityPaused(IBinder token) throws RemoteException;
activityStopped(IBinder token, Bundle state, PersistableBundle persistentState, CharSequence description)124     public void activityStopped(IBinder token, Bundle state,
125             PersistableBundle persistentState, CharSequence description) throws RemoteException;
activitySlept(IBinder token)126     public void activitySlept(IBinder token) throws RemoteException;
activityDestroyed(IBinder token)127     public void activityDestroyed(IBinder token) throws RemoteException;
activityRelaunched(IBinder token)128     public void activityRelaunched(IBinder token) throws RemoteException;
reportSizeConfigurations(IBinder token, int[] horizontalSizeConfiguration, int[] verticalSizeConfigurations, int[] smallestWidthConfigurations)129     public void reportSizeConfigurations(IBinder token, int[] horizontalSizeConfiguration,
130             int[] verticalSizeConfigurations, int[] smallestWidthConfigurations)
131             throws RemoteException;
getCallingPackage(IBinder token)132     public String getCallingPackage(IBinder token) throws RemoteException;
getCallingActivity(IBinder token)133     public ComponentName getCallingActivity(IBinder token) throws RemoteException;
getAppTasks(String callingPackage)134     public List<IAppTask> getAppTasks(String callingPackage) throws RemoteException;
addAppTask(IBinder activityToken, Intent intent, ActivityManager.TaskDescription description, Bitmap thumbnail)135     public int addAppTask(IBinder activityToken, Intent intent,
136             ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException;
getAppTaskThumbnailSize()137     public Point getAppTaskThumbnailSize() throws RemoteException;
getTasks(int maxNum, int flags)138     public List<RunningTaskInfo> getTasks(int maxNum, int flags) throws RemoteException;
getRecentTasks(int maxNum, int flags, int userId)139     public ParceledListSlice<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum,
140             int flags, int userId) throws RemoteException;
getTaskThumbnail(int taskId)141     public ActivityManager.TaskThumbnail getTaskThumbnail(int taskId) throws RemoteException;
getServices(int maxNum, int flags)142     public List<RunningServiceInfo> getServices(int maxNum, int flags) throws RemoteException;
getProcessesInErrorState()143     public List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState()
144             throws RemoteException;
moveTaskToFront(int task, int flags, Bundle options)145     public void moveTaskToFront(int task, int flags, Bundle options) throws RemoteException;
moveActivityTaskToBack(IBinder token, boolean nonRoot)146     public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) throws RemoteException;
moveTaskBackwards(int task)147     public void moveTaskBackwards(int task) throws RemoteException;
moveTaskToStack(int taskId, int stackId, boolean toTop)148     public void moveTaskToStack(int taskId, int stackId, boolean toTop) throws RemoteException;
moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate, Rect initialBounds, boolean moveHomeStackFront)149     public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate,
150             Rect initialBounds, boolean moveHomeStackFront) throws RemoteException;
moveTopActivityToPinnedStack(int stackId, Rect bounds)151     public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) throws RemoteException;
152 
153     /**
154      * Resizes the input stack id to the given bounds.
155      *
156      * @param stackId Id of the stack to resize.
157      * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
158      * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
159      *                                active.
160      * @param preserveWindows True if the windows of activities contained in the stack should be
161      *                        preserved.
162      * @param animate True if the stack resize should be animated.
163      * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
164      *                          default animation duration should be used.
165      * @throws RemoteException
166      */
resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode, boolean preserveWindows, boolean animate, int animationDuration)167     public void resizeStack(int stackId, Rect bounds, boolean allowResizeInDockedMode,
168             boolean preserveWindows, boolean animate, int animationDuration) throws RemoteException;
169 
170     /**
171      * Moves all tasks from the docked stack in the fullscreen stack and puts the top task of the
172      * fullscreen stack into the docked stack.
173      */
swapDockedAndFullscreenStack()174     public void swapDockedAndFullscreenStack() throws RemoteException;
175 
176     /**
177      * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
178      *
179      * @param dockedBounds The bounds for the docked stack.
180      * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
181      *                             might be different from the stack bounds to allow more
182      *                             flexibility while resizing, or {@code null} if they should be the
183      *                             same as the stack bounds.
184      * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
185      *                                  When resizing, we usually "freeze" the layout of a task. To
186      *                                  achieve that, we also need to "freeze" the insets, which
187      *                                  gets achieved by changing task bounds but not bounds used
188      *                                  to calculate the insets in this transient state
189      * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
190      *                            {@code null} if they should be the same as the stack bounds.
191      * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
192      *                                 stacks.
193      * @throws RemoteException
194      */
resizeDockedStack(Rect dockedBounds, Rect tempDockedTaskBounds, Rect tempDockedTaskInsetBounds, Rect tempOtherTaskBounds, Rect tempOtherTaskInsetBounds)195     public void resizeDockedStack(Rect dockedBounds, Rect tempDockedTaskBounds,
196             Rect tempDockedTaskInsetBounds,
197             Rect tempOtherTaskBounds, Rect tempOtherTaskInsetBounds) throws RemoteException;
198     /**
199      * Resizes the pinned stack.
200      *
201      * @param pinnedBounds The bounds for the pinned stack.
202      * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
203      *                             might be different from the stack bounds to allow more
204      *                             flexibility while resizing, or {@code null} if they should be the
205      *                             same as the stack bounds.
206      */
resizePinnedStack(Rect pinnedBounds, Rect tempPinnedTaskBounds)207     public void resizePinnedStack(Rect pinnedBounds, Rect tempPinnedTaskBounds) throws RemoteException;
positionTaskInStack(int taskId, int stackId, int position)208     public void positionTaskInStack(int taskId, int stackId, int position) throws RemoteException;
getAllStackInfos()209     public List<StackInfo> getAllStackInfos() throws RemoteException;
getStackInfo(int stackId)210     public StackInfo getStackInfo(int stackId) throws RemoteException;
isInHomeStack(int taskId)211     public boolean isInHomeStack(int taskId) throws RemoteException;
setFocusedStack(int stackId)212     public void setFocusedStack(int stackId) throws RemoteException;
getFocusedStackId()213     public int getFocusedStackId() throws RemoteException;
setFocusedTask(int taskId)214     public void setFocusedTask(int taskId) throws RemoteException;
registerTaskStackListener(ITaskStackListener listener)215     public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException;
getTaskForActivity(IBinder token, boolean onlyRoot)216     public int getTaskForActivity(IBinder token, boolean onlyRoot) throws RemoteException;
getContentProvider(IApplicationThread caller, String name, int userId, boolean stable)217     public ContentProviderHolder getContentProvider(IApplicationThread caller,
218             String name, int userId, boolean stable) throws RemoteException;
getContentProviderExternal(String name, int userId, IBinder token)219     public ContentProviderHolder getContentProviderExternal(String name, int userId, IBinder token)
220             throws RemoteException;
removeContentProvider(IBinder connection, boolean stable)221     public void removeContentProvider(IBinder connection, boolean stable) throws RemoteException;
removeContentProviderExternal(String name, IBinder token)222     public void removeContentProviderExternal(String name, IBinder token) throws RemoteException;
publishContentProviders(IApplicationThread caller, List<ContentProviderHolder> providers)223     public void publishContentProviders(IApplicationThread caller,
224             List<ContentProviderHolder> providers) throws RemoteException;
refContentProvider(IBinder connection, int stableDelta, int unstableDelta)225     public boolean refContentProvider(IBinder connection, int stableDelta, int unstableDelta)
226             throws RemoteException;
unstableProviderDied(IBinder connection)227     public void unstableProviderDied(IBinder connection) throws RemoteException;
appNotRespondingViaProvider(IBinder connection)228     public void appNotRespondingViaProvider(IBinder connection) throws RemoteException;
getRunningServiceControlPanel(ComponentName service)229     public PendingIntent getRunningServiceControlPanel(ComponentName service)
230             throws RemoteException;
startService(IApplicationThread caller, Intent service, String resolvedType, String callingPackage, int userId)231     public ComponentName startService(IApplicationThread caller, Intent service,
232             String resolvedType, String callingPackage, int userId) throws RemoteException;
stopService(IApplicationThread caller, Intent service, String resolvedType, int userId)233     public int stopService(IApplicationThread caller, Intent service,
234             String resolvedType, int userId) throws RemoteException;
stopServiceToken(ComponentName className, IBinder token, int startId)235     public boolean stopServiceToken(ComponentName className, IBinder token,
236             int startId) throws RemoteException;
setServiceForeground(ComponentName className, IBinder token, int id, Notification notification, int flags)237     public void setServiceForeground(ComponentName className, IBinder token,
238             int id, Notification notification, int flags) throws RemoteException;
bindService(IApplicationThread caller, IBinder token, Intent service, String resolvedType, IServiceConnection connection, int flags, String callingPackage, int userId)239     public int bindService(IApplicationThread caller, IBinder token, Intent service,
240             String resolvedType, IServiceConnection connection, int flags,
241             String callingPackage, int userId) throws RemoteException;
unbindService(IServiceConnection connection)242     public boolean unbindService(IServiceConnection connection) throws RemoteException;
publishService(IBinder token, Intent intent, IBinder service)243     public void publishService(IBinder token,
244             Intent intent, IBinder service) throws RemoteException;
unbindFinished(IBinder token, Intent service, boolean doRebind)245     public void unbindFinished(IBinder token, Intent service,
246             boolean doRebind) throws RemoteException;
247     /* oneway */
serviceDoneExecuting(IBinder token, int type, int startId, int res)248     public void serviceDoneExecuting(IBinder token, int type, int startId,
249             int res) throws RemoteException;
peekService(Intent service, String resolvedType, String callingPackage)250     public IBinder peekService(Intent service, String resolvedType, String callingPackage)
251             throws RemoteException;
252 
bindBackupAgent(String packageName, int backupRestoreMode, int userId)253     public boolean bindBackupAgent(String packageName, int backupRestoreMode, int userId)
254             throws RemoteException;
clearPendingBackup()255     public void clearPendingBackup() throws RemoteException;
backupAgentCreated(String packageName, IBinder agent)256     public void backupAgentCreated(String packageName, IBinder agent) throws RemoteException;
unbindBackupAgent(ApplicationInfo appInfo)257     public void unbindBackupAgent(ApplicationInfo appInfo) throws RemoteException;
killApplicationProcess(String processName, int uid)258     public void killApplicationProcess(String processName, int uid) throws RemoteException;
259 
startInstrumentation(ComponentName className, String profileFile, int flags, Bundle arguments, IInstrumentationWatcher watcher, IUiAutomationConnection connection, int userId, String abiOverride)260     public boolean startInstrumentation(ComponentName className, String profileFile,
261             int flags, Bundle arguments, IInstrumentationWatcher watcher,
262             IUiAutomationConnection connection, int userId,
263             String abiOverride) throws RemoteException;
finishInstrumentation(IApplicationThread target, int resultCode, Bundle results)264     public void finishInstrumentation(IApplicationThread target,
265             int resultCode, Bundle results) throws RemoteException;
266 
getConfiguration()267     public Configuration getConfiguration() throws RemoteException;
updateConfiguration(Configuration values)268     public void updateConfiguration(Configuration values) throws RemoteException;
setRequestedOrientation(IBinder token, int requestedOrientation)269     public void setRequestedOrientation(IBinder token,
270             int requestedOrientation) throws RemoteException;
getRequestedOrientation(IBinder token)271     public int getRequestedOrientation(IBinder token) throws RemoteException;
272 
getActivityClassForToken(IBinder token)273     public ComponentName getActivityClassForToken(IBinder token) throws RemoteException;
getPackageForToken(IBinder token)274     public String getPackageForToken(IBinder token) throws RemoteException;
275 
getIntentSender(int type, String packageName, IBinder token, String resultWho, int requestCode, Intent[] intents, String[] resolvedTypes, int flags, Bundle options, int userId)276     public IIntentSender getIntentSender(int type,
277             String packageName, IBinder token, String resultWho,
278             int requestCode, Intent[] intents, String[] resolvedTypes,
279             int flags, Bundle options, int userId) throws RemoteException;
cancelIntentSender(IIntentSender sender)280     public void cancelIntentSender(IIntentSender sender) throws RemoteException;
clearApplicationUserData(final String packageName, final IPackageDataObserver observer, int userId)281     public boolean clearApplicationUserData(final String packageName,
282             final IPackageDataObserver observer, int userId) throws RemoteException;
getPackageForIntentSender(IIntentSender sender)283     public String getPackageForIntentSender(IIntentSender sender) throws RemoteException;
getUidForIntentSender(IIntentSender sender)284     public int getUidForIntentSender(IIntentSender sender) throws RemoteException;
285 
handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll, boolean requireFull, String name, String callerPackage)286     public int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
287             boolean requireFull, String name, String callerPackage) throws RemoteException;
288 
setProcessLimit(int max)289     public void setProcessLimit(int max) throws RemoteException;
getProcessLimit()290     public int getProcessLimit() throws RemoteException;
291 
setProcessForeground(IBinder token, int pid, boolean isForeground)292     public void setProcessForeground(IBinder token, int pid,
293             boolean isForeground) throws RemoteException;
294 
checkPermission(String permission, int pid, int uid)295     public int checkPermission(String permission, int pid, int uid)
296             throws RemoteException;
checkPermissionWithToken(String permission, int pid, int uid, IBinder callerToken)297     public int checkPermissionWithToken(String permission, int pid, int uid, IBinder callerToken)
298             throws RemoteException;
299 
checkUriPermission(Uri uri, int pid, int uid, int mode, int userId, IBinder callerToken)300     public int checkUriPermission(Uri uri, int pid, int uid, int mode, int userId,
301             IBinder callerToken) throws RemoteException;
grantUriPermission(IApplicationThread caller, String targetPkg, Uri uri, int mode, int userId)302     public void grantUriPermission(IApplicationThread caller, String targetPkg, Uri uri,
303             int mode, int userId) throws RemoteException;
revokeUriPermission(IApplicationThread caller, Uri uri, int mode, int userId)304     public void revokeUriPermission(IApplicationThread caller, Uri uri, int mode, int userId)
305             throws RemoteException;
takePersistableUriPermission(Uri uri, int modeFlags, int userId)306     public void takePersistableUriPermission(Uri uri, int modeFlags, int userId)
307             throws RemoteException;
releasePersistableUriPermission(Uri uri, int modeFlags, int userId)308     public void releasePersistableUriPermission(Uri uri, int modeFlags, int userId)
309             throws RemoteException;
getPersistedUriPermissions( String packageName, boolean incoming)310     public ParceledListSlice<UriPermission> getPersistedUriPermissions(
311             String packageName, boolean incoming) throws RemoteException;
312 
313     // Gets the URI permissions granted to an arbitrary package.
314     // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package
315     // granted to another packages (instead of those granted to it).
getGrantedUriPermissions(String packageName, int userId)316     public ParceledListSlice<UriPermission> getGrantedUriPermissions(String packageName, int userId)
317             throws RemoteException;
318 
319     // Clears the URI permissions granted to an arbitrary package.
clearGrantedUriPermissions(String packageName, int userId)320     public void clearGrantedUriPermissions(String packageName, int userId) throws RemoteException;
321 
showWaitingForDebugger(IApplicationThread who, boolean waiting)322     public void showWaitingForDebugger(IApplicationThread who, boolean waiting)
323             throws RemoteException;
324 
getMemoryInfo(ActivityManager.MemoryInfo outInfo)325     public void getMemoryInfo(ActivityManager.MemoryInfo outInfo) throws RemoteException;
326 
killBackgroundProcesses(final String packageName, int userId)327     public void killBackgroundProcesses(final String packageName, int userId)
328             throws RemoteException;
killAllBackgroundProcesses()329     public void killAllBackgroundProcesses() throws RemoteException;
killPackageDependents(final String packageName, int userId)330     public void killPackageDependents(final String packageName, int userId) throws RemoteException;
forceStopPackage(final String packageName, int userId)331     public void forceStopPackage(final String packageName, int userId) throws RemoteException;
332 
333     // Note: probably don't want to allow applications access to these.
setLockScreenShown(boolean showing, boolean occluded)334     public void setLockScreenShown(boolean showing, boolean occluded) throws RemoteException;
335 
unhandledBack()336     public void unhandledBack() throws RemoteException;
openContentUri(Uri uri)337     public ParcelFileDescriptor openContentUri(Uri uri) throws RemoteException;
setDebugApp( String packageName, boolean waitForDebugger, boolean persistent)338     public void setDebugApp(
339         String packageName, boolean waitForDebugger, boolean persistent)
340         throws RemoteException;
setAlwaysFinish(boolean enabled)341     public void setAlwaysFinish(boolean enabled) throws RemoteException;
setActivityController(IActivityController watcher, boolean imAMonkey)342     public void setActivityController(IActivityController watcher, boolean imAMonkey)
343         throws RemoteException;
setLenientBackgroundCheck(boolean enabled)344     public void setLenientBackgroundCheck(boolean enabled) throws RemoteException;
getMemoryTrimLevel()345     public int getMemoryTrimLevel() throws RemoteException;
346 
enterSafeMode()347     public void enterSafeMode() throws RemoteException;
348 
noteWakeupAlarm(IIntentSender sender, int sourceUid, String sourcePkg, String tag)349     public void noteWakeupAlarm(IIntentSender sender, int sourceUid, String sourcePkg, String tag)
350             throws RemoteException;
noteAlarmStart(IIntentSender sender, int sourceUid, String tag)351     public void noteAlarmStart(IIntentSender sender, int sourceUid, String tag)
352             throws RemoteException;
noteAlarmFinish(IIntentSender sender, int sourceUid, String tag)353     public void noteAlarmFinish(IIntentSender sender, int sourceUid, String tag)
354             throws RemoteException;
355 
killPids(int[] pids, String reason, boolean secure)356     public boolean killPids(int[] pids, String reason, boolean secure) throws RemoteException;
killProcessesBelowForeground(String reason)357     public boolean killProcessesBelowForeground(String reason) throws RemoteException;
358 
359     // Special low-level communication with activity manager.
handleApplicationCrash(IBinder app, ApplicationErrorReport.CrashInfo crashInfo)360     public void handleApplicationCrash(IBinder app,
361             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
handleApplicationWtf(IBinder app, String tag, boolean system, ApplicationErrorReport.CrashInfo crashInfo)362     public boolean handleApplicationWtf(IBinder app, String tag, boolean system,
363             ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
364 
365     // A StrictMode violation to be handled.  The violationMask is a
366     // subset of the original StrictMode policy bitmask, with only the
367     // bit violated and penalty bits to be executed by the
368     // ActivityManagerService remaining set.
handleApplicationStrictModeViolation(IBinder app, int violationMask, StrictMode.ViolationInfo crashInfo)369     public void handleApplicationStrictModeViolation(IBinder app, int violationMask,
370             StrictMode.ViolationInfo crashInfo) throws RemoteException;
371 
372     /*
373      * This will deliver the specified signal to all the persistent processes. Currently only
374      * SIGUSR1 is delivered. All others are ignored.
375      */
signalPersistentProcesses(int signal)376     public void signalPersistentProcesses(int signal) throws RemoteException;
377     // Retrieve running application processes in the system
getRunningAppProcesses()378     public List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses()
379             throws RemoteException;
380     // Retrieve info of applications installed on external media that are currently
381     // running.
getRunningExternalApplications()382     public List<ApplicationInfo> getRunningExternalApplications()
383             throws RemoteException;
384     // Get memory information about the calling process.
getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo)385     public void getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo)
386             throws RemoteException;
387     // Get device configuration
getDeviceConfigurationInfo()388     public ConfigurationInfo getDeviceConfigurationInfo() throws RemoteException;
389 
390     // Turn on/off profiling in a particular process.
profileControl(String process, int userId, boolean start, ProfilerInfo profilerInfo, int profileType)391     public boolean profileControl(String process, int userId, boolean start,
392             ProfilerInfo profilerInfo, int profileType) throws RemoteException;
393 
shutdown(int timeout)394     public boolean shutdown(int timeout) throws RemoteException;
395 
stopAppSwitches()396     public void stopAppSwitches() throws RemoteException;
resumeAppSwitches()397     public void resumeAppSwitches() throws RemoteException;
398 
addPackageDependency(String packageName)399     public void addPackageDependency(String packageName) throws RemoteException;
400 
killApplication(String pkg, int appId, int userId, String reason)401     public void killApplication(String pkg, int appId, int userId, String reason)
402             throws RemoteException;
403 
closeSystemDialogs(String reason)404     public void closeSystemDialogs(String reason) throws RemoteException;
405 
getProcessMemoryInfo(int[] pids)406     public Debug.MemoryInfo[] getProcessMemoryInfo(int[] pids)
407             throws RemoteException;
408 
overridePendingTransition(IBinder token, String packageName, int enterAnim, int exitAnim)409     public void overridePendingTransition(IBinder token, String packageName,
410             int enterAnim, int exitAnim) throws RemoteException;
411 
isUserAMonkey()412     public boolean isUserAMonkey() throws RemoteException;
413 
setUserIsMonkey(boolean monkey)414     public void setUserIsMonkey(boolean monkey) throws RemoteException;
415 
finishHeavyWeightApp()416     public void finishHeavyWeightApp() throws RemoteException;
417 
convertFromTranslucent(IBinder token)418     public boolean convertFromTranslucent(IBinder token) throws RemoteException;
convertToTranslucent(IBinder token, ActivityOptions options)419     public boolean convertToTranslucent(IBinder token, ActivityOptions options) throws RemoteException;
notifyActivityDrawn(IBinder token)420     public void notifyActivityDrawn(IBinder token) throws RemoteException;
getActivityOptions(IBinder token)421     public ActivityOptions getActivityOptions(IBinder token) throws RemoteException;
422 
bootAnimationComplete()423     public void bootAnimationComplete() throws RemoteException;
424 
setImmersive(IBinder token, boolean immersive)425     public void setImmersive(IBinder token, boolean immersive) throws RemoteException;
isImmersive(IBinder token)426     public boolean isImmersive(IBinder token) throws RemoteException;
isTopActivityImmersive()427     public boolean isTopActivityImmersive() throws RemoteException;
isTopOfTask(IBinder token)428     public boolean isTopOfTask(IBinder token) throws RemoteException;
429 
crashApplication(int uid, int initialPid, String packageName, String message)430     public void crashApplication(int uid, int initialPid, String packageName,
431             String message) throws RemoteException;
432 
getProviderMimeType(Uri uri, int userId)433     public String getProviderMimeType(Uri uri, int userId) throws RemoteException;
434 
newUriPermissionOwner(String name)435     public IBinder newUriPermissionOwner(String name) throws RemoteException;
getUriPermissionOwnerForActivity(IBinder activityToken)436     public IBinder getUriPermissionOwnerForActivity(IBinder activityToken) throws RemoteException;
grantUriPermissionFromOwner(IBinder owner, int fromUid, String targetPkg, Uri uri, int mode, int sourceUserId, int targetUserId)437     public void grantUriPermissionFromOwner(IBinder owner, int fromUid, String targetPkg,
438             Uri uri, int mode, int sourceUserId, int targetUserId) throws RemoteException;
revokeUriPermissionFromOwner(IBinder owner, Uri uri, int mode, int userId)439     public void revokeUriPermissionFromOwner(IBinder owner, Uri uri,
440             int mode, int userId) throws RemoteException;
441 
checkGrantUriPermission(int callingUid, String targetPkg, Uri uri, int modeFlags, int userId)442     public int checkGrantUriPermission(int callingUid, String targetPkg, Uri uri,
443             int modeFlags, int userId) throws RemoteException;
444 
445     // Cause the specified process to dump the specified heap.
dumpHeap(String process, int userId, boolean managed, String path, ParcelFileDescriptor fd)446     public boolean dumpHeap(String process, int userId, boolean managed, String path,
447         ParcelFileDescriptor fd) throws RemoteException;
448 
startActivities(IApplicationThread caller, String callingPackage, Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options, int userId)449     public int startActivities(IApplicationThread caller, String callingPackage,
450             Intent[] intents, String[] resolvedTypes, IBinder resultTo,
451             Bundle options, int userId) throws RemoteException;
452 
getFrontActivityScreenCompatMode()453     public int getFrontActivityScreenCompatMode() throws RemoteException;
setFrontActivityScreenCompatMode(int mode)454     public void setFrontActivityScreenCompatMode(int mode) throws RemoteException;
getPackageScreenCompatMode(String packageName)455     public int getPackageScreenCompatMode(String packageName) throws RemoteException;
setPackageScreenCompatMode(String packageName, int mode)456     public void setPackageScreenCompatMode(String packageName, int mode)
457             throws RemoteException;
getPackageAskScreenCompat(String packageName)458     public boolean getPackageAskScreenCompat(String packageName) throws RemoteException;
setPackageAskScreenCompat(String packageName, boolean ask)459     public void setPackageAskScreenCompat(String packageName, boolean ask)
460             throws RemoteException;
461 
462     // Multi-user APIs
switchUser(int userid)463     public boolean switchUser(int userid) throws RemoteException;
startUserInBackground(int userid)464     public boolean startUserInBackground(int userid) throws RemoteException;
unlockUser(int userid, byte[] token, byte[] secret, IProgressListener listener)465     public boolean unlockUser(int userid, byte[] token, byte[] secret, IProgressListener listener)
466             throws RemoteException;
stopUser(int userid, boolean force, IStopUserCallback callback)467     public int stopUser(int userid, boolean force, IStopUserCallback callback) throws RemoteException;
getCurrentUser()468     public UserInfo getCurrentUser() throws RemoteException;
isUserRunning(int userid, int flags)469     public boolean isUserRunning(int userid, int flags) throws RemoteException;
getRunningUserIds()470     public int[] getRunningUserIds() throws RemoteException;
471 
removeTask(int taskId)472     public boolean removeTask(int taskId) throws RemoteException;
473 
registerProcessObserver(IProcessObserver observer)474     public void registerProcessObserver(IProcessObserver observer) throws RemoteException;
unregisterProcessObserver(IProcessObserver observer)475     public void unregisterProcessObserver(IProcessObserver observer) throws RemoteException;
476 
registerUidObserver(IUidObserver observer, int which)477     public void registerUidObserver(IUidObserver observer, int which) throws RemoteException;
unregisterUidObserver(IUidObserver observer)478     public void unregisterUidObserver(IUidObserver observer) throws RemoteException;
479 
isIntentSenderTargetedToPackage(IIntentSender sender)480     public boolean isIntentSenderTargetedToPackage(IIntentSender sender) throws RemoteException;
481 
isIntentSenderAnActivity(IIntentSender sender)482     public boolean isIntentSenderAnActivity(IIntentSender sender) throws RemoteException;
483 
getIntentForIntentSender(IIntentSender sender)484     public Intent getIntentForIntentSender(IIntentSender sender) throws RemoteException;
485 
getTagForIntentSender(IIntentSender sender, String prefix)486     public String getTagForIntentSender(IIntentSender sender, String prefix) throws RemoteException;
487 
updatePersistentConfiguration(Configuration values)488     public void updatePersistentConfiguration(Configuration values) throws RemoteException;
489 
getProcessPss(int[] pids)490     public long[] getProcessPss(int[] pids) throws RemoteException;
491 
showBootMessage(CharSequence msg, boolean always)492     public void showBootMessage(CharSequence msg, boolean always) throws RemoteException;
493 
keyguardWaitingForActivityDrawn()494     public void keyguardWaitingForActivityDrawn() throws RemoteException;
495 
496     /**
497      * Notify the system that the keyguard is going away.
498      *
499      * @param flags See {@link android.view.WindowManagerPolicy#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
500      *              etc.
501      */
keyguardGoingAway(int flags)502     public void keyguardGoingAway(int flags) throws RemoteException;
503 
shouldUpRecreateTask(IBinder token, String destAffinity)504     public boolean shouldUpRecreateTask(IBinder token, String destAffinity)
505             throws RemoteException;
506 
navigateUpTo(IBinder token, Intent target, int resultCode, Intent resultData)507     public boolean navigateUpTo(IBinder token, Intent target, int resultCode, Intent resultData)
508             throws RemoteException;
509 
510     // These are not public because you need to be very careful in how you
511     // manage your activity to make sure it is always the uid you expect.
getLaunchedFromUid(IBinder activityToken)512     public int getLaunchedFromUid(IBinder activityToken) throws RemoteException;
getLaunchedFromPackage(IBinder activityToken)513     public String getLaunchedFromPackage(IBinder activityToken) throws RemoteException;
514 
registerUserSwitchObserver(IUserSwitchObserver observer, String name)515     public void registerUserSwitchObserver(IUserSwitchObserver observer,
516             String name) throws RemoteException;
unregisterUserSwitchObserver(IUserSwitchObserver observer)517     public void unregisterUserSwitchObserver(IUserSwitchObserver observer) throws RemoteException;
518 
requestBugReport(int bugreportType)519     public void requestBugReport(int bugreportType) throws RemoteException;
520 
inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason)521     public long inputDispatchingTimedOut(int pid, boolean aboveSystem, String reason)
522             throws RemoteException;
523 
getAssistContextExtras(int requestType)524     public Bundle getAssistContextExtras(int requestType) throws RemoteException;
525 
requestAssistContextExtras(int requestType, IResultReceiver receiver, Bundle receiverExtras, IBinder activityToken, boolean focused, boolean newSessionId)526     public boolean requestAssistContextExtras(int requestType, IResultReceiver receiver,
527             Bundle receiverExtras,
528             IBinder activityToken, boolean focused, boolean newSessionId) throws RemoteException;
529 
reportAssistContextExtras(IBinder token, Bundle extras, AssistStructure structure, AssistContent content, Uri referrer)530     public void reportAssistContextExtras(IBinder token, Bundle extras,
531             AssistStructure structure, AssistContent content, Uri referrer) throws RemoteException;
532 
launchAssistIntent(Intent intent, int requestType, String hint, int userHandle, Bundle args)533     public boolean launchAssistIntent(Intent intent, int requestType, String hint, int userHandle,
534             Bundle args) throws RemoteException;
535 
isAssistDataAllowedOnCurrentActivity()536     public boolean isAssistDataAllowedOnCurrentActivity() throws RemoteException;
537 
showAssistFromActivity(IBinder token, Bundle args)538     public boolean showAssistFromActivity(IBinder token, Bundle args) throws RemoteException;
539 
killUid(int appId, int userId, String reason)540     public void killUid(int appId, int userId, String reason) throws RemoteException;
541 
hang(IBinder who, boolean allowRestart)542     public void hang(IBinder who, boolean allowRestart) throws RemoteException;
543 
reportActivityFullyDrawn(IBinder token)544     public void reportActivityFullyDrawn(IBinder token) throws RemoteException;
545 
restart()546     public void restart() throws RemoteException;
547 
performIdleMaintenance()548     public void performIdleMaintenance() throws RemoteException;
549 
sendIdleJobTrigger()550     public void sendIdleJobTrigger() throws RemoteException;
551 
createVirtualActivityContainer(IBinder parentActivityToken, IActivityContainerCallback callback)552     public IActivityContainer createVirtualActivityContainer(IBinder parentActivityToken,
553             IActivityContainerCallback callback) throws RemoteException;
554 
createStackOnDisplay(int displayId)555     public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException;
556 
deleteActivityContainer(IActivityContainer container)557     public void deleteActivityContainer(IActivityContainer container) throws RemoteException;
558 
getActivityDisplayId(IBinder activityToken)559     public int getActivityDisplayId(IBinder activityToken) throws RemoteException;
560 
startSystemLockTaskMode(int taskId)561     public void startSystemLockTaskMode(int taskId) throws RemoteException;
562 
startLockTaskMode(int taskId)563     public void startLockTaskMode(int taskId) throws RemoteException;
564 
startLockTaskMode(IBinder token)565     public void startLockTaskMode(IBinder token) throws RemoteException;
566 
stopLockTaskMode()567     public void stopLockTaskMode() throws RemoteException;
568 
stopSystemLockTaskMode()569     public void stopSystemLockTaskMode() throws RemoteException;
570 
isInLockTaskMode()571     public boolean isInLockTaskMode() throws RemoteException;
572 
getLockTaskModeState()573     public int getLockTaskModeState() throws RemoteException;
574 
showLockTaskEscapeMessage(IBinder token)575     public void showLockTaskEscapeMessage(IBinder token) throws RemoteException;
576 
setTaskDescription(IBinder token, ActivityManager.TaskDescription values)577     public void setTaskDescription(IBinder token, ActivityManager.TaskDescription values)
578             throws RemoteException;
setTaskResizeable(int taskId, int resizeableMode)579     public void setTaskResizeable(int taskId, int resizeableMode) throws RemoteException;
resizeTask(int taskId, Rect bounds, int resizeMode)580     public void resizeTask(int taskId, Rect bounds, int resizeMode) throws RemoteException;
581 
getTaskBounds(int taskId)582     public Rect getTaskBounds(int taskId) throws RemoteException;
getTaskDescriptionIcon(String filename, int userId)583     public Bitmap getTaskDescriptionIcon(String filename, int userId) throws RemoteException;
584 
startInPlaceAnimationOnFrontMostApplication(ActivityOptions opts)585     public void startInPlaceAnimationOnFrontMostApplication(ActivityOptions opts)
586             throws RemoteException;
587 
requestVisibleBehind(IBinder token, boolean visible)588     public boolean requestVisibleBehind(IBinder token, boolean visible) throws RemoteException;
isBackgroundVisibleBehind(IBinder token)589     public boolean isBackgroundVisibleBehind(IBinder token) throws RemoteException;
backgroundResourcesReleased(IBinder token)590     public void backgroundResourcesReleased(IBinder token) throws RemoteException;
591 
notifyLaunchTaskBehindComplete(IBinder token)592     public void notifyLaunchTaskBehindComplete(IBinder token) throws RemoteException;
notifyEnterAnimationComplete(IBinder token)593     public void notifyEnterAnimationComplete(IBinder token) throws RemoteException;
594 
notifyCleartextNetwork(int uid, byte[] firstPacket)595     public void notifyCleartextNetwork(int uid, byte[] firstPacket) throws RemoteException;
596 
setDumpHeapDebugLimit(String processName, int uid, long maxMemSize, String reportPackage)597     public void setDumpHeapDebugLimit(String processName, int uid, long maxMemSize,
598             String reportPackage) throws RemoteException;
dumpHeapFinished(String path)599     public void dumpHeapFinished(String path) throws RemoteException;
600 
setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake)601     public void setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake)
602             throws RemoteException;
updateLockTaskPackages(int userId, String[] packages)603     public void updateLockTaskPackages(int userId, String[] packages) throws RemoteException;
updateDeviceOwner(String packageName)604     public void updateDeviceOwner(String packageName) throws RemoteException;
605 
getPackageProcessState(String packageName, String callingPackage)606     public int getPackageProcessState(String packageName, String callingPackage)
607             throws RemoteException;
608 
setProcessMemoryTrimLevel(String process, int uid, int level)609     public boolean setProcessMemoryTrimLevel(String process, int uid, int level)
610             throws RemoteException;
611 
isRootVoiceInteraction(IBinder token)612     public boolean isRootVoiceInteraction(IBinder token) throws RemoteException;
613 
614     // Start Binder transaction tracking for all applications.
startBinderTracking()615     public boolean startBinderTracking() throws RemoteException;
616 
617     // Stop Binder transaction tracking for all applications and dump trace data to the given file
618     // descriptor.
stopBinderTrackingAndDump(ParcelFileDescriptor fd)619     public boolean stopBinderTrackingAndDump(ParcelFileDescriptor fd) throws RemoteException;
620 
getActivityStackId(IBinder token)621     public int getActivityStackId(IBinder token) throws RemoteException;
exitFreeformMode(IBinder token)622     public void exitFreeformMode(IBinder token) throws RemoteException;
623 
suppressResizeConfigChanges(boolean suppress)624     public void suppressResizeConfigChanges(boolean suppress) throws RemoteException;
625 
moveTasksToFullscreenStack(int fromStackId, boolean onTop)626     public void moveTasksToFullscreenStack(int fromStackId, boolean onTop) throws RemoteException;
627 
getAppStartMode(int uid, String packageName)628     public int getAppStartMode(int uid, String packageName) throws RemoteException;
629 
isInMultiWindowMode(IBinder token)630     public boolean isInMultiWindowMode(IBinder token) throws RemoteException;
631 
isInPictureInPictureMode(IBinder token)632     public boolean isInPictureInPictureMode(IBinder token) throws RemoteException;
633 
enterPictureInPictureMode(IBinder token)634     public void enterPictureInPictureMode(IBinder token) throws RemoteException;
635 
setVrMode(IBinder token, boolean enabled, ComponentName packageName)636     public int setVrMode(IBinder token, boolean enabled, ComponentName packageName)
637             throws RemoteException;
638 
isVrModePackageEnabled(ComponentName packageName)639     public boolean isVrModePackageEnabled(ComponentName packageName) throws RemoteException;
640 
isAppForeground(int uid)641     public boolean isAppForeground(int uid) throws RemoteException;
642 
startLocalVoiceInteraction(IBinder token, Bundle options)643     public void startLocalVoiceInteraction(IBinder token, Bundle options) throws RemoteException;
644 
stopLocalVoiceInteraction(IBinder token)645     public void stopLocalVoiceInteraction(IBinder token) throws RemoteException;
646 
supportsLocalVoiceInteraction()647     public boolean supportsLocalVoiceInteraction() throws RemoteException;
648 
notifyPinnedStackAnimationEnded()649     public void notifyPinnedStackAnimationEnded() throws RemoteException;
650 
removeStack(int stackId)651     public void removeStack(int stackId) throws RemoteException;
652 
notifyLockedProfile(@serIdInt int userId)653     public void notifyLockedProfile(@UserIdInt int userId) throws RemoteException;
654 
startConfirmDeviceCredentialIntent(Intent intent)655     public void startConfirmDeviceCredentialIntent(Intent intent) throws RemoteException;
656 
sendIntentSender(IIntentSender target, int code, Intent intent, String resolvedType, IIntentReceiver finishedReceiver, String requiredPermission, Bundle options)657     public int sendIntentSender(IIntentSender target, int code, Intent intent, String resolvedType,
658             IIntentReceiver finishedReceiver, String requiredPermission, Bundle options)
659             throws RemoteException;
660 
setVrThread(int tid)661     public void setVrThread(int tid) throws RemoteException;
setRenderThread(int tid)662     public void setRenderThread(int tid) throws RemoteException;
663 
664     /**
665      * Lets activity manager know whether the calling process is currently showing "top-level" UI
666      * that is not an activity, i.e. windows on the screen the user is currently interacting with.
667      *
668      * <p>This flag can only be set for persistent processes.
669      *
670      * @param hasTopUi Whether the calling process has "top-level" UI.
671      */
setHasTopUi(boolean hasTopUi)672     public void setHasTopUi(boolean hasTopUi) throws RemoteException;
673 
674     /*
675      * Private non-Binder interfaces
676      */
testIsSystemReady()677     /* package */ boolean testIsSystemReady();
678 
679     /** Information you can retrieve about a particular application. */
680     public static class ContentProviderHolder implements Parcelable {
681         public final ProviderInfo info;
682         public IContentProvider provider;
683         public IBinder connection;
684         public boolean noReleaseNeeded;
685 
ContentProviderHolder(ProviderInfo _info)686         public ContentProviderHolder(ProviderInfo _info) {
687             info = _info;
688         }
689 
690         @Override
describeContents()691         public int describeContents() {
692             return 0;
693         }
694 
695         @Override
writeToParcel(Parcel dest, int flags)696         public void writeToParcel(Parcel dest, int flags) {
697             info.writeToParcel(dest, 0);
698             if (provider != null) {
699                 dest.writeStrongBinder(provider.asBinder());
700             } else {
701                 dest.writeStrongBinder(null);
702             }
703             dest.writeStrongBinder(connection);
704             dest.writeInt(noReleaseNeeded ? 1 : 0);
705         }
706 
707         public static final Parcelable.Creator<ContentProviderHolder> CREATOR
708                 = new Parcelable.Creator<ContentProviderHolder>() {
709             @Override
710             public ContentProviderHolder createFromParcel(Parcel source) {
711                 return new ContentProviderHolder(source);
712             }
713 
714             @Override
715             public ContentProviderHolder[] newArray(int size) {
716                 return new ContentProviderHolder[size];
717             }
718         };
719 
ContentProviderHolder(Parcel source)720         private ContentProviderHolder(Parcel source) {
721             info = ProviderInfo.CREATOR.createFromParcel(source);
722             provider = ContentProviderNative.asInterface(
723                     source.readStrongBinder());
724             connection = source.readStrongBinder();
725             noReleaseNeeded = source.readInt() != 0;
726         }
727     }
728 
729     /** Information returned after waiting for an activity start. */
730     public static class WaitResult implements Parcelable {
731         public int result;
732         public boolean timeout;
733         public ComponentName who;
734         public long thisTime;
735         public long totalTime;
736 
WaitResult()737         public WaitResult() {
738         }
739 
740         @Override
describeContents()741         public int describeContents() {
742             return 0;
743         }
744 
745         @Override
writeToParcel(Parcel dest, int flags)746         public void writeToParcel(Parcel dest, int flags) {
747             dest.writeInt(result);
748             dest.writeInt(timeout ? 1 : 0);
749             ComponentName.writeToParcel(who, dest);
750             dest.writeLong(thisTime);
751             dest.writeLong(totalTime);
752         }
753 
754         public static final Parcelable.Creator<WaitResult> CREATOR
755                 = new Parcelable.Creator<WaitResult>() {
756             @Override
757             public WaitResult createFromParcel(Parcel source) {
758                 return new WaitResult(source);
759             }
760 
761             @Override
762             public WaitResult[] newArray(int size) {
763                 return new WaitResult[size];
764             }
765         };
766 
WaitResult(Parcel source)767         private WaitResult(Parcel source) {
768             result = source.readInt();
769             timeout = source.readInt() != 0;
770             who = ComponentName.readFromParcel(source);
771             thisTime = source.readLong();
772             totalTime = source.readLong();
773         }
774     }
775 
776     String descriptor = "android.app.IActivityManager";
777 
778     // Please keep these transaction codes the same -- they are also
779     // sent by C++ code.
780     int HANDLE_APPLICATION_CRASH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+1;
781     int START_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+2;
782     int UNHANDLED_BACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+3;
783     int OPEN_CONTENT_URI_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+4;
784 
785     // Remaining non-native transaction codes.
786     int FINISH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+10;
787     int REGISTER_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+11;
788     int UNREGISTER_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+12;
789     int BROADCAST_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+13;
790     int UNBROADCAST_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+14;
791     int FINISH_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+15;
792     int ATTACH_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+16;
793     int ACTIVITY_IDLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+17;
794     int ACTIVITY_PAUSED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+18;
795     int ACTIVITY_STOPPED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+19;
796     int GET_CALLING_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+20;
797     int GET_CALLING_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+21;
798     int GET_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+22;
799     int MOVE_TASK_TO_FRONT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+23;
800 
801     int MOVE_TASK_BACKWARDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25;
802     int GET_TASK_FOR_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26;
803 
804     int GET_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28;
805     int PUBLISH_CONTENT_PROVIDERS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+29;
806     int REF_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+30;
807     int FINISH_SUB_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+31;
808     int GET_RUNNING_SERVICE_CONTROL_PANEL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+32;
809     int START_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+33;
810     int STOP_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+34;
811     int BIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+35;
812     int UNBIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+36;
813     int PUBLISH_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+37;
814     int ACTIVITY_RESUMED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+38;
815     int SET_DEBUG_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+41;
816     int SET_ALWAYS_FINISH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+42;
817     int START_INSTRUMENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+43;
818     int FINISH_INSTRUMENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+44;
819     int GET_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+45;
820     int UPDATE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+46;
821     int STOP_SERVICE_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+47;
822     int GET_ACTIVITY_CLASS_FOR_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+48;
823     int GET_PACKAGE_FOR_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+49;
824     int SET_PROCESS_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+50;
825     int GET_PROCESS_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+51;
826     int CHECK_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+52;
827     int CHECK_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+53;
828     int GRANT_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+54;
829     int REVOKE_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+55;
830     int SET_ACTIVITY_CONTROLLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+56;
831     int SHOW_WAITING_FOR_DEBUGGER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+57;
832     int SIGNAL_PERSISTENT_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+58;
833     int GET_RECENT_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+59;
834     int SERVICE_DONE_EXECUTING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+60;
835     int ACTIVITY_DESTROYED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+61;
836     int GET_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+62;
837     int CANCEL_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+63;
838     int GET_PACKAGE_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+64;
839     int ENTER_SAFE_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+65;
840     int START_NEXT_MATCHING_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+66;
841     int NOTE_WAKEUP_ALARM_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+67;
842     int REMOVE_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+68;
843     int SET_REQUESTED_ORIENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+69;
844     int GET_REQUESTED_ORIENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+70;
845     int UNBIND_FINISHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+71;
846     int SET_PROCESS_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+72;
847     int SET_SERVICE_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+73;
848     int MOVE_ACTIVITY_TASK_TO_BACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+74;
849     int GET_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+75;
850     int GET_PROCESSES_IN_ERROR_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+76;
851     int CLEAR_APP_DATA_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+77;
852     int FORCE_STOP_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+78;
853     int KILL_PIDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+79;
854     int GET_SERVICES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+80;
855     int GET_TASK_THUMBNAIL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+81;
856     int GET_RUNNING_APP_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+82;
857     int GET_DEVICE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+83;
858     int PEEK_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+84;
859     int PROFILE_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+85;
860     int SHUTDOWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+86;
861     int STOP_APP_SWITCHES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+87;
862     int RESUME_APP_SWITCHES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+88;
863     int START_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+89;
864     int BACKUP_AGENT_CREATED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+90;
865     int UNBIND_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+91;
866     int GET_UID_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+92;
867     int HANDLE_INCOMING_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+93;
868     int ADD_PACKAGE_DEPENDENCY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+94;
869     int KILL_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+95;
870     int CLOSE_SYSTEM_DIALOGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+96;
871     int GET_PROCESS_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+97;
872     int KILL_APPLICATION_PROCESS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+98;
873     int START_ACTIVITY_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+99;
874     int OVERRIDE_PENDING_TRANSITION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+100;
875     int HANDLE_APPLICATION_WTF_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+101;
876     int KILL_BACKGROUND_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+102;
877     int IS_USER_A_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+103;
878     int START_ACTIVITY_AND_WAIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+104;
879     int WILL_ACTIVITY_BE_VISIBLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+105;
880     int START_ACTIVITY_WITH_CONFIG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+106;
881     int GET_RUNNING_EXTERNAL_APPLICATIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+107;
882     int FINISH_HEAVY_WEIGHT_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+108;
883     int HANDLE_APPLICATION_STRICT_MODE_VIOLATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+109;
884     int IS_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+110;
885     int SET_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+111;
886     int IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+112;
887     int CRASH_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+113;
888     int GET_PROVIDER_MIME_TYPE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+114;
889     int NEW_URI_PERMISSION_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+115;
890     int GRANT_URI_PERMISSION_FROM_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+116;
891     int REVOKE_URI_PERMISSION_FROM_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+117;
892     int CHECK_GRANT_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+118;
893     int DUMP_HEAP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+119;
894     int START_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+120;
895     int IS_USER_RUNNING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+121;
896     int ACTIVITY_SLEPT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+122;
897     int GET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+123;
898     int SET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+124;
899     int GET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+125;
900     int SET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+126;
901     int GET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+127;
902     int SET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+128;
903     int SWITCH_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+129;
904     int SET_FOCUSED_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+130;
905     int REMOVE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+131;
906     int REGISTER_PROCESS_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+132;
907     int UNREGISTER_PROCESS_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+133;
908     int IS_INTENT_SENDER_TARGETED_TO_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+134;
909     int UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+135;
910     int GET_PROCESS_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+136;
911     int SHOW_BOOT_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+137;
912     int KILL_ALL_BACKGROUND_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+139;
913     int GET_CONTENT_PROVIDER_EXTERNAL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+140;
914     int REMOVE_CONTENT_PROVIDER_EXTERNAL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+141;
915     int GET_MY_MEMORY_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+142;
916     int KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+143;
917     int GET_CURRENT_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+144;
918     int SHOULD_UP_RECREATE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+145;
919     int NAVIGATE_UP_TO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+146;
920     int SET_LOCK_SCREEN_SHOWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+147;
921     int FINISH_ACTIVITY_AFFINITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+148;
922     int GET_LAUNCHED_FROM_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+149;
923     int UNSTABLE_PROVIDER_DIED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+150;
924     int IS_INTENT_SENDER_AN_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+151;
925     int START_ACTIVITY_AS_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+152;
926     int STOP_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+153;
927     int REGISTER_USER_SWITCH_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+154;
928     int UNREGISTER_USER_SWITCH_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+155;
929     int GET_RUNNING_USER_IDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+156;
930     int REQUEST_BUG_REPORT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+157;
931     int INPUT_DISPATCHING_TIMED_OUT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+158;
932     int CLEAR_PENDING_BACKUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+159;
933     int GET_INTENT_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+160;
934     int GET_ASSIST_CONTEXT_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+161;
935     int REPORT_ASSIST_CONTEXT_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+162;
936     int GET_LAUNCHED_FROM_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+163;
937     int KILL_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+164;
938     int SET_USER_IS_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+165;
939     int HANG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+166;
940     int CREATE_VIRTUAL_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+167;
941     int MOVE_TASK_TO_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+168;
942     int RESIZE_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+169;
943     int GET_ALL_STACK_INFOS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+170;
944     int SET_FOCUSED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+171;
945     int GET_STACK_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+172;
946     int CONVERT_FROM_TRANSLUCENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+173;
947     int CONVERT_TO_TRANSLUCENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+174;
948     int NOTIFY_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+175;
949     int REPORT_ACTIVITY_FULLY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+176;
950     int RESTART_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+177;
951     int PERFORM_IDLE_MAINTENANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+178;
952     int TAKE_PERSISTABLE_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+179;
953     int RELEASE_PERSISTABLE_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+180;
954     int GET_PERSISTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+181;
955     int APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+182;
956     int GET_TASK_BOUNDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+183;
957     int GET_ACTIVITY_DISPLAY_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184;
958     int DELETE_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+185;
959     int SET_PROCESS_MEMORY_TRIM_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+186;
960 
961 
962     // Start of L transactions
963     int GET_TAG_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+210;
964     int START_USER_IN_BACKGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+211;
965     int IS_IN_HOME_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+212;
966     int START_LOCK_TASK_BY_TASK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+213;
967     int START_LOCK_TASK_BY_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+214;
968     int STOP_LOCK_TASK_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+215;
969     int IS_IN_LOCK_TASK_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+216;
970     int SET_TASK_DESCRIPTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+217;
971     int START_VOICE_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+218;
972     int GET_ACTIVITY_OPTIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+219;
973     int GET_APP_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+220;
974     int START_SYSTEM_LOCK_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+221;
975     int STOP_SYSTEM_LOCK_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+222;
976     int FINISH_VOICE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+223;
977     int IS_TOP_OF_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+224;
978     int REQUEST_VISIBLE_BEHIND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+225;
979     int IS_BACKGROUND_VISIBLE_BEHIND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+226;
980     int BACKGROUND_RESOURCES_RELEASED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+227;
981     int NOTIFY_LAUNCH_TASK_BEHIND_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+228;
982     int START_ACTIVITY_FROM_RECENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 229;
983     int NOTIFY_ENTER_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+230;
984     int KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+231;
985     int START_ACTIVITY_AS_CALLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+232;
986     int ADD_APP_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+233;
987     int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
988     int RELEASE_ACTIVITY_INSTANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+235;
989     int RELEASE_SOME_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+236;
990     int BOOT_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+237;
991     int GET_TASK_DESCRIPTION_ICON_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+238;
992     int LAUNCH_ASSIST_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+239;
993     int START_IN_PLACE_ANIMATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+240;
994     int CHECK_PERMISSION_WITH_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+241;
995     int REGISTER_TASK_STACK_LISTENER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+242;
996 
997     // Start of M transactions
998     int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+280;
999     int CREATE_STACK_ON_DISPLAY = IBinder.FIRST_CALL_TRANSACTION+281;
1000     int GET_FOCUSED_STACK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+282;
1001     int SET_TASK_RESIZEABLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+283;
1002     int REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+284;
1003     int RESIZE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+285;
1004     int GET_LOCK_TASK_MODE_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+286;
1005     int SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+287;
1006     int DUMP_HEAP_FINISHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+288;
1007     int SET_VOICE_KEEP_AWAKE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+289;
1008     int UPDATE_LOCK_TASK_PACKAGES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+290;
1009     int NOTE_ALARM_START_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+291;
1010     int NOTE_ALARM_FINISH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+292;
1011     int GET_PACKAGE_PROCESS_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+293;
1012     int SHOW_LOCK_TASK_ESCAPE_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+294;
1013     int UPDATE_DEVICE_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+295;
1014     int KEYGUARD_GOING_AWAY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+296;
1015     int REGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+297;
1016     int UNREGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+298;
1017     int IS_SCREEN_CAPTURE_ALLOWED_ON_CURRENT_ACTIVITY_TRANSACTION
1018             = IBinder.FIRST_CALL_TRANSACTION+299;
1019     int SHOW_ASSIST_FROM_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+300;
1020     int IS_ROOT_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+301;
1021 
1022     // Start of N transactions
1023     int START_BINDER_TRACKING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 340;
1024     int STOP_BINDER_TRACKING_AND_DUMP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 341;
1025     int POSITION_TASK_IN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 342;
1026     int GET_ACTIVITY_STACK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 343;
1027     int EXIT_FREEFORM_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 344;
1028     int REPORT_SIZE_CONFIGURATIONS = IBinder.FIRST_CALL_TRANSACTION + 345;
1029     int MOVE_TASK_TO_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 346;
1030     int SUPPRESS_RESIZE_CONFIG_CHANGES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 347;
1031     int MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 348;
1032     int MOVE_TOP_ACTIVITY_TO_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 349;
1033     int GET_APP_START_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 350;
1034     int UNLOCK_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 351;
1035     int IN_MULTI_WINDOW_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 352;
1036     int IN_PICTURE_IN_PICTURE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 353;
1037     int KILL_PACKAGE_DEPENDENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 354;
1038     int ENTER_PICTURE_IN_PICTURE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 355;
1039     int ACTIVITY_RELAUNCHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 356;
1040     int GET_URI_PERMISSION_OWNER_FOR_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 357;
1041     int RESIZE_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 358;
1042     int SET_VR_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 359;
1043     int GET_GRANTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 360;
1044     int CLEAR_GRANTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 361;
1045     int IS_APP_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 362;
1046     int START_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 363;
1047     int STOP_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 364;
1048     int SUPPORTS_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 365;
1049     int NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 366;
1050     int REMOVE_STACK = IBinder.FIRST_CALL_TRANSACTION + 367;
1051     int SET_LENIENT_BACKGROUND_CHECK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+368;
1052     int GET_MEMORY_TRIM_LEVEL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+369;
1053     int RESIZE_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 370;
1054     int IS_VR_PACKAGE_ENABLED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 371;
1055     int SWAP_DOCKED_AND_FULLSCREEN_STACK = IBinder.FIRST_CALL_TRANSACTION + 372;
1056     int NOTIFY_LOCKED_PROFILE = IBinder.FIRST_CALL_TRANSACTION + 373;
1057     int START_CONFIRM_DEVICE_CREDENTIAL_INTENT = IBinder.FIRST_CALL_TRANSACTION + 374;
1058     int SEND_IDLE_JOB_TRIGGER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 375;
1059     int SEND_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 376;
1060 
1061     // Start of N MR1 transactions
1062     int SET_VR_THREAD_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 377;
1063     int SET_RENDER_THREAD_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 378;
1064     int SET_HAS_TOP_UI = IBinder.FIRST_CALL_TRANSACTION + 379;
1065 }
1066