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