Wale Ogunwale | 65ebd95 | 2018-04-25 15:41:44 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.app; |
| 18 | |
| 19 | import android.app.ActivityManager; |
| 20 | import android.app.ApplicationErrorReport; |
| 21 | import android.app.ContentProviderHolder; |
| 22 | import android.app.GrantedUriPermission; |
| 23 | import android.app.IApplicationThread; |
| 24 | import android.app.IActivityController; |
| 25 | import android.app.IAppTask; |
| 26 | import android.app.IAssistDataReceiver; |
| 27 | import android.app.IInstrumentationWatcher; |
| 28 | import android.app.IProcessObserver; |
| 29 | import android.app.IServiceConnection; |
| 30 | import android.app.IStopUserCallback; |
| 31 | import android.app.ITaskStackListener; |
| 32 | import android.app.IUiAutomationConnection; |
| 33 | import android.app.IUidObserver; |
| 34 | import android.app.IUserSwitchObserver; |
| 35 | import android.app.Notification; |
| 36 | import android.app.PendingIntent; |
| 37 | import android.app.PictureInPictureParams; |
| 38 | import android.app.ProfilerInfo; |
| 39 | import android.app.WaitResult; |
| 40 | import android.app.assist.AssistContent; |
| 41 | import android.app.assist.AssistStructure; |
| 42 | import android.content.ComponentName; |
| 43 | import android.content.IIntentReceiver; |
| 44 | import android.content.IIntentSender; |
| 45 | import android.content.Intent; |
| 46 | import android.content.IntentFilter; |
| 47 | import android.content.IntentSender; |
| 48 | import android.content.pm.ApplicationInfo; |
| 49 | import android.content.pm.ConfigurationInfo; |
| 50 | import android.content.pm.IPackageDataObserver; |
| 51 | import android.content.pm.ParceledListSlice; |
| 52 | import android.content.pm.ProviderInfo; |
| 53 | import android.content.pm.UserInfo; |
| 54 | import android.content.res.Configuration; |
| 55 | import android.graphics.Bitmap; |
| 56 | import android.graphics.GraphicBuffer; |
| 57 | import android.graphics.Point; |
| 58 | import android.graphics.Rect; |
| 59 | import android.net.Uri; |
| 60 | import android.os.Bundle; |
| 61 | import android.os.Debug; |
| 62 | import android.os.IBinder; |
| 63 | import android.os.IProgressListener; |
| 64 | import android.os.ParcelFileDescriptor; |
| 65 | import android.os.PersistableBundle; |
| 66 | import android.os.StrictMode; |
| 67 | import android.os.WorkSource; |
| 68 | import android.service.voice.IVoiceInteractionSession; |
| 69 | import android.view.IRecentsAnimationRunner; |
| 70 | import android.view.RemoteAnimationDefinition; |
| 71 | import android.view.RemoteAnimationAdapter; |
| 72 | import com.android.internal.app.IVoiceInteractor; |
| 73 | import com.android.internal.os.IResultReceiver; |
| 74 | import com.android.internal.policy.IKeyguardDismissCallback; |
| 75 | |
| 76 | import 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 | */ |
| 84 | interface IActivityTaskManager { |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 85 | 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 Cichowlas | 3e34050 | 2018-08-07 17:15:01 -0400 | [diff] [blame] | 121 | IBinder permissionToken, boolean ignoreTargetSecurity, int userId); |
Andrii Kulian | 2eb84b2 | 2018-12-13 18:18:54 -0800 | [diff] [blame] | 122 | boolean isActivityStartAllowedOnDisplay(int displayId, in Intent intent, in String resolvedType, |
| 123 | int userId); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 124 | |
| 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); |
| 132 | void activityPaused(in IBinder token); |
Robert Carr | 6827f72 | 2018-07-10 13:21:04 -0700 | [diff] [blame] | 133 | void activityStopped(in IBinder token, in Bundle state, |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 134 | in PersistableBundle persistentState, in CharSequence description); |
| 135 | oneway void activityDestroyed(in IBinder token); |
| 136 | void activityRelaunched(in IBinder token); |
| 137 | oneway void activitySlept(in IBinder token); |
| 138 | int getFrontActivityScreenCompatMode(); |
| 139 | void setFrontActivityScreenCompatMode(int mode); |
| 140 | String getCallingPackage(in IBinder token); |
| 141 | ComponentName getCallingActivity(in IBinder token); |
| 142 | void setFocusedTask(int taskId); |
| 143 | boolean removeTask(int taskId); |
Winson Chung | e643910 | 2018-07-30 15:48:01 -0700 | [diff] [blame] | 144 | void removeAllVisibleRecentTasks(); |
Wale Ogunwale | 65ebd95 | 2018-04-25 15:41:44 -0700 | [diff] [blame] | 145 | List<ActivityManager.RunningTaskInfo> getTasks(int maxNum); |
| 146 | List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType, |
| 147 | int ignoreWindowingMode); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 148 | boolean shouldUpRecreateTask(in IBinder token, in String destAffinity); |
| 149 | boolean navigateUpTo(in IBinder token, in Intent target, int resultCode, |
| 150 | in Intent resultData); |
| 151 | void moveTaskToFront(int task, int flags, in Bundle options); |
| 152 | int getTaskForActivity(in IBinder token, in boolean onlyRoot); |
| 153 | void finishSubActivity(in IBinder token, in String resultWho, int requestCode); |
| 154 | ParceledListSlice getRecentTasks(int maxNum, int flags, int userId); |
| 155 | boolean willActivityBeVisible(in IBinder token); |
| 156 | void setRequestedOrientation(in IBinder token, int requestedOrientation); |
| 157 | int getRequestedOrientation(in IBinder token); |
| 158 | boolean convertFromTranslucent(in IBinder token); |
| 159 | boolean convertToTranslucent(in IBinder token, in Bundle options); |
| 160 | void notifyActivityDrawn(in IBinder token); |
| 161 | void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle); |
| 162 | int getActivityDisplayId(in IBinder activityToken); |
| 163 | boolean isImmersive(in IBinder token); |
| 164 | void setImmersive(in IBinder token, boolean immersive); |
| 165 | boolean isTopActivityImmersive(); |
| 166 | boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot); |
| 167 | ActivityManager.TaskDescription getTaskDescription(int taskId); |
| 168 | void overridePendingTransition(in IBinder token, in String packageName, |
| 169 | int enterAnim, int exitAnim); |
| 170 | int getLaunchedFromUid(in IBinder activityToken); |
| 171 | String getLaunchedFromPackage(in IBinder activityToken); |
| 172 | void reportAssistContextExtras(in IBinder token, in Bundle extras, |
| 173 | in AssistStructure structure, in AssistContent content, in Uri referrer); |
| 174 | |
| 175 | void setFocusedStack(int stackId); |
| 176 | ActivityManager.StackInfo getFocusedStackInfo(); |
| 177 | Rect getTaskBounds(int taskId); |
| 178 | |
| 179 | void cancelRecentsAnimation(boolean restoreHomeStackPosition); |
| 180 | void startLockTaskModeByToken(in IBinder token); |
| 181 | void stopLockTaskModeByToken(in IBinder token); |
Wale Ogunwale | 27c48ae | 2018-10-25 19:01:01 -0700 | [diff] [blame] | 182 | void updateLockTaskPackages(int userId, in String[] packages); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 183 | boolean isInLockTaskMode(); |
| 184 | int getLockTaskModeState(); |
| 185 | void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values); |
| 186 | Bundle getActivityOptions(in IBinder token); |
| 187 | List<IBinder> getAppTasks(in String callingPackage); |
| 188 | void startSystemLockTaskMode(int taskId); |
| 189 | void stopSystemLockTaskMode(); |
| 190 | void finishVoiceTask(in IVoiceInteractionSession session); |
| 191 | boolean isTopOfTask(in IBinder token); |
| 192 | void notifyLaunchTaskBehindComplete(in IBinder token); |
| 193 | void notifyEnterAnimationComplete(in IBinder token); |
| 194 | int addAppTask(in IBinder activityToken, in Intent intent, |
| 195 | in ActivityManager.TaskDescription description, in Bitmap thumbnail); |
| 196 | Point getAppTaskThumbnailSize(); |
| 197 | boolean releaseActivityInstance(in IBinder token); |
Alison Cichowlas | 3e34050 | 2018-08-07 17:15:01 -0400 | [diff] [blame] | 198 | /** |
| 199 | * Only callable from the system. This token grants a temporary permission to call |
| 200 | * #startActivityAsCallerWithToken. The token will time out after |
| 201 | * START_AS_CALLER_TOKEN_TIMEOUT if it is not used. |
| 202 | * |
| 203 | * @param delegatorToken The Binder token referencing the system Activity that wants to delegate |
| 204 | * the #startActivityAsCaller to another app. The "caller" will be the caller of this |
| 205 | * activity's token, not the delegate's caller (which is probably the delegator itself). |
| 206 | * |
| 207 | * @return Returns a token that can be given to a "delegate" app that may call |
| 208 | * #startActivityAsCaller |
| 209 | */ |
| 210 | IBinder requestStartActivityPermissionToken(in IBinder delegatorToken); |
| 211 | |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 212 | void releaseSomeActivities(in IApplicationThread app); |
| 213 | Bitmap getTaskDescriptionIcon(in String filename, int userId); |
| 214 | void startInPlaceAnimationOnFrontMostApplication(in Bundle opts); |
| 215 | void registerTaskStackListener(in ITaskStackListener listener); |
| 216 | void unregisterTaskStackListener(in ITaskStackListener listener); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 217 | void setTaskResizeable(int taskId, int resizeableMode); |
Yunfan Chen | d967af8 | 2019-01-17 18:30:18 +0900 | [diff] [blame] | 218 | void toggleFreeformWindowingMode(in IBinder token); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 219 | void resizeTask(int taskId, in Rect bounds, int resizeMode); |
| 220 | void moveStackToDisplay(int stackId, int displayId); |
| 221 | void removeStack(int stackId); |
| 222 | |
Wale Ogunwale | 65ebd95 | 2018-04-25 15:41:44 -0700 | [diff] [blame] | 223 | /** |
| 224 | * Sets the windowing mode for a specific task. Only works on tasks of type |
| 225 | * {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD} |
| 226 | * @param taskId The id of the task to set the windowing mode for. |
| 227 | * @param windowingMode The windowing mode to set for the task. |
| 228 | * @param toTop If the task should be moved to the top once the windowing mode changes. |
| 229 | */ |
| 230 | void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop); |
| 231 | void moveTaskToStack(int taskId, int stackId, boolean toTop); |
| 232 | /** |
| 233 | * Resizes the input stack id to the given bounds. |
| 234 | * |
| 235 | * @param stackId Id of the stack to resize. |
| 236 | * @param bounds Bounds to resize the stack to or {@code null} for fullscreen. |
| 237 | * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is |
| 238 | * active. |
| 239 | * @param preserveWindows True if the windows of activities contained in the stack should be |
| 240 | * preserved. |
| 241 | * @param animate True if the stack resize should be animated. |
| 242 | * @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 | */ |
| 246 | void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode, |
| 247 | boolean preserveWindows, boolean animate, int animationDuration); |
| 248 | boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop, |
| 249 | boolean animate, in Rect initialBounds, boolean showRecents); |
wilsonshih | 5c4cf52 | 2019-01-25 09:03:47 +0800 | [diff] [blame] | 250 | /** |
| 251 | * Use the offset to adjust the stack boundary with animation. |
| 252 | * |
| 253 | * @param stackId Id of the stack to adjust. |
| 254 | * @param compareBounds Offset is only applied if the current pinned stack bounds is equal to |
| 255 | * the compareBounds. |
| 256 | * @param xOffset The horizontal offset. |
| 257 | * @param yOffset The vertical offset. |
| 258 | * @param animationDuration The duration of the resize animation in milliseconds or -1 if the |
| 259 | * default animation duration should be used. |
| 260 | * @throws RemoteException |
| 261 | */ |
| 262 | void offsetPinnedStackBounds(int stackId, in Rect compareBounds, int xOffset, int yOffset, |
| 263 | int animationDuration); |
Wale Ogunwale | 65ebd95 | 2018-04-25 15:41:44 -0700 | [diff] [blame] | 264 | /** |
| 265 | * Removes stacks in the input windowing modes from the system if they are of activity type |
| 266 | * ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED |
| 267 | */ |
| 268 | void removeStacksInWindowingModes(in int[] windowingModes); |
| 269 | /** Removes stack of the activity types from the system. */ |
| 270 | void removeStacksWithActivityTypes(in int[] activityTypes); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 271 | |
| 272 | List<ActivityManager.StackInfo> getAllStackInfos(); |
| 273 | ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType); |
| 274 | |
| 275 | /** |
wilsonshih | e7903ea | 2018-09-26 16:17:59 +0800 | [diff] [blame] | 276 | * Informs ActivityTaskManagerService that the keyguard is showing. |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 277 | * |
| 278 | * @param showingKeyguard True if the keyguard is showing, false otherwise. |
| 279 | * @param showingAod True if AOD is showing, false otherwise. |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 280 | */ |
wilsonshih | 177261f | 2019-02-22 12:02:18 +0800 | [diff] [blame] | 281 | void setLockScreenShown(boolean showingKeyguard, boolean showingAod); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 282 | Bundle getAssistContextExtras(int requestType); |
| 283 | boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle, |
| 284 | in Bundle args); |
| 285 | boolean requestAssistContextExtras(int requestType, in IAssistDataReceiver receiver, |
| 286 | in Bundle receiverExtras, in IBinder activityToken, |
| 287 | boolean focused, boolean newSessionId); |
| 288 | boolean requestAutofillData(in IAssistDataReceiver receiver, in Bundle receiverExtras, |
| 289 | in IBinder activityToken, int flags); |
| 290 | boolean isAssistDataAllowedOnCurrentActivity(); |
| 291 | boolean showAssistFromActivity(in IBinder token, in Bundle args); |
| 292 | boolean isRootVoiceInteraction(in IBinder token); |
| 293 | oneway void showLockTaskEscapeMessage(in IBinder token); |
| 294 | |
| 295 | /** |
| 296 | * Notify the system that the keyguard is going away. |
| 297 | * |
| 298 | * @param flags See |
| 299 | * {@link android.view.WindowManagerPolicyConstants#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE} |
| 300 | * etc. |
| 301 | */ |
| 302 | void keyguardGoingAway(int flags); |
| 303 | ComponentName getActivityClassForToken(in IBinder token); |
| 304 | String getPackageForToken(in IBinder token); |
| 305 | |
| 306 | /** |
| 307 | * Try to place task to provided position. The final position might be different depending on |
| 308 | * current user and stacks state. The task will be moved to target stack if it's currently in |
| 309 | * different stack. |
| 310 | */ |
| 311 | void positionTaskInStack(int taskId, int stackId, int position); |
| 312 | void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration, |
| 313 | in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations); |
| 314 | /** |
| 315 | * Dismisses split-screen multi-window mode. |
| 316 | * {@param toTop} If true the current primary split-screen stack will be placed or left on top. |
| 317 | */ |
| 318 | void dismissSplitScreenMode(boolean toTop); |
| 319 | |
| 320 | /** |
| 321 | * Dismisses PiP |
| 322 | * @param animate True if the dismissal should be animated. |
| 323 | * @param animationDuration The duration of the resize animation in milliseconds or -1 if the |
| 324 | * default animation duration should be used. |
| 325 | */ |
| 326 | void dismissPip(boolean animate, int animationDuration); |
| 327 | void suppressResizeConfigChanges(boolean suppress); |
| 328 | void moveTasksToFullscreenStack(int fromStackId, boolean onTop); |
| 329 | boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds); |
| 330 | boolean isInMultiWindowMode(in IBinder token); |
| 331 | boolean isInPictureInPictureMode(in IBinder token); |
| 332 | boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params); |
| 333 | void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params); |
| 334 | int getMaxNumPictureInPictureActions(in IBinder token); |
| 335 | IBinder getUriPermissionOwnerForActivity(in IBinder activityToken); |
| 336 | |
| 337 | /** |
| 338 | * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change. |
| 339 | * |
| 340 | * @param dockedBounds The bounds for the docked stack. |
| 341 | * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which |
| 342 | * might be different from the stack bounds to allow more |
| 343 | * flexibility while resizing, or {@code null} if they should be the |
| 344 | * same as the stack bounds. |
| 345 | * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets. |
| 346 | * When resizing, we usually "freeze" the layout of a task. To |
| 347 | * achieve that, we also need to "freeze" the insets, which |
| 348 | * gets achieved by changing task bounds but not bounds used |
| 349 | * to calculate the insets in this transient state |
| 350 | * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or |
| 351 | * {@code null} if they should be the same as the stack bounds. |
| 352 | * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other |
| 353 | * stacks. |
| 354 | * @throws RemoteException |
| 355 | */ |
| 356 | void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds, |
| 357 | in Rect tempDockedTaskInsetBounds, |
| 358 | in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds); |
| 359 | |
| 360 | /** |
| 361 | * Sets whether we are currently in an interactive split screen resize operation where we |
| 362 | * are changing the docked stack size. |
| 363 | */ |
| 364 | void setSplitScreenResizing(boolean resizing); |
| 365 | int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName); |
| 366 | void startLocalVoiceInteraction(in IBinder token, in Bundle options); |
| 367 | void stopLocalVoiceInteraction(in IBinder token); |
| 368 | boolean supportsLocalVoiceInteraction(); |
| 369 | void notifyPinnedStackAnimationStarted(); |
| 370 | void notifyPinnedStackAnimationEnded(); |
| 371 | |
Yunfan Chen | 75157d7 | 2018-07-27 14:47:21 +0900 | [diff] [blame] | 372 | // Get device configuration |
| 373 | ConfigurationInfo getDeviceConfigurationInfo(); |
| 374 | |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 375 | /** |
| 376 | * Resizes the pinned stack. |
| 377 | * |
| 378 | * @param pinnedBounds The bounds for the pinned stack. |
| 379 | * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which |
| 380 | * might be different from the stack bounds to allow more |
| 381 | * flexibility while resizing, or {@code null} if they should be the |
| 382 | * same as the stack bounds. |
| 383 | */ |
| 384 | void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds); |
| 385 | |
| 386 | /** |
| 387 | * Updates override configuration applied to specific display. |
| 388 | * @param values Update values for display configuration. If null is passed it will request the |
| 389 | * Window Manager to compute new config for the specified display. |
| 390 | * @param displayId Id of the display to apply the config to. |
| 391 | * @throws RemoteException |
| 392 | * @return Returns true if the configuration was updated. |
| 393 | */ |
| 394 | boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId); |
| 395 | void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback, |
| 396 | in CharSequence message); |
| 397 | |
| 398 | /** Cancels the window transitions for the given task. */ |
| 399 | void cancelTaskWindowTransition(int taskId); |
| 400 | |
| 401 | /** |
| 402 | * @param taskId the id of the task to retrieve the sAutoapshots for |
| 403 | * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load |
| 404 | * a reduced resolution of it, which is much faster |
| 405 | * @return a graphic buffer representing a screenshot of a task |
| 406 | */ |
| 407 | ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution); |
| 408 | |
| 409 | /** |
| 410 | * See {@link android.app.Activity#setDisablePreviewScreenshots} |
| 411 | */ |
| 412 | void setDisablePreviewScreenshots(IBinder token, boolean disable); |
| 413 | |
| 414 | /** |
| 415 | * Return the user id of last resumed activity. |
| 416 | */ |
| 417 | int getLastResumedActivityUserId(); |
| 418 | |
| 419 | /** |
| 420 | * Updates global configuration and applies changes to the entire system. |
| 421 | * @param values Update values for global configuration. If null is passed it will request the |
| 422 | * Window Manager to compute new config for the default display. |
| 423 | * @throws RemoteException |
| 424 | * @return Returns true if the configuration was updated. |
| 425 | */ |
| 426 | boolean updateConfiguration(in Configuration values); |
| 427 | void updateLockTaskFeatures(int userId, int flags); |
| 428 | |
| 429 | void setShowWhenLocked(in IBinder token, boolean showWhenLocked); |
Issei Suzuki | 74e1eb2 | 2018-12-20 17:42:52 +0100 | [diff] [blame] | 430 | void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked); |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 431 | void setTurnScreenOn(in IBinder token, boolean turnScreenOn); |
| 432 | |
| 433 | /** |
| 434 | * Registers remote animations for a specific activity. |
| 435 | */ |
| 436 | void registerRemoteAnimations(in IBinder token, in RemoteAnimationDefinition definition); |
| 437 | |
| 438 | /** |
| 439 | * Registers a remote animation to be run for all activity starts from a certain package during |
| 440 | * a short predefined amount of time. |
| 441 | */ |
| 442 | void registerRemoteAnimationForNextActivityStart(in String packageName, |
| 443 | in RemoteAnimationAdapter adapter); |
| 444 | |
Evan Rosky | 966759f | 2019-01-15 10:33:58 -0800 | [diff] [blame] | 445 | /** |
| 446 | * Registers remote animations for a display. |
| 447 | */ |
| 448 | void registerRemoteAnimationsForDisplay(int displayId, in RemoteAnimationDefinition definition); |
| 449 | |
Wale Ogunwale | 04d9cb5 | 2018-04-30 13:55:07 -0700 | [diff] [blame] | 450 | /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */ |
| 451 | void alwaysShowUnsupportedCompileSdkWarning(in ComponentName activity); |
Wale Ogunwale | d0412b3 | 2018-05-08 09:25:50 -0700 | [diff] [blame] | 452 | |
| 453 | void setVrThread(int tid); |
| 454 | void setPersistentVrThread(int tid); |
Wale Ogunwale | a6191b4 | 2018-05-09 07:41:32 -0700 | [diff] [blame] | 455 | void stopAppSwitches(); |
| 456 | void resumeAppSwitches(); |
| 457 | void setActivityController(in IActivityController watcher, boolean imAMonkey); |
Wale Ogunwale | f673393 | 2018-06-27 05:14:34 -0700 | [diff] [blame] | 458 | void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake); |
Wale Ogunwale | 5378374 | 2018-09-16 10:21:51 -0700 | [diff] [blame] | 459 | |
| 460 | int getPackageScreenCompatMode(in String packageName); |
| 461 | void setPackageScreenCompatMode(in String packageName, int mode); |
| 462 | boolean getPackageAskScreenCompat(in String packageName); |
| 463 | void setPackageAskScreenCompat(in String packageName, boolean ask); |
Garfield Tan | 0154863 | 2018-11-27 10:15:48 -0800 | [diff] [blame] | 464 | |
| 465 | /** |
| 466 | * Clears launch params for given packages. |
| 467 | */ |
| 468 | void clearLaunchParamsForPackages(in List<String> packageNames); |
Wale Ogunwale | 9e737db | 2018-12-17 15:42:37 -0800 | [diff] [blame] | 469 | |
| 470 | /** |
| 471 | * Makes the display with the given id a single task instance display. I.e the display can only |
| 472 | * contain one task. |
| 473 | */ |
| 474 | void setDisplayToSingleTaskInstance(int displayId); |
Wale Ogunwale | 65ebd95 | 2018-04-25 15:41:44 -0700 | [diff] [blame] | 475 | } |