blob: 770e5f7ffe118d846005d0828686651d7f7fabe8 [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;
Mark Renouf446251d2019-04-26 10:22:41 -040029import android.app.IRequestFinishCallback;
Wale Ogunwale65ebd952018-04-25 15:41:44 -070030import android.app.IServiceConnection;
31import android.app.IStopUserCallback;
32import android.app.ITaskStackListener;
33import android.app.IUiAutomationConnection;
34import android.app.IUidObserver;
35import android.app.IUserSwitchObserver;
36import android.app.Notification;
37import android.app.PendingIntent;
38import android.app.PictureInPictureParams;
39import android.app.ProfilerInfo;
40import android.app.WaitResult;
41import android.app.assist.AssistContent;
42import android.app.assist.AssistStructure;
43import android.content.ComponentName;
44import android.content.IIntentReceiver;
45import android.content.IIntentSender;
46import android.content.Intent;
47import android.content.IntentFilter;
48import android.content.IntentSender;
49import android.content.pm.ApplicationInfo;
50import android.content.pm.ConfigurationInfo;
51import android.content.pm.IPackageDataObserver;
52import android.content.pm.ParceledListSlice;
53import android.content.pm.ProviderInfo;
54import android.content.pm.UserInfo;
55import android.content.res.Configuration;
56import android.graphics.Bitmap;
57import android.graphics.GraphicBuffer;
58import android.graphics.Point;
59import android.graphics.Rect;
60import android.net.Uri;
61import android.os.Bundle;
62import android.os.Debug;
63import android.os.IBinder;
64import android.os.IProgressListener;
65import android.os.ParcelFileDescriptor;
66import android.os.PersistableBundle;
67import android.os.StrictMode;
68import android.os.WorkSource;
69import android.service.voice.IVoiceInteractionSession;
70import android.view.IRecentsAnimationRunner;
71import android.view.RemoteAnimationDefinition;
72import android.view.RemoteAnimationAdapter;
Evan Roskyddedfd42019-10-04 13:38:38 -070073import android.view.WindowContainerTransaction;
Wale Ogunwale65ebd952018-04-25 15:41:44 -070074import com.android.internal.app.IVoiceInteractor;
75import com.android.internal.os.IResultReceiver;
76import com.android.internal.policy.IKeyguardDismissCallback;
77
78import java.util.List;
79
80/**
81 * System private API for talking with the activity task manager that handles how activities are
82 * managed on screen.
83 *
84 * {@hide}
85 */
86interface IActivityTaskManager {
Wale Ogunwale04d9cb52018-04-30 13:55:07 -070087 int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
88 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
89 int flags, in ProfilerInfo profilerInfo, in Bundle options);
90 int startActivities(in IApplicationThread caller, in String callingPackage,
91 in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
92 in Bundle options, int userId);
93 int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
94 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
95 int requestCode, int flags, in ProfilerInfo profilerInfo,
96 in Bundle options, int userId);
97 boolean startNextMatchingActivity(in IBinder callingActivity,
98 in Intent intent, in Bundle options);
99 int startActivityIntentSender(in IApplicationThread caller,
100 in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent,
101 in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
102 int flagsMask, int flagsValues, in Bundle options);
103 WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
104 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
105 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
106 int userId);
107 int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
108 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
109 int requestCode, int startFlags, in Configuration newConfig,
110 in Bundle options, int userId);
111 int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
112 in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
113 in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
114 in Bundle options, int userId);
115 int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
116 in Intent intent, in String resolvedType, in Bundle options, int userId);
117 void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver,
118 in IRecentsAnimationRunner recentsAnimationRunner);
119 int startActivityFromRecents(int taskId, in Bundle options);
120 int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
121 in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
122 int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
Alison Cichowlas3e340502018-08-07 17:15:01 -0400123 IBinder permissionToken, boolean ignoreTargetSecurity, int userId);
Andrii Kulian2eb84b22018-12-13 18:18:54 -0800124 boolean isActivityStartAllowedOnDisplay(int displayId, in Intent intent, in String resolvedType,
125 int userId);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700126
127 void unhandledBack();
128 boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
129 boolean finishActivityAffinity(in IBinder token);
130
131 oneway void activityIdle(in IBinder token, in Configuration config,
132 in boolean stopProfiling);
133 void activityResumed(in IBinder token);
Andrii Kulian86e70fc2019-02-12 11:04:10 +0000134 void activityTopResumedStateLost();
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700135 void activityPaused(in IBinder token);
Robert Carr6827f722018-07-10 13:21:04 -0700136 void activityStopped(in IBinder token, in Bundle state,
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700137 in PersistableBundle persistentState, in CharSequence description);
138 oneway void activityDestroyed(in IBinder token);
139 void activityRelaunched(in IBinder token);
140 oneway void activitySlept(in IBinder token);
141 int getFrontActivityScreenCompatMode();
142 void setFrontActivityScreenCompatMode(int mode);
143 String getCallingPackage(in IBinder token);
144 ComponentName getCallingActivity(in IBinder token);
145 void setFocusedTask(int taskId);
146 boolean removeTask(int taskId);
Winson Chunge6439102018-07-30 15:48:01 -0700147 void removeAllVisibleRecentTasks();
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700148 List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
149 List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
150 int ignoreWindowingMode);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700151 boolean shouldUpRecreateTask(in IBinder token, in String destAffinity);
152 boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
153 in Intent resultData);
Ricky Waiaca8a772019-04-04 16:01:06 +0100154 void moveTaskToFront(in IApplicationThread app, in String callingPackage, int task,
155 int flags, in Bundle options);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700156 int getTaskForActivity(in IBinder token, in boolean onlyRoot);
Andrii Kulian057a6512019-07-15 16:15:51 -0700157 /** Finish all activities that were started for result from the specified activity. */
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700158 void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
159 ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
160 boolean willActivityBeVisible(in IBinder token);
161 void setRequestedOrientation(in IBinder token, int requestedOrientation);
162 int getRequestedOrientation(in IBinder token);
163 boolean convertFromTranslucent(in IBinder token);
164 boolean convertToTranslucent(in IBinder token, in Bundle options);
165 void notifyActivityDrawn(in IBinder token);
166 void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
167 int getActivityDisplayId(in IBinder activityToken);
168 boolean isImmersive(in IBinder token);
169 void setImmersive(in IBinder token, boolean immersive);
170 boolean isTopActivityImmersive();
171 boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
172 ActivityManager.TaskDescription getTaskDescription(int taskId);
173 void overridePendingTransition(in IBinder token, in String packageName,
174 int enterAnim, int exitAnim);
175 int getLaunchedFromUid(in IBinder activityToken);
176 String getLaunchedFromPackage(in IBinder activityToken);
177 void reportAssistContextExtras(in IBinder token, in Bundle extras,
178 in AssistStructure structure, in AssistContent content, in Uri referrer);
179
180 void setFocusedStack(int stackId);
181 ActivityManager.StackInfo getFocusedStackInfo();
182 Rect getTaskBounds(int taskId);
183
184 void cancelRecentsAnimation(boolean restoreHomeStackPosition);
185 void startLockTaskModeByToken(in IBinder token);
186 void stopLockTaskModeByToken(in IBinder token);
Wale Ogunwale27c48ae2018-10-25 19:01:01 -0700187 void updateLockTaskPackages(int userId, in String[] packages);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700188 boolean isInLockTaskMode();
189 int getLockTaskModeState();
190 void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values);
191 Bundle getActivityOptions(in IBinder token);
192 List<IBinder> getAppTasks(in String callingPackage);
193 void startSystemLockTaskMode(int taskId);
194 void stopSystemLockTaskMode();
195 void finishVoiceTask(in IVoiceInteractionSession session);
196 boolean isTopOfTask(in IBinder token);
197 void notifyLaunchTaskBehindComplete(in IBinder token);
198 void notifyEnterAnimationComplete(in IBinder token);
199 int addAppTask(in IBinder activityToken, in Intent intent,
200 in ActivityManager.TaskDescription description, in Bitmap thumbnail);
201 Point getAppTaskThumbnailSize();
202 boolean releaseActivityInstance(in IBinder token);
Alison Cichowlas3e340502018-08-07 17:15:01 -0400203 /**
204 * Only callable from the system. This token grants a temporary permission to call
205 * #startActivityAsCallerWithToken. The token will time out after
206 * START_AS_CALLER_TOKEN_TIMEOUT if it is not used.
207 *
208 * @param delegatorToken The Binder token referencing the system Activity that wants to delegate
209 * the #startActivityAsCaller to another app. The "caller" will be the caller of this
210 * activity's token, not the delegate's caller (which is probably the delegator itself).
211 *
212 * @return Returns a token that can be given to a "delegate" app that may call
213 * #startActivityAsCaller
214 */
215 IBinder requestStartActivityPermissionToken(in IBinder delegatorToken);
216
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700217 void releaseSomeActivities(in IApplicationThread app);
218 Bitmap getTaskDescriptionIcon(in String filename, int userId);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700219 void registerTaskStackListener(in ITaskStackListener listener);
220 void unregisterTaskStackListener(in ITaskStackListener listener);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700221 void setTaskResizeable(int taskId, int resizeableMode);
Yunfan Chend967af82019-01-17 18:30:18 +0900222 void toggleFreeformWindowingMode(in IBinder token);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700223 void resizeTask(int taskId, in Rect bounds, int resizeMode);
Evan Roskyddedfd42019-10-04 13:38:38 -0700224 void applyContainerTransaction(in WindowContainerTransaction t);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700225 void moveStackToDisplay(int stackId, int displayId);
226 void removeStack(int stackId);
227
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700228 /**
229 * Sets the windowing mode for a specific task. Only works on tasks of type
230 * {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD}
231 * @param taskId The id of the task to set the windowing mode for.
232 * @param windowingMode The windowing mode to set for the task.
233 * @param toTop If the task should be moved to the top once the windowing mode changes.
234 */
235 void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
236 void moveTaskToStack(int taskId, int stackId, boolean toTop);
237 /**
Evan Roskydbe2ce52019-07-18 11:13:17 -0700238 * Resizes the input pinned stack to the given bounds with animation.
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700239 *
Evan Roskydbe2ce52019-07-18 11:13:17 -0700240 * @param stackId Id of the pinned stack to resize.
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700241 * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700242 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
243 * default animation duration should be used.
244 * @throws RemoteException
245 */
Evan Roskydbe2ce52019-07-18 11:13:17 -0700246 void animateResizePinnedStack(int stackId, in Rect bounds, int animationDuration);
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700247 boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
248 boolean animate, in Rect initialBounds, boolean showRecents);
wilsonshih5c4cf522019-01-25 09:03:47 +0800249 /**
250 * Use the offset to adjust the stack boundary with animation.
251 *
252 * @param stackId Id of the stack to adjust.
253 * @param compareBounds Offset is only applied if the current pinned stack bounds is equal to
254 * the compareBounds.
255 * @param xOffset The horizontal offset.
256 * @param yOffset The vertical offset.
257 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
258 * default animation duration should be used.
259 * @throws RemoteException
260 */
261 void offsetPinnedStackBounds(int stackId, in Rect compareBounds, int xOffset, int yOffset,
262 int animationDuration);
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700263 /**
264 * Removes stacks in the input windowing modes from the system if they are of activity type
265 * ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
266 */
267 void removeStacksInWindowingModes(in int[] windowingModes);
268 /** Removes stack of the activity types from the system. */
269 void removeStacksWithActivityTypes(in int[] activityTypes);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700270
271 List<ActivityManager.StackInfo> getAllStackInfos();
272 ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType);
273
274 /**
wilsonshihe7903ea2018-09-26 16:17:59 +0800275 * Informs ActivityTaskManagerService that the keyguard is showing.
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700276 *
277 * @param showingKeyguard True if the keyguard is showing, false otherwise.
278 * @param showingAod True if AOD is showing, false otherwise.
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700279 */
wilsonshih177261f2019-02-22 12:02:18 +0800280 void setLockScreenShown(boolean showingKeyguard, boolean showingAod);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700281 Bundle getAssistContextExtras(int requestType);
282 boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
283 in Bundle args);
284 boolean requestAssistContextExtras(int requestType, in IAssistDataReceiver receiver,
285 in Bundle receiverExtras, in IBinder activityToken,
286 boolean focused, boolean newSessionId);
287 boolean requestAutofillData(in IAssistDataReceiver receiver, in Bundle receiverExtras,
288 in IBinder activityToken, int flags);
289 boolean isAssistDataAllowedOnCurrentActivity();
290 boolean showAssistFromActivity(in IBinder token, in Bundle args);
291 boolean isRootVoiceInteraction(in IBinder token);
292 oneway void showLockTaskEscapeMessage(in IBinder token);
293
294 /**
295 * Notify the system that the keyguard is going away.
296 *
297 * @param flags See
298 * {@link android.view.WindowManagerPolicyConstants#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
299 * etc.
300 */
301 void keyguardGoingAway(int flags);
302 ComponentName getActivityClassForToken(in IBinder token);
303 String getPackageForToken(in IBinder token);
304
305 /**
306 * Try to place task to provided position. The final position might be different depending on
307 * current user and stacks state. The task will be moved to target stack if it's currently in
308 * different stack.
309 */
310 void positionTaskInStack(int taskId, int stackId, int position);
311 void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
312 in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
313 /**
314 * Dismisses split-screen multi-window mode.
315 * {@param toTop} If true the current primary split-screen stack will be placed or left on top.
316 */
317 void dismissSplitScreenMode(boolean toTop);
318
319 /**
320 * Dismisses PiP
321 * @param animate True if the dismissal should be animated.
322 * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
323 * default animation duration should be used.
324 */
325 void dismissPip(boolean animate, int animationDuration);
326 void suppressResizeConfigChanges(boolean suppress);
327 void moveTasksToFullscreenStack(int fromStackId, boolean onTop);
328 boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
329 boolean isInMultiWindowMode(in IBinder token);
330 boolean isInPictureInPictureMode(in IBinder token);
331 boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
332 void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
333 int getMaxNumPictureInPictureActions(in IBinder token);
334 IBinder getUriPermissionOwnerForActivity(in IBinder activityToken);
335
336 /**
337 * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
338 *
339 * @param dockedBounds The bounds for the docked stack.
340 * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
341 * might be different from the stack bounds to allow more
342 * flexibility while resizing, or {@code null} if they should be the
343 * same as the stack bounds.
344 * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
345 * When resizing, we usually "freeze" the layout of a task. To
346 * achieve that, we also need to "freeze" the insets, which
347 * gets achieved by changing task bounds but not bounds used
348 * to calculate the insets in this transient state
349 * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
350 * {@code null} if they should be the same as the stack bounds.
351 * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
352 * stacks.
353 * @throws RemoteException
354 */
355 void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
356 in Rect tempDockedTaskInsetBounds,
357 in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
358
359 /**
360 * Sets whether we are currently in an interactive split screen resize operation where we
361 * are changing the docked stack size.
362 */
363 void setSplitScreenResizing(boolean resizing);
364 int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
365 void startLocalVoiceInteraction(in IBinder token, in Bundle options);
366 void stopLocalVoiceInteraction(in IBinder token);
367 boolean supportsLocalVoiceInteraction();
368 void notifyPinnedStackAnimationStarted();
369 void notifyPinnedStackAnimationEnded();
370
Yunfan Chen75157d72018-07-27 14:47:21 +0900371 // Get device configuration
372 ConfigurationInfo getDeviceConfigurationInfo();
373
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700374 /**
375 * Resizes the pinned stack.
376 *
377 * @param pinnedBounds The bounds for the pinned stack.
378 * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
379 * might be different from the stack bounds to allow more
380 * flexibility while resizing, or {@code null} if they should be the
381 * same as the stack bounds.
382 */
383 void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
384
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700385 void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback,
386 in CharSequence message);
387
388 /** Cancels the window transitions for the given task. */
389 void cancelTaskWindowTransition(int taskId);
390
391 /**
392 * @param taskId the id of the task to retrieve the sAutoapshots for
393 * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
394 * a reduced resolution of it, which is much faster
395 * @return a graphic buffer representing a screenshot of a task
396 */
397 ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
398
399 /**
400 * See {@link android.app.Activity#setDisablePreviewScreenshots}
401 */
402 void setDisablePreviewScreenshots(IBinder token, boolean disable);
403
404 /**
405 * Return the user id of last resumed activity.
406 */
407 int getLastResumedActivityUserId();
408
409 /**
410 * Updates global configuration and applies changes to the entire system.
411 * @param values Update values for global configuration. If null is passed it will request the
412 * Window Manager to compute new config for the default display.
413 * @throws RemoteException
414 * @return Returns true if the configuration was updated.
415 */
416 boolean updateConfiguration(in Configuration values);
417 void updateLockTaskFeatures(int userId, int flags);
418
419 void setShowWhenLocked(in IBinder token, boolean showWhenLocked);
Issei Suzuki74e1eb22018-12-20 17:42:52 +0100420 void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked);
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700421 void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
422
423 /**
424 * Registers remote animations for a specific activity.
425 */
426 void registerRemoteAnimations(in IBinder token, in RemoteAnimationDefinition definition);
427
428 /**
429 * Registers a remote animation to be run for all activity starts from a certain package during
430 * a short predefined amount of time.
431 */
432 void registerRemoteAnimationForNextActivityStart(in String packageName,
433 in RemoteAnimationAdapter adapter);
434
Evan Rosky966759f2019-01-15 10:33:58 -0800435 /**
436 * Registers remote animations for a display.
437 */
438 void registerRemoteAnimationsForDisplay(int displayId, in RemoteAnimationDefinition definition);
439
Wale Ogunwale04d9cb52018-04-30 13:55:07 -0700440 /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */
441 void alwaysShowUnsupportedCompileSdkWarning(in ComponentName activity);
Wale Ogunwaled0412b32018-05-08 09:25:50 -0700442
443 void setVrThread(int tid);
444 void setPersistentVrThread(int tid);
Wale Ogunwalea6191b42018-05-09 07:41:32 -0700445 void stopAppSwitches();
446 void resumeAppSwitches();
447 void setActivityController(in IActivityController watcher, boolean imAMonkey);
Wale Ogunwalef6733932018-06-27 05:14:34 -0700448 void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
Wale Ogunwale53783742018-09-16 10:21:51 -0700449
450 int getPackageScreenCompatMode(in String packageName);
451 void setPackageScreenCompatMode(in String packageName, int mode);
452 boolean getPackageAskScreenCompat(in String packageName);
453 void setPackageAskScreenCompat(in String packageName, boolean ask);
Garfield Tan01548632018-11-27 10:15:48 -0800454
455 /**
456 * Clears launch params for given packages.
457 */
458 void clearLaunchParamsForPackages(in List<String> packageNames);
Wale Ogunwale9e737db2018-12-17 15:42:37 -0800459
460 /**
461 * Makes the display with the given id a single task instance display. I.e the display can only
462 * contain one task.
463 */
464 void setDisplayToSingleTaskInstance(int displayId);
Riddle Hsu7b766fd2019-01-28 21:14:59 +0800465
466 /**
467 * Restarts the activity by killing its process if it is visible. If the activity is not
468 * visible, the activity will not be restarted immediately and just keep the activity record in
469 * the stack. It also resets the current override configuration so the activity will use the
470 * configuration according to the latest state.
471 *
472 * @param activityToken The token of the target activity to restart.
473 */
474 void restartActivityProcessIfVisible(in IBinder activityToken);
Mark Renouf446251d2019-04-26 10:22:41 -0400475
476 /**
477 * Reports that an Activity received a back key press when there were no additional activities
478 * on the back stack. If the Activity should be finished, the callback will be invoked. A
479 * callback is used instead of finishing the activity directly from the server such that the
480 * client may perform actions prior to finishing.
481 */
482 void onBackPressedOnTaskRoot(in IBinder activityToken, in IRequestFinishCallback callback);
Wale Ogunwale65ebd952018-04-25 15:41:44 -0700483}