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