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