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