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