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 ParceledListSlice<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, boolean moveHomeStackFront) 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, int flags) 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(String packageName, int backupRestoreMode, int userId)
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 showing, boolean occluded) 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 killApplication(String pkg, int appId, int userId, 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            Bundle receiverExtras,
527            IBinder activityToken, boolean focused, boolean newSessionId) throws RemoteException;
528
529    public void reportAssistContextExtras(IBinder token, Bundle extras,
530            AssistStructure structure, AssistContent content, Uri referrer) throws RemoteException;
531
532    public boolean launchAssistIntent(Intent intent, int requestType, String hint, int userHandle,
533            Bundle args) throws RemoteException;
534
535    public boolean isAssistDataAllowedOnCurrentActivity() throws RemoteException;
536
537    public boolean showAssistFromActivity(IBinder token, Bundle args) throws RemoteException;
538
539    public void killUid(int appId, int userId, String reason) throws RemoteException;
540
541    public void hang(IBinder who, boolean allowRestart) throws RemoteException;
542
543    public void reportActivityFullyDrawn(IBinder token) throws RemoteException;
544
545    public void restart() throws RemoteException;
546
547    public void performIdleMaintenance() throws RemoteException;
548
549    public void sendIdleJobTrigger() throws RemoteException;
550
551    public IActivityContainer createVirtualActivityContainer(IBinder parentActivityToken,
552            IActivityContainerCallback callback) throws RemoteException;
553
554    public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException;
555
556    public void deleteActivityContainer(IActivityContainer container) throws RemoteException;
557
558    public int getActivityDisplayId(IBinder activityToken) throws RemoteException;
559
560    public void startSystemLockTaskMode(int taskId) throws RemoteException;
561
562    public void startLockTaskMode(int taskId) throws RemoteException;
563
564    public void startLockTaskMode(IBinder token) throws RemoteException;
565
566    public void stopLockTaskMode() throws RemoteException;
567
568    public void stopSystemLockTaskMode() throws RemoteException;
569
570    public boolean isInLockTaskMode() throws RemoteException;
571
572    public int getLockTaskModeState() throws RemoteException;
573
574    public void showLockTaskEscapeMessage(IBinder token) throws RemoteException;
575
576    public void setTaskDescription(IBinder token, ActivityManager.TaskDescription values)
577            throws RemoteException;
578    public void setTaskResizeable(int taskId, int resizeableMode) throws RemoteException;
579    public void resizeTask(int taskId, Rect bounds, int resizeMode) throws RemoteException;
580
581    public Rect getTaskBounds(int taskId) throws RemoteException;
582    public Bitmap getTaskDescriptionIcon(String filename, int userId) throws RemoteException;
583
584    public void startInPlaceAnimationOnFrontMostApplication(ActivityOptions opts)
585            throws RemoteException;
586
587    public boolean requestVisibleBehind(IBinder token, boolean visible) throws RemoteException;
588    public boolean isBackgroundVisibleBehind(IBinder token) throws RemoteException;
589    public void backgroundResourcesReleased(IBinder token) throws RemoteException;
590
591    public void notifyLaunchTaskBehindComplete(IBinder token) throws RemoteException;
592    public void notifyEnterAnimationComplete(IBinder token) throws RemoteException;
593
594    public void notifyCleartextNetwork(int uid, byte[] firstPacket) throws RemoteException;
595
596    public void setDumpHeapDebugLimit(String processName, int uid, long maxMemSize,
597            String reportPackage) throws RemoteException;
598    public void dumpHeapFinished(String path) throws RemoteException;
599
600    public void setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake)
601            throws RemoteException;
602    public void updateLockTaskPackages(int userId, String[] packages) throws RemoteException;
603    public void updateDeviceOwner(String packageName) throws RemoteException;
604
605    public int getPackageProcessState(String packageName, String callingPackage)
606            throws RemoteException;
607
608    public boolean setProcessMemoryTrimLevel(String process, int uid, int level)
609            throws RemoteException;
610
611    public boolean isRootVoiceInteraction(IBinder token) throws RemoteException;
612
613    // Start Binder transaction tracking for all applications.
614    public boolean startBinderTracking() throws RemoteException;
615
616    // Stop Binder transaction tracking for all applications and dump trace data to the given file
617    // descriptor.
618    public boolean stopBinderTrackingAndDump(ParcelFileDescriptor fd) throws RemoteException;
619
620    public int getActivityStackId(IBinder token) throws RemoteException;
621    public void exitFreeformMode(IBinder token) throws RemoteException;
622
623    public void suppressResizeConfigChanges(boolean suppress) throws RemoteException;
624
625    public void moveTasksToFullscreenStack(int fromStackId, boolean onTop) throws RemoteException;
626
627    public int getAppStartMode(int uid, String packageName) throws RemoteException;
628
629    public boolean isInMultiWindowMode(IBinder token) throws RemoteException;
630
631    public boolean isInPictureInPictureMode(IBinder token) throws RemoteException;
632
633    public void enterPictureInPictureMode(IBinder token) throws RemoteException;
634
635    public int setVrMode(IBinder token, boolean enabled, ComponentName packageName)
636            throws RemoteException;
637
638    public boolean isVrModePackageEnabled(ComponentName packageName) throws RemoteException;
639
640    public boolean isAppForeground(int uid) throws RemoteException;
641
642    public void startLocalVoiceInteraction(IBinder token, Bundle options) throws RemoteException;
643
644    public void stopLocalVoiceInteraction(IBinder token) throws RemoteException;
645
646    public boolean supportsLocalVoiceInteraction() throws RemoteException;
647
648    public void notifyPinnedStackAnimationEnded() throws RemoteException;
649
650    public void removeStack(int stackId) throws RemoteException;
651
652    public void notifyLockedProfile(@UserIdInt int userId) throws RemoteException;
653
654    public void startConfirmDeviceCredentialIntent(Intent intent) throws RemoteException;
655
656    public int sendIntentSender(IIntentSender target, int code, Intent intent, String resolvedType,
657            IIntentReceiver finishedReceiver, String requiredPermission, Bundle options)
658            throws RemoteException;
659
660    /*
661     * Private non-Binder interfaces
662     */
663    /* package */ boolean testIsSystemReady();
664
665    /** Information you can retrieve about a particular application. */
666    public static class ContentProviderHolder implements Parcelable {
667        public final ProviderInfo info;
668        public IContentProvider provider;
669        public IBinder connection;
670        public boolean noReleaseNeeded;
671
672        public ContentProviderHolder(ProviderInfo _info) {
673            info = _info;
674        }
675
676        @Override
677        public int describeContents() {
678            return 0;
679        }
680
681        @Override
682        public void writeToParcel(Parcel dest, int flags) {
683            info.writeToParcel(dest, 0);
684            if (provider != null) {
685                dest.writeStrongBinder(provider.asBinder());
686            } else {
687                dest.writeStrongBinder(null);
688            }
689            dest.writeStrongBinder(connection);
690            dest.writeInt(noReleaseNeeded ? 1 : 0);
691        }
692
693        public static final Parcelable.Creator<ContentProviderHolder> CREATOR
694                = new Parcelable.Creator<ContentProviderHolder>() {
695            @Override
696            public ContentProviderHolder createFromParcel(Parcel source) {
697                return new ContentProviderHolder(source);
698            }
699
700            @Override
701            public ContentProviderHolder[] newArray(int size) {
702                return new ContentProviderHolder[size];
703            }
704        };
705
706        private ContentProviderHolder(Parcel source) {
707            info = ProviderInfo.CREATOR.createFromParcel(source);
708            provider = ContentProviderNative.asInterface(
709                    source.readStrongBinder());
710            connection = source.readStrongBinder();
711            noReleaseNeeded = source.readInt() != 0;
712        }
713    }
714
715    /** Information returned after waiting for an activity start. */
716    public static class WaitResult implements Parcelable {
717        public int result;
718        public boolean timeout;
719        public ComponentName who;
720        public long thisTime;
721        public long totalTime;
722
723        public WaitResult() {
724        }
725
726        @Override
727        public int describeContents() {
728            return 0;
729        }
730
731        @Override
732        public void writeToParcel(Parcel dest, int flags) {
733            dest.writeInt(result);
734            dest.writeInt(timeout ? 1 : 0);
735            ComponentName.writeToParcel(who, dest);
736            dest.writeLong(thisTime);
737            dest.writeLong(totalTime);
738        }
739
740        public static final Parcelable.Creator<WaitResult> CREATOR
741                = new Parcelable.Creator<WaitResult>() {
742            @Override
743            public WaitResult createFromParcel(Parcel source) {
744                return new WaitResult(source);
745            }
746
747            @Override
748            public WaitResult[] newArray(int size) {
749                return new WaitResult[size];
750            }
751        };
752
753        private WaitResult(Parcel source) {
754            result = source.readInt();
755            timeout = source.readInt() != 0;
756            who = ComponentName.readFromParcel(source);
757            thisTime = source.readLong();
758            totalTime = source.readLong();
759        }
760    }
761
762    String descriptor = "android.app.IActivityManager";
763
764    // Please keep these transaction codes the same -- they are also
765    // sent by C++ code.
766    int HANDLE_APPLICATION_CRASH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+1;
767    int START_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+2;
768    int UNHANDLED_BACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+3;
769    int OPEN_CONTENT_URI_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+4;
770
771    // Remaining non-native transaction codes.
772    int FINISH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+10;
773    int REGISTER_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+11;
774    int UNREGISTER_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+12;
775    int BROADCAST_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+13;
776    int UNBROADCAST_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+14;
777    int FINISH_RECEIVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+15;
778    int ATTACH_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+16;
779    int ACTIVITY_IDLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+17;
780    int ACTIVITY_PAUSED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+18;
781    int ACTIVITY_STOPPED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+19;
782    int GET_CALLING_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+20;
783    int GET_CALLING_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+21;
784    int GET_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+22;
785    int MOVE_TASK_TO_FRONT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+23;
786
787    int MOVE_TASK_BACKWARDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25;
788    int GET_TASK_FOR_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26;
789
790    int GET_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28;
791    int PUBLISH_CONTENT_PROVIDERS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+29;
792    int REF_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+30;
793    int FINISH_SUB_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+31;
794    int GET_RUNNING_SERVICE_CONTROL_PANEL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+32;
795    int START_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+33;
796    int STOP_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+34;
797    int BIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+35;
798    int UNBIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+36;
799    int PUBLISH_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+37;
800    int ACTIVITY_RESUMED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+38;
801    int SET_DEBUG_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+41;
802    int SET_ALWAYS_FINISH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+42;
803    int START_INSTRUMENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+43;
804    int FINISH_INSTRUMENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+44;
805    int GET_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+45;
806    int UPDATE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+46;
807    int STOP_SERVICE_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+47;
808    int GET_ACTIVITY_CLASS_FOR_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+48;
809    int GET_PACKAGE_FOR_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+49;
810    int SET_PROCESS_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+50;
811    int GET_PROCESS_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+51;
812    int CHECK_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+52;
813    int CHECK_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+53;
814    int GRANT_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+54;
815    int REVOKE_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+55;
816    int SET_ACTIVITY_CONTROLLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+56;
817    int SHOW_WAITING_FOR_DEBUGGER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+57;
818    int SIGNAL_PERSISTENT_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+58;
819    int GET_RECENT_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+59;
820    int SERVICE_DONE_EXECUTING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+60;
821    int ACTIVITY_DESTROYED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+61;
822    int GET_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+62;
823    int CANCEL_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+63;
824    int GET_PACKAGE_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+64;
825    int ENTER_SAFE_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+65;
826    int START_NEXT_MATCHING_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+66;
827    int NOTE_WAKEUP_ALARM_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+67;
828    int REMOVE_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+68;
829    int SET_REQUESTED_ORIENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+69;
830    int GET_REQUESTED_ORIENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+70;
831    int UNBIND_FINISHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+71;
832    int SET_PROCESS_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+72;
833    int SET_SERVICE_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+73;
834    int MOVE_ACTIVITY_TASK_TO_BACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+74;
835    int GET_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+75;
836    int GET_PROCESSES_IN_ERROR_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+76;
837    int CLEAR_APP_DATA_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+77;
838    int FORCE_STOP_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+78;
839    int KILL_PIDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+79;
840    int GET_SERVICES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+80;
841    int GET_TASK_THUMBNAIL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+81;
842    int GET_RUNNING_APP_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+82;
843    int GET_DEVICE_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+83;
844    int PEEK_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+84;
845    int PROFILE_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+85;
846    int SHUTDOWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+86;
847    int STOP_APP_SWITCHES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+87;
848    int RESUME_APP_SWITCHES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+88;
849    int START_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+89;
850    int BACKUP_AGENT_CREATED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+90;
851    int UNBIND_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+91;
852    int GET_UID_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+92;
853    int HANDLE_INCOMING_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+93;
854    int ADD_PACKAGE_DEPENDENCY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+94;
855    int KILL_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+95;
856    int CLOSE_SYSTEM_DIALOGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+96;
857    int GET_PROCESS_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+97;
858    int KILL_APPLICATION_PROCESS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+98;
859    int START_ACTIVITY_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+99;
860    int OVERRIDE_PENDING_TRANSITION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+100;
861    int HANDLE_APPLICATION_WTF_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+101;
862    int KILL_BACKGROUND_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+102;
863    int IS_USER_A_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+103;
864    int START_ACTIVITY_AND_WAIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+104;
865    int WILL_ACTIVITY_BE_VISIBLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+105;
866    int START_ACTIVITY_WITH_CONFIG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+106;
867    int GET_RUNNING_EXTERNAL_APPLICATIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+107;
868    int FINISH_HEAVY_WEIGHT_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+108;
869    int HANDLE_APPLICATION_STRICT_MODE_VIOLATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+109;
870    int IS_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+110;
871    int SET_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+111;
872    int IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+112;
873    int CRASH_APPLICATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+113;
874    int GET_PROVIDER_MIME_TYPE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+114;
875    int NEW_URI_PERMISSION_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+115;
876    int GRANT_URI_PERMISSION_FROM_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+116;
877    int REVOKE_URI_PERMISSION_FROM_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+117;
878    int CHECK_GRANT_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+118;
879    int DUMP_HEAP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+119;
880    int START_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+120;
881    int IS_USER_RUNNING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+121;
882    int ACTIVITY_SLEPT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+122;
883    int GET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+123;
884    int SET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+124;
885    int GET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+125;
886    int SET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+126;
887    int GET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+127;
888    int SET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+128;
889    int SWITCH_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+129;
890    int SET_FOCUSED_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+130;
891    int REMOVE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+131;
892    int REGISTER_PROCESS_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+132;
893    int UNREGISTER_PROCESS_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+133;
894    int IS_INTENT_SENDER_TARGETED_TO_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+134;
895    int UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+135;
896    int GET_PROCESS_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+136;
897    int SHOW_BOOT_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+137;
898    int KILL_ALL_BACKGROUND_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+139;
899    int GET_CONTENT_PROVIDER_EXTERNAL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+140;
900    int REMOVE_CONTENT_PROVIDER_EXTERNAL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+141;
901    int GET_MY_MEMORY_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+142;
902    int KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+143;
903    int GET_CURRENT_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+144;
904    int SHOULD_UP_RECREATE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+145;
905    int NAVIGATE_UP_TO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+146;
906    int SET_LOCK_SCREEN_SHOWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+147;
907    int FINISH_ACTIVITY_AFFINITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+148;
908    int GET_LAUNCHED_FROM_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+149;
909    int UNSTABLE_PROVIDER_DIED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+150;
910    int IS_INTENT_SENDER_AN_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+151;
911    int START_ACTIVITY_AS_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+152;
912    int STOP_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+153;
913    int REGISTER_USER_SWITCH_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+154;
914    int UNREGISTER_USER_SWITCH_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+155;
915    int GET_RUNNING_USER_IDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+156;
916    int REQUEST_BUG_REPORT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+157;
917    int INPUT_DISPATCHING_TIMED_OUT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+158;
918    int CLEAR_PENDING_BACKUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+159;
919    int GET_INTENT_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+160;
920    int GET_ASSIST_CONTEXT_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+161;
921    int REPORT_ASSIST_CONTEXT_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+162;
922    int GET_LAUNCHED_FROM_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+163;
923    int KILL_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+164;
924    int SET_USER_IS_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+165;
925    int HANG_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+166;
926    int CREATE_VIRTUAL_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+167;
927    int MOVE_TASK_TO_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+168;
928    int RESIZE_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+169;
929    int GET_ALL_STACK_INFOS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+170;
930    int SET_FOCUSED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+171;
931    int GET_STACK_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+172;
932    int CONVERT_FROM_TRANSLUCENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+173;
933    int CONVERT_TO_TRANSLUCENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+174;
934    int NOTIFY_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+175;
935    int REPORT_ACTIVITY_FULLY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+176;
936    int RESTART_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+177;
937    int PERFORM_IDLE_MAINTENANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+178;
938    int TAKE_PERSISTABLE_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+179;
939    int RELEASE_PERSISTABLE_URI_PERMISSION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+180;
940    int GET_PERSISTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+181;
941    int APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+182;
942    int GET_TASK_BOUNDS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+183;
943    int GET_ACTIVITY_DISPLAY_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184;
944    int DELETE_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+185;
945    int SET_PROCESS_MEMORY_TRIM_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+186;
946
947
948    // Start of L transactions
949    int GET_TAG_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+210;
950    int START_USER_IN_BACKGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+211;
951    int IS_IN_HOME_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+212;
952    int START_LOCK_TASK_BY_TASK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+213;
953    int START_LOCK_TASK_BY_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+214;
954    int STOP_LOCK_TASK_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+215;
955    int IS_IN_LOCK_TASK_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+216;
956    int SET_TASK_DESCRIPTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+217;
957    int START_VOICE_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+218;
958    int GET_ACTIVITY_OPTIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+219;
959    int GET_APP_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+220;
960    int START_SYSTEM_LOCK_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+221;
961    int STOP_SYSTEM_LOCK_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+222;
962    int FINISH_VOICE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+223;
963    int IS_TOP_OF_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+224;
964    int REQUEST_VISIBLE_BEHIND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+225;
965    int IS_BACKGROUND_VISIBLE_BEHIND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+226;
966    int BACKGROUND_RESOURCES_RELEASED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+227;
967    int NOTIFY_LAUNCH_TASK_BEHIND_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+228;
968    int START_ACTIVITY_FROM_RECENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 229;
969    int NOTIFY_ENTER_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+230;
970    int KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+231;
971    int START_ACTIVITY_AS_CALLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+232;
972    int ADD_APP_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+233;
973    int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
974    int RELEASE_ACTIVITY_INSTANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+235;
975    int RELEASE_SOME_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+236;
976    int BOOT_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+237;
977    int GET_TASK_DESCRIPTION_ICON_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+238;
978    int LAUNCH_ASSIST_INTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+239;
979    int START_IN_PLACE_ANIMATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+240;
980    int CHECK_PERMISSION_WITH_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+241;
981    int REGISTER_TASK_STACK_LISTENER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+242;
982
983    // Start of M transactions
984    int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+280;
985    int CREATE_STACK_ON_DISPLAY = IBinder.FIRST_CALL_TRANSACTION+281;
986    int GET_FOCUSED_STACK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+282;
987    int SET_TASK_RESIZEABLE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+283;
988    int REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+284;
989    int RESIZE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+285;
990    int GET_LOCK_TASK_MODE_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+286;
991    int SET_DUMP_HEAP_DEBUG_LIMIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+287;
992    int DUMP_HEAP_FINISHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+288;
993    int SET_VOICE_KEEP_AWAKE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+289;
994    int UPDATE_LOCK_TASK_PACKAGES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+290;
995    int NOTE_ALARM_START_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+291;
996    int NOTE_ALARM_FINISH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+292;
997    int GET_PACKAGE_PROCESS_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+293;
998    int SHOW_LOCK_TASK_ESCAPE_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+294;
999    int UPDATE_DEVICE_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+295;
1000    int KEYGUARD_GOING_AWAY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+296;
1001    int REGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+297;
1002    int UNREGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+298;
1003    int IS_SCREEN_CAPTURE_ALLOWED_ON_CURRENT_ACTIVITY_TRANSACTION
1004            = IBinder.FIRST_CALL_TRANSACTION+299;
1005    int SHOW_ASSIST_FROM_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+300;
1006    int IS_ROOT_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+301;
1007
1008    // Start of N transactions
1009    int START_BINDER_TRACKING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 340;
1010    int STOP_BINDER_TRACKING_AND_DUMP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 341;
1011    int POSITION_TASK_IN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 342;
1012    int GET_ACTIVITY_STACK_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 343;
1013    int EXIT_FREEFORM_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 344;
1014    int REPORT_SIZE_CONFIGURATIONS = IBinder.FIRST_CALL_TRANSACTION + 345;
1015    int MOVE_TASK_TO_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 346;
1016    int SUPPRESS_RESIZE_CONFIG_CHANGES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 347;
1017    int MOVE_TASKS_TO_FULLSCREEN_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 348;
1018    int MOVE_TOP_ACTIVITY_TO_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 349;
1019    int GET_APP_START_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 350;
1020    int UNLOCK_USER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 351;
1021    int IN_MULTI_WINDOW_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 352;
1022    int IN_PICTURE_IN_PICTURE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 353;
1023    int KILL_PACKAGE_DEPENDENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 354;
1024    int ENTER_PICTURE_IN_PICTURE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 355;
1025    int ACTIVITY_RELAUNCHED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 356;
1026    int GET_URI_PERMISSION_OWNER_FOR_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 357;
1027    int RESIZE_DOCKED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 358;
1028    int SET_VR_MODE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 359;
1029    int GET_GRANTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 360;
1030    int CLEAR_GRANTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 361;
1031    int IS_APP_FOREGROUND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 362;
1032    int START_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 363;
1033    int STOP_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 364;
1034    int SUPPORTS_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 365;
1035    int NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 366;
1036    int REMOVE_STACK = IBinder.FIRST_CALL_TRANSACTION + 367;
1037    int SET_LENIENT_BACKGROUND_CHECK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+368;
1038    int GET_MEMORY_TRIM_LEVEL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+369;
1039    int RESIZE_PINNED_STACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 370;
1040    int IS_VR_PACKAGE_ENABLED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 371;
1041    int SWAP_DOCKED_AND_FULLSCREEN_STACK = IBinder.FIRST_CALL_TRANSACTION + 372;
1042    int NOTIFY_LOCKED_PROFILE = IBinder.FIRST_CALL_TRANSACTION + 373;
1043    int START_CONFIRM_DEVICE_CREDENTIAL_INTENT = IBinder.FIRST_CALL_TRANSACTION + 374;
1044    int SEND_IDLE_JOB_TRIGGER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 375;
1045    int SEND_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 376;
1046}
1047