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