blob: a6b76cb0db60635cc1550d559daa3fef0a7b36d4 [file] [log] [blame]
Wale Ogunwale65ebd952018-04-25 15:41:44 -07001/*
2 * Copyright (C) 2018 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.GrantedUriPermission;
23import android.app.IApplicationThread;
24import android.app.IActivityController;
25import android.app.IAppTask;
26import android.app.IAssistDataReceiver;
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.PictureInPictureParams;
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.os.WorkSource;
68import android.service.voice.IVoiceInteractionSession;
69import android.view.IRecentsAnimationRunner;
70import android.view.RemoteAnimationDefinition;
71import android.view.RemoteAnimationAdapter;
72import com.android.internal.app.IVoiceInteractor;
73import com.android.internal.os.IResultReceiver;
74import com.android.internal.policy.IKeyguardDismissCallback;
75
76import java.util.List;
77
78/**
79 * System private API for talking with the activity task manager that handles how activities are
80 * managed on screen.
81 *
82 * {@hide}
83 */
84interface IActivityTaskManager {
Wale Ogunwale04d9cb52018-04-30 13:55:07 -070085 int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
86 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
87 int flags, in ProfilerInfo profilerInfo, in Bundle options);
88 int startActivities(in IApplicationThread caller, in String callingPackage,
89 in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
90 in Bundle options, int userId);
91 int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
92 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
93 int requestCode, int flags, in ProfilerInfo profilerInfo,
94 in Bundle options, int userId);
95 boolean startNextMatchingActivity(in IBinder callingActivity,
96 in Intent intent, in Bundle options);
97 int startActivityIntentSender(in IApplicationThread caller,
98 in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent,
99 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
100 int flagsMask, int flagsValues, in Bundle options);
101 WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
102 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
103 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
104 int userId);
105 int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
106 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
107 int requestCode, int startFlags, in Configuration newConfig,
108 in Bundle options, int userId);
109 int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
110 in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
111 in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
112 in Bundle options, int userId);
113 int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
114 in Intent intent, in String resolvedType, in Bundle options, int userId);
115 void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver,
116 in IRecentsAnimationRunner recentsAnimationRunner);
117 int startActivityFromRecents(int taskId, in Bundle options);
118 int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
119 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
120 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
Alison Cichowlas3e340502018-08-07 17:15:01 -0400121 IBinder permissionToken, boolean ignoreTargetSecurity, int userId);
Andrii Kulian2eb84b22018-12-13 18:18:54 -0800122 boolean isActivityStartAllowedOnDisplay(int displayId, in Intent intent, in String resolvedType,
123 int userId);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700124
125 void unhandledBack();
126 boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
127 boolean finishActivityAffinity(in IBinder token);
128
129 oneway void activityIdle(in IBinder token, in Configuration config,
130 in boolean stopProfiling);
131 void activityResumed(in IBinder token);
Andrii Kulian86e70fc2019-02-12 11:04:10 +0000132 void activityTopResumedStateLost();
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700133 void activityPaused(in IBinder token);
Robert Carr6827f722018-07-10 13:21:04 -0700134 void activityStopped(in IBinder token, in Bundle state,
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700135 in PersistableBundle persistentState, in CharSequence description);
136 oneway void activityDestroyed(in IBinder token);
137 void activityRelaunched(in IBinder token);
138 oneway void activitySlept(in IBinder token);
139 int getFrontActivityScreenCompatMode();
140 void setFrontActivityScreenCompatMode(int mode);
141 String getCallingPackage(in IBinder token);
142 ComponentName getCallingActivity(in IBinder token);
143 void setFocusedTask(int taskId);
144 boolean removeTask(int taskId);
Winson Chunge6439102018-07-30 15:48:01 -0700145 void removeAllVisibleRecentTasks();
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700146 List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
147 List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
148 int ignoreWindowingMode);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700149 boolean shouldUpRecreateTask(in IBinder token, in String destAffinity);
150 boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
151 in Intent resultData);
152 void moveTaskToFront(int task, int flags, in Bundle options);
153 int getTaskForActivity(in IBinder token, in boolean onlyRoot);
154 void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
155 ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
156 boolean willActivityBeVisible(in IBinder token);
157 void setRequestedOrientation(in IBinder token, int requestedOrientation);
158 int getRequestedOrientation(in IBinder token);
159 boolean convertFromTranslucent(in IBinder token);
160 boolean convertToTranslucent(in IBinder token, in Bundle options);
161 void notifyActivityDrawn(in IBinder token);
162 void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
163 int getActivityDisplayId(in IBinder activityToken);
164 boolean isImmersive(in IBinder token);
165 void setImmersive(in IBinder token, boolean immersive);
166 boolean isTopActivityImmersive();
167 boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
168 ActivityManager.TaskDescription getTaskDescription(int taskId);
169 void overridePendingTransition(in IBinder token, in String packageName,
170 int enterAnim, int exitAnim);
171 int getLaunchedFromUid(in IBinder activityToken);
172 String getLaunchedFromPackage(in IBinder activityToken);
173 void reportAssistContextExtras(in IBinder token, in Bundle extras,
174 in AssistStructure structure, in AssistContent content, in Uri referrer);
175
176 void setFocusedStack(int stackId);
177 ActivityManager.StackInfo getFocusedStackInfo();
178 Rect getTaskBounds(int taskId);
179
180 void cancelRecentsAnimation(boolean restoreHomeStackPosition);
181 void startLockTaskModeByToken(in IBinder token);
182 void stopLockTaskModeByToken(in IBinder token);
Wale Ogunwale27c48ae2018-10-25 19:01:01 -0700183 void updateLockTaskPackages(int userId, in String[] packages);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700184 boolean isInLockTaskMode();
185 int getLockTaskModeState();
186 void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values);
187 Bundle getActivityOptions(in IBinder token);
188 List<IBinder> getAppTasks(in String callingPackage);
189 void startSystemLockTaskMode(int taskId);
190 void stopSystemLockTaskMode();
191 void finishVoiceTask(in IVoiceInteractionSession session);
192 boolean isTopOfTask(in IBinder token);
193 void notifyLaunchTaskBehindComplete(in IBinder token);
194 void notifyEnterAnimationComplete(in IBinder token);
195 int addAppTask(in IBinder activityToken, in Intent intent,
196 in ActivityManager.TaskDescription description, in Bitmap thumbnail);
197 Point getAppTaskThumbnailSize();
198 boolean releaseActivityInstance(in IBinder token);
Alison Cichowlas3e340502018-08-07 17:15:01 -0400199 /**
200 * Only callable from the system. This token grants a temporary permission to call
201 * #startActivityAsCallerWithToken. The token will time out after
202 * START_AS_CALLER_TOKEN_TIMEOUT if it is not used.
203 *
204 * @param delegatorToken The Binder token referencing the system Activity that wants to delegate
205 * the #startActivityAsCaller to another app. The "caller" will be the caller of this
206 * activity's token, not the delegate's caller (which is probably the delegator itself).
207 *
208 * @return Returns a token that can be given to a "delegate" app that may call
209 * #startActivityAsCaller
210 */
211 IBinder requestStartActivityPermissionToken(in IBinder delegatorToken);
212
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700213 void releaseSomeActivities(in IApplicationThread app);
214 Bitmap getTaskDescriptionIcon(in String filename, int userId);
215 void startInPlaceAnimationOnFrontMostApplication(in Bundle opts);
216 void registerTaskStackListener(in ITaskStackListener listener);
217 void unregisterTaskStackListener(in ITaskStackListener listener);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700218 void setTaskResizeable(int taskId, int resizeableMode);
Yunfan Chend967af82019-01-17 18:30:18 +0900219 void toggleFreeformWindowingMode(in IBinder token);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700220 void resizeTask(int taskId, in Rect bounds, int resizeMode);
221 void moveStackToDisplay(int stackId, int displayId);
222 void removeStack(int stackId);
223
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700224 /**
225 * Sets the windowing mode for a specific task. Only works on tasks of type
226 * {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD}
227 * @param taskId The id of the task to set the windowing mode for.
228 * @param windowingMode The windowing mode to set for the task.
229 * @param toTop If the task should be moved to the top once the windowing mode changes.
230 */
231 void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
232 void moveTaskToStack(int taskId, int stackId, boolean toTop);
233 /**
234 * Resizes the input stack id to the given bounds.
235 *
236 * @param stackId Id of the stack to resize.
237 * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
238 * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
239 * active.
240 * @param preserveWindows True if the windows of activities contained in the stack should be
241 * preserved.
242 * @param animate True if the stack resize should be animated.
243 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
244 * default animation duration should be used.
245 * @throws RemoteException
246 */
247 void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
248 boolean preserveWindows, boolean animate, int animationDuration);
249 boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
250 boolean animate, in Rect initialBounds, boolean showRecents);
wilsonshih5c4cf522019-01-25 09:03:47 +0800251 /**
252 * Use the offset to adjust the stack boundary with animation.
253 *
254 * @param stackId Id of the stack to adjust.
255 * @param compareBounds Offset is only applied if the current pinned stack bounds is equal to
256 * the compareBounds.
257 * @param xOffset The horizontal offset.
258 * @param yOffset The vertical offset.
259 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
260 * default animation duration should be used.
261 * @throws RemoteException
262 */
263 void offsetPinnedStackBounds(int stackId, in Rect compareBounds, int xOffset, int yOffset,
264 int animationDuration);
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700265 /**
266 * Removes stacks in the input windowing modes from the system if they are of activity type
267 * ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
268 */
269 void removeStacksInWindowingModes(in int[] windowingModes);
270 /** Removes stack of the activity types from the system. */
271 void removeStacksWithActivityTypes(in int[] activityTypes);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700272
273 List<ActivityManager.StackInfo> getAllStackInfos();
274 ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType);
275
276 /**
wilsonshihe7903ea2018-09-26 16:17:59 +0800277 * Informs ActivityTaskManagerService that the keyguard is showing.
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700278 *
279 * @param showingKeyguard True if the keyguard is showing, false otherwise.
280 * @param showingAod True if AOD is showing, false otherwise.
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700281 */
wilsonshih177261f2019-02-22 12:02:18 +0800282 void setLockScreenShown(boolean showingKeyguard, boolean showingAod);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700283 Bundle getAssistContextExtras(int requestType);
284 boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
285 in Bundle args);
286 boolean requestAssistContextExtras(int requestType, in IAssistDataReceiver receiver,
287 in Bundle receiverExtras, in IBinder activityToken,
288 boolean focused, boolean newSessionId);
289 boolean requestAutofillData(in IAssistDataReceiver receiver, in Bundle receiverExtras,
290 in IBinder activityToken, int flags);
291 boolean isAssistDataAllowedOnCurrentActivity();
292 boolean showAssistFromActivity(in IBinder token, in Bundle args);
293 boolean isRootVoiceInteraction(in IBinder token);
294 oneway void showLockTaskEscapeMessage(in IBinder token);
295
296 /**
297 * Notify the system that the keyguard is going away.
298 *
299 * @param flags See
300 * {@link android.view.WindowManagerPolicyConstants#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
301 * etc.
302 */
303 void keyguardGoingAway(int flags);
304 ComponentName getActivityClassForToken(in IBinder token);
305 String getPackageForToken(in IBinder token);
306
307 /**
308 * Try to place task to provided position. The final position might be different depending on
309 * current user and stacks state. The task will be moved to target stack if it's currently in
310 * different stack.
311 */
312 void positionTaskInStack(int taskId, int stackId, int position);
313 void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
314 in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
315 /**
316 * Dismisses split-screen multi-window mode.
317 * {@param toTop} If true the current primary split-screen stack will be placed or left on top.
318 */
319 void dismissSplitScreenMode(boolean toTop);
320
321 /**
322 * Dismisses PiP
323 * @param animate True if the dismissal should be animated.
324 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
325 * default animation duration should be used.
326 */
327 void dismissPip(boolean animate, int animationDuration);
328 void suppressResizeConfigChanges(boolean suppress);
329 void moveTasksToFullscreenStack(int fromStackId, boolean onTop);
330 boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
331 boolean isInMultiWindowMode(in IBinder token);
332 boolean isInPictureInPictureMode(in IBinder token);
333 boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
334 void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
335 int getMaxNumPictureInPictureActions(in IBinder token);
336 IBinder getUriPermissionOwnerForActivity(in IBinder activityToken);
337
338 /**
339 * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
340 *
341 * @param dockedBounds The bounds for the docked stack.
342 * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
343 * might be different from the stack bounds to allow more
344 * flexibility while resizing, or {@code null} if they should be the
345 * same as the stack bounds.
346 * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
347 * When resizing, we usually "freeze" the layout of a task. To
348 * achieve that, we also need to "freeze" the insets, which
349 * gets achieved by changing task bounds but not bounds used
350 * to calculate the insets in this transient state
351 * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
352 * {@code null} if they should be the same as the stack bounds.
353 * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
354 * stacks.
355 * @throws RemoteException
356 */
357 void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
358 in Rect tempDockedTaskInsetBounds,
359 in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
360
361 /**
362 * Sets whether we are currently in an interactive split screen resize operation where we
363 * are changing the docked stack size.
364 */
365 void setSplitScreenResizing(boolean resizing);
366 int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
367 void startLocalVoiceInteraction(in IBinder token, in Bundle options);
368 void stopLocalVoiceInteraction(in IBinder token);
369 boolean supportsLocalVoiceInteraction();
370 void notifyPinnedStackAnimationStarted();
371 void notifyPinnedStackAnimationEnded();
372
Yunfan Chen75157d72018-07-27 14:47:21 +0900373 // Get device configuration
374 ConfigurationInfo getDeviceConfigurationInfo();
375
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700376 /**
377 * Resizes the pinned stack.
378 *
379 * @param pinnedBounds The bounds for the pinned stack.
380 * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
381 * might be different from the stack bounds to allow more
382 * flexibility while resizing, or {@code null} if they should be the
383 * same as the stack bounds.
384 */
385 void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
386
387 /**
388 * Updates override configuration applied to specific display.
389 * @param values Update values for display configuration. If null is passed it will request the
390 * Window Manager to compute new config for the specified display.
391 * @param displayId Id of the display to apply the config to.
392 * @throws RemoteException
393 * @return Returns true if the configuration was updated.
394 */
395 boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId);
396 void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback,
397 in CharSequence message);
398
399 /** Cancels the window transitions for the given task. */
400 void cancelTaskWindowTransition(int taskId);
401
402 /**
403 * @param taskId the id of the task to retrieve the sAutoapshots for
404 * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
405 * a reduced resolution of it, which is much faster
406 * @return a graphic buffer representing a screenshot of a task
407 */
408 ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
409
410 /**
411 * See {@link android.app.Activity#setDisablePreviewScreenshots}
412 */
413 void setDisablePreviewScreenshots(IBinder token, boolean disable);
414
415 /**
416 * Return the user id of last resumed activity.
417 */
418 int getLastResumedActivityUserId();
419
420 /**
421 * Updates global configuration and applies changes to the entire system.
422 * @param values Update values for global configuration. If null is passed it will request the
423 * Window Manager to compute new config for the default display.
424 * @throws RemoteException
425 * @return Returns true if the configuration was updated.
426 */
427 boolean updateConfiguration(in Configuration values);
428 void updateLockTaskFeatures(int userId, int flags);
429
430 void setShowWhenLocked(in IBinder token, boolean showWhenLocked);
Issei Suzuki74e1eb22018-12-20 17:42:52 +0100431 void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700432 void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
433
434 /**
435 * Registers remote animations for a specific activity.
436 */
437 void registerRemoteAnimations(in IBinder token, in RemoteAnimationDefinition definition);
438
439 /**
440 * Registers a remote animation to be run for all activity starts from a certain package during
441 * a short predefined amount of time.
442 */
443 void registerRemoteAnimationForNextActivityStart(in String packageName,
444 in RemoteAnimationAdapter adapter);
445
Evan Rosky966759f2019-01-15 10:33:58 -0800446 /**
447 * Registers remote animations for a display.
448 */
449 void registerRemoteAnimationsForDisplay(int displayId, in RemoteAnimationDefinition definition);
450
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700451 /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */
452 void alwaysShowUnsupportedCompileSdkWarning(in ComponentName activity);
Wale Ogunwaled0412b32018-05-08 09:25:50 -0700453
454 void setVrThread(int tid);
455 void setPersistentVrThread(int tid);
Wale Ogunwalea6191b42018-05-09 07:41:32 -0700456 void stopAppSwitches();
457 void resumeAppSwitches();
458 void setActivityController(in IActivityController watcher, boolean imAMonkey);
Wale Ogunwalef6733932018-06-27 05:14:34 -0700459 void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
Wale Ogunwale53783742018-09-16 10:21:51 -0700460
461 int getPackageScreenCompatMode(in String packageName);
462 void setPackageScreenCompatMode(in String packageName, int mode);
463 boolean getPackageAskScreenCompat(in String packageName);
464 void setPackageAskScreenCompat(in String packageName, boolean ask);
Garfield Tan01548632018-11-27 10:15:48 -0800465
466 /**
467 * Clears launch params for given packages.
468 */
469 void clearLaunchParamsForPackages(in List<String> packageNames);
Wale Ogunwale9e737db2018-12-17 15:42:37 -0800470
471 /**
472 * Makes the display with the given id a single task instance display. I.e the display can only
473 * contain one task.
474 */
475 void setDisplayToSingleTaskInstance(int displayId);
Riddle Hsu7b766fd2019-01-28 21:14:59 +0800476
477 /**
478 * Restarts the activity by killing its process if it is visible. If the activity is not
479 * visible, the activity will not be restarted immediately and just keep the activity record in
480 * the stack. It also resets the current override configuration so the activity will use the
481 * configuration according to the latest state.
482 *
483 * @param activityToken The token of the target activity to restart.
484 */
485 void restartActivityProcessIfVisible(in IBinder activityToken);
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700486}