Home | History | Annotate | Download | only in app
      1 /*
      2  * Copyright (C) 2018 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package android.app;
     18 
     19 import android.app.ActivityManager;
     20 import android.app.ApplicationErrorReport;
     21 import android.app.ContentProviderHolder;
     22 import android.app.GrantedUriPermission;
     23 import android.app.IApplicationThread;
     24 import android.app.IActivityController;
     25 import android.app.IAppTask;
     26 import android.app.IAssistDataReceiver;
     27 import android.app.IInstrumentationWatcher;
     28 import android.app.IProcessObserver;
     29 import android.app.IRequestFinishCallback;
     30 import android.app.IServiceConnection;
     31 import android.app.IStopUserCallback;
     32 import android.app.ITaskStackListener;
     33 import android.app.IUiAutomationConnection;
     34 import android.app.IUidObserver;
     35 import android.app.IUserSwitchObserver;
     36 import android.app.Notification;
     37 import android.app.PendingIntent;
     38 import android.app.PictureInPictureParams;
     39 import android.app.ProfilerInfo;
     40 import android.app.WaitResult;
     41 import android.app.assist.AssistContent;
     42 import android.app.assist.AssistStructure;
     43 import android.content.ComponentName;
     44 import android.content.IIntentReceiver;
     45 import android.content.IIntentSender;
     46 import android.content.Intent;
     47 import android.content.IntentFilter;
     48 import android.content.IntentSender;
     49 import android.content.pm.ApplicationInfo;
     50 import android.content.pm.ConfigurationInfo;
     51 import android.content.pm.IPackageDataObserver;
     52 import android.content.pm.ParceledListSlice;
     53 import android.content.pm.ProviderInfo;
     54 import android.content.pm.UserInfo;
     55 import android.content.res.Configuration;
     56 import android.graphics.Bitmap;
     57 import android.graphics.GraphicBuffer;
     58 import android.graphics.Point;
     59 import android.graphics.Rect;
     60 import android.net.Uri;
     61 import android.os.Bundle;
     62 import android.os.Debug;
     63 import android.os.IBinder;
     64 import android.os.IProgressListener;
     65 import android.os.ParcelFileDescriptor;
     66 import android.os.PersistableBundle;
     67 import android.os.StrictMode;
     68 import android.os.WorkSource;
     69 import android.service.voice.IVoiceInteractionSession;
     70 import android.view.IRecentsAnimationRunner;
     71 import android.view.RemoteAnimationDefinition;
     72 import android.view.RemoteAnimationAdapter;
     73 import com.android.internal.app.IVoiceInteractor;
     74 import com.android.internal.os.IResultReceiver;
     75 import com.android.internal.policy.IKeyguardDismissCallback;
     76 
     77 import java.util.List;
     78 
     79 /**
     80  * System private API for talking with the activity task manager that handles how activities are
     81  * managed on screen.
     82  *
     83  * {@hide}
     84  */
     85 interface IActivityTaskManager {
     86     int startActivity(in IApplicationThread caller, in String callingPackage, in Intent intent,
     87             in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
     88             int flags, in ProfilerInfo profilerInfo, in Bundle options);
     89     int startActivities(in IApplicationThread caller, in String callingPackage,
     90             in Intent[] intents, in String[] resolvedTypes, in IBinder resultTo,
     91             in Bundle options, int userId);
     92     int startActivityAsUser(in IApplicationThread caller, in String callingPackage,
     93             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
     94             int requestCode, int flags, in ProfilerInfo profilerInfo,
     95             in Bundle options, int userId);
     96     boolean startNextMatchingActivity(in IBinder callingActivity,
     97             in Intent intent, in Bundle options);
     98     int startActivityIntentSender(in IApplicationThread caller,
     99             in IIntentSender target, in IBinder whitelistToken, in Intent fillInIntent,
    100             in String resolvedType, in IBinder resultTo, in String resultWho, int requestCode,
    101             int flagsMask, int flagsValues, in Bundle options);
    102     WaitResult startActivityAndWait(in IApplicationThread caller, in String callingPackage,
    103             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
    104             int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
    105             int userId);
    106     int startActivityWithConfig(in IApplicationThread caller, in String callingPackage,
    107             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
    108             int requestCode, int startFlags, in Configuration newConfig,
    109             in Bundle options, int userId);
    110     int startVoiceActivity(in String callingPackage, int callingPid, int callingUid,
    111             in Intent intent, in String resolvedType, in IVoiceInteractionSession session,
    112             in IVoiceInteractor interactor, int flags, in ProfilerInfo profilerInfo,
    113             in Bundle options, int userId);
    114     int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
    115             in Intent intent, in String resolvedType, in Bundle options, int userId);
    116     void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver,
    117             in IRecentsAnimationRunner recentsAnimationRunner);
    118     int startActivityFromRecents(int taskId, in Bundle options);
    119     int startActivityAsCaller(in IApplicationThread caller, in String callingPackage,
    120             in Intent intent, in String resolvedType, in IBinder resultTo, in String resultWho,
    121             int requestCode, int flags, in ProfilerInfo profilerInfo, in Bundle options,
    122             IBinder permissionToken, boolean ignoreTargetSecurity, int userId);
    123     boolean isActivityStartAllowedOnDisplay(int displayId, in Intent intent, in String resolvedType,
    124             int userId);
    125 
    126     void unhandledBack();
    127     boolean finishActivity(in IBinder token, int code, in Intent data, int finishTask);
    128     boolean finishActivityAffinity(in IBinder token);
    129 
    130     oneway void activityIdle(in IBinder token, in Configuration config,
    131             in boolean stopProfiling);
    132     void activityResumed(in IBinder token);
    133     void activityTopResumedStateLost();
    134     void activityPaused(in IBinder token);
    135     void activityStopped(in IBinder token, in Bundle state,
    136             in PersistableBundle persistentState, in CharSequence description);
    137     oneway void activityDestroyed(in IBinder token);
    138     void activityRelaunched(in IBinder token);
    139     oneway void activitySlept(in IBinder token);
    140     int getFrontActivityScreenCompatMode();
    141     void setFrontActivityScreenCompatMode(int mode);
    142     String getCallingPackage(in IBinder token);
    143     ComponentName getCallingActivity(in IBinder token);
    144     void setFocusedTask(int taskId);
    145     boolean removeTask(int taskId);
    146     void removeAllVisibleRecentTasks();
    147     List<ActivityManager.RunningTaskInfo> getTasks(int maxNum);
    148     List<ActivityManager.RunningTaskInfo> getFilteredTasks(int maxNum, int ignoreActivityType,
    149             int ignoreWindowingMode);
    150     boolean shouldUpRecreateTask(in IBinder token, in String destAffinity);
    151     boolean navigateUpTo(in IBinder token, in Intent target, int resultCode,
    152             in Intent resultData);
    153     void moveTaskToFront(in IApplicationThread app, in String callingPackage, int task,
    154             int flags, in Bundle options);
    155     int getTaskForActivity(in IBinder token, in boolean onlyRoot);
    156     void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
    157     ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
    158     boolean willActivityBeVisible(in IBinder token);
    159     void setRequestedOrientation(in IBinder token, int requestedOrientation);
    160     int getRequestedOrientation(in IBinder token);
    161     boolean convertFromTranslucent(in IBinder token);
    162     boolean convertToTranslucent(in IBinder token, in Bundle options);
    163     void notifyActivityDrawn(in IBinder token);
    164     void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
    165     int getActivityDisplayId(in IBinder activityToken);
    166     boolean isImmersive(in IBinder token);
    167     void setImmersive(in IBinder token, boolean immersive);
    168     boolean isTopActivityImmersive();
    169     boolean moveActivityTaskToBack(in IBinder token, boolean nonRoot);
    170     ActivityManager.TaskDescription getTaskDescription(int taskId);
    171     void overridePendingTransition(in IBinder token, in String packageName,
    172             int enterAnim, int exitAnim);
    173     int getLaunchedFromUid(in IBinder activityToken);
    174     String getLaunchedFromPackage(in IBinder activityToken);
    175     void reportAssistContextExtras(in IBinder token, in Bundle extras,
    176             in AssistStructure structure, in AssistContent content, in Uri referrer);
    177 
    178     void setFocusedStack(int stackId);
    179     ActivityManager.StackInfo getFocusedStackInfo();
    180     Rect getTaskBounds(int taskId);
    181 
    182     void cancelRecentsAnimation(boolean restoreHomeStackPosition);
    183     void startLockTaskModeByToken(in IBinder token);
    184     void stopLockTaskModeByToken(in IBinder token);
    185     void updateLockTaskPackages(int userId, in String[] packages);
    186     boolean isInLockTaskMode();
    187     int getLockTaskModeState();
    188     void setTaskDescription(in IBinder token, in ActivityManager.TaskDescription values);
    189     Bundle getActivityOptions(in IBinder token);
    190     List<IBinder> getAppTasks(in String callingPackage);
    191     void startSystemLockTaskMode(int taskId);
    192     void stopSystemLockTaskMode();
    193     void finishVoiceTask(in IVoiceInteractionSession session);
    194     boolean isTopOfTask(in IBinder token);
    195     void notifyLaunchTaskBehindComplete(in IBinder token);
    196     void notifyEnterAnimationComplete(in IBinder token);
    197     int addAppTask(in IBinder activityToken, in Intent intent,
    198             in ActivityManager.TaskDescription description, in Bitmap thumbnail);
    199     Point getAppTaskThumbnailSize();
    200     boolean releaseActivityInstance(in IBinder token);
    201     /**
    202      * Only callable from the system. This token grants a temporary permission to call
    203      * #startActivityAsCallerWithToken. The token will time out after
    204      * START_AS_CALLER_TOKEN_TIMEOUT if it is not used.
    205      *
    206      * @param delegatorToken The Binder token referencing the system Activity that wants to delegate
    207      *        the #startActivityAsCaller to another app. The "caller" will be the caller of this
    208      *        activity's token, not the delegate's caller (which is probably the delegator itself).
    209      *
    210      * @return Returns a token that can be given to a "delegate" app that may call
    211      *         #startActivityAsCaller
    212      */
    213     IBinder requestStartActivityPermissionToken(in IBinder delegatorToken);
    214 
    215     void releaseSomeActivities(in IApplicationThread app);
    216     Bitmap getTaskDescriptionIcon(in String filename, int userId);
    217     void startInPlaceAnimationOnFrontMostApplication(in Bundle opts);
    218     void registerTaskStackListener(in ITaskStackListener listener);
    219     void unregisterTaskStackListener(in ITaskStackListener listener);
    220     void setTaskResizeable(int taskId, int resizeableMode);
    221     void toggleFreeformWindowingMode(in IBinder token);
    222     void resizeTask(int taskId, in Rect bounds, int resizeMode);
    223     void moveStackToDisplay(int stackId, int displayId);
    224     void removeStack(int stackId);
    225 
    226     /**
    227      * Sets the windowing mode for a specific task. Only works on tasks of type
    228      * {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD}
    229      * @param taskId The id of the task to set the windowing mode for.
    230      * @param windowingMode The windowing mode to set for the task.
    231      * @param toTop If the task should be moved to the top once the windowing mode changes.
    232      */
    233     void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
    234     void moveTaskToStack(int taskId, int stackId, boolean toTop);
    235     /**
    236      * Resizes the input stack id to the given bounds.
    237      *
    238      * @param stackId Id of the stack to resize.
    239      * @param bounds Bounds to resize the stack to or {@code null} for fullscreen.
    240      * @param allowResizeInDockedMode True if the resize should be allowed when the docked stack is
    241      *                                active.
    242      * @param preserveWindows True if the windows of activities contained in the stack should be
    243      *                        preserved.
    244      * @param animate True if the stack resize should be animated.
    245      * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
    246      *                          default animation duration should be used.
    247      * @throws RemoteException
    248      */
    249     void resizeStack(int stackId, in Rect bounds, boolean allowResizeInDockedMode,
    250             boolean preserveWindows, boolean animate, int animationDuration);
    251     boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
    252             boolean animate, in Rect initialBounds, boolean showRecents);
    253     /**
    254      * Use the offset to adjust the stack boundary with animation.
    255      *
    256      * @param stackId Id of the stack to adjust.
    257      * @param compareBounds Offset is only applied if the current pinned stack bounds is equal to
    258      *                      the compareBounds.
    259      * @param xOffset The horizontal offset.
    260      * @param yOffset The vertical offset.
    261      * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
    262      *                          default animation duration should be used.
    263      * @throws RemoteException
    264      */
    265     void offsetPinnedStackBounds(int stackId, in Rect compareBounds, int xOffset, int yOffset,
    266             int animationDuration);
    267     /**
    268      * Removes stacks in the input windowing modes from the system if they are of activity type
    269      * ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
    270      */
    271     void removeStacksInWindowingModes(in int[] windowingModes);
    272     /** Removes stack of the activity types from the system. */
    273     void removeStacksWithActivityTypes(in int[] activityTypes);
    274 
    275     List<ActivityManager.StackInfo> getAllStackInfos();
    276     ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType);
    277 
    278     /**
    279      * Informs ActivityTaskManagerService that the keyguard is showing.
    280      *
    281      * @param showingKeyguard True if the keyguard is showing, false otherwise.
    282      * @param showingAod True if AOD is showing, false otherwise.
    283      */
    284     void setLockScreenShown(boolean showingKeyguard, boolean showingAod);
    285     Bundle getAssistContextExtras(int requestType);
    286     boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
    287             in Bundle args);
    288     boolean requestAssistContextExtras(int requestType, in IAssistDataReceiver receiver,
    289             in Bundle receiverExtras, in IBinder activityToken,
    290             boolean focused, boolean newSessionId);
    291     boolean requestAutofillData(in IAssistDataReceiver receiver, in Bundle receiverExtras,
    292             in IBinder activityToken, int flags);
    293     boolean isAssistDataAllowedOnCurrentActivity();
    294     boolean showAssistFromActivity(in IBinder token, in Bundle args);
    295     boolean isRootVoiceInteraction(in IBinder token);
    296     oneway void showLockTaskEscapeMessage(in IBinder token);
    297 
    298     /**
    299      * Notify the system that the keyguard is going away.
    300      *
    301      * @param flags See
    302      *              {@link android.view.WindowManagerPolicyConstants#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
    303      *              etc.
    304      */
    305     void keyguardGoingAway(int flags);
    306     ComponentName getActivityClassForToken(in IBinder token);
    307     String getPackageForToken(in IBinder token);
    308 
    309     /**
    310      * Try to place task to provided position. The final position might be different depending on
    311      * current user and stacks state. The task will be moved to target stack if it's currently in
    312      * different stack.
    313      */
    314     void positionTaskInStack(int taskId, int stackId, int position);
    315     void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
    316             in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
    317     /**
    318      * Dismisses split-screen multi-window mode.
    319      * {@param toTop} If true the current primary split-screen stack will be placed or left on top.
    320      */
    321     void dismissSplitScreenMode(boolean toTop);
    322 
    323     /**
    324      * Dismisses PiP
    325      * @param animate True if the dismissal should be animated.
    326      * @param animationDuration The duration of the resize animation in milliseconds or -1 if the
    327      *                          default animation duration should be used.
    328      */
    329     void dismissPip(boolean animate, int animationDuration);
    330     void suppressResizeConfigChanges(boolean suppress);
    331     void moveTasksToFullscreenStack(int fromStackId, boolean onTop);
    332     boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
    333     boolean isInMultiWindowMode(in IBinder token);
    334     boolean isInPictureInPictureMode(in IBinder token);
    335     boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
    336     void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
    337     int getMaxNumPictureInPictureActions(in IBinder token);
    338     IBinder getUriPermissionOwnerForActivity(in IBinder activityToken);
    339 
    340     /**
    341      * Resizes the docked stack, and all other stacks as the result of the dock stack bounds change.
    342      *
    343      * @param dockedBounds The bounds for the docked stack.
    344      * @param tempDockedTaskBounds The temporary bounds for the tasks in the docked stack, which
    345      *                             might be different from the stack bounds to allow more
    346      *                             flexibility while resizing, or {@code null} if they should be the
    347      *                             same as the stack bounds.
    348      * @param tempDockedTaskInsetBounds The temporary bounds for the tasks to calculate the insets.
    349      *                                  When resizing, we usually "freeze" the layout of a task. To
    350      *                                  achieve that, we also need to "freeze" the insets, which
    351      *                                  gets achieved by changing task bounds but not bounds used
    352      *                                  to calculate the insets in this transient state
    353      * @param tempOtherTaskBounds The temporary bounds for the tasks in all other stacks, or
    354      *                            {@code null} if they should be the same as the stack bounds.
    355      * @param tempOtherTaskInsetBounds Like {@code tempDockedTaskInsetBounds}, but for the other
    356      *                                 stacks.
    357      * @throws RemoteException
    358      */
    359     void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
    360             in Rect tempDockedTaskInsetBounds,
    361             in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
    362 
    363     /**
    364      * Sets whether we are currently in an interactive split screen resize operation where we
    365      * are changing the docked stack size.
    366      */
    367     void setSplitScreenResizing(boolean resizing);
    368     int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
    369     void startLocalVoiceInteraction(in IBinder token, in Bundle options);
    370     void stopLocalVoiceInteraction(in IBinder token);
    371     boolean supportsLocalVoiceInteraction();
    372     void notifyPinnedStackAnimationStarted();
    373     void notifyPinnedStackAnimationEnded();
    374 
    375     // Get device configuration
    376     ConfigurationInfo getDeviceConfigurationInfo();
    377 
    378     /**
    379      * Resizes the pinned stack.
    380      *
    381      * @param pinnedBounds The bounds for the pinned stack.
    382      * @param tempPinnedTaskBounds The temporary bounds for the tasks in the pinned stack, which
    383      *                             might be different from the stack bounds to allow more
    384      *                             flexibility while resizing, or {@code null} if they should be the
    385      *                             same as the stack bounds.
    386      */
    387     void resizePinnedStack(in Rect pinnedBounds, in Rect tempPinnedTaskBounds);
    388 
    389     /**
    390      * Updates override configuration applied to specific display.
    391      * @param values Update values for display configuration. If null is passed it will request the
    392      *               Window Manager to compute new config for the specified display.
    393      * @param displayId Id of the display to apply the config to.
    394      * @throws RemoteException
    395      * @return Returns true if the configuration was updated.
    396      */
    397     boolean updateDisplayOverrideConfiguration(in Configuration values, int displayId);
    398     void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback,
    399             in CharSequence message);
    400 
    401     /** Cancels the window transitions for the given task. */
    402     void cancelTaskWindowTransition(int taskId);
    403 
    404     /**
    405      * @param taskId the id of the task to retrieve the sAutoapshots for
    406      * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
    407      *                          a reduced resolution of it, which is much faster
    408      * @return a graphic buffer representing a screenshot of a task
    409      */
    410     ActivityManager.TaskSnapshot getTaskSnapshot(int taskId, boolean reducedResolution);
    411 
    412     /**
    413      * See {@link android.app.Activity#setDisablePreviewScreenshots}
    414      */
    415     void setDisablePreviewScreenshots(IBinder token, boolean disable);
    416 
    417     /**
    418      * Return the user id of last resumed activity.
    419      */
    420     int getLastResumedActivityUserId();
    421 
    422     /**
    423      * Updates global configuration and applies changes to the entire system.
    424      * @param values Update values for global configuration. If null is passed it will request the
    425      *               Window Manager to compute new config for the default display.
    426      * @throws RemoteException
    427      * @return Returns true if the configuration was updated.
    428      */
    429     boolean updateConfiguration(in Configuration values);
    430     void updateLockTaskFeatures(int userId, int flags);
    431 
    432     void setShowWhenLocked(in IBinder token, boolean showWhenLocked);
    433     void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked);
    434     void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
    435 
    436     /**
    437      * Registers remote animations for a specific activity.
    438      */
    439     void registerRemoteAnimations(in IBinder token, in RemoteAnimationDefinition definition);
    440 
    441     /**
    442      * Registers a remote animation to be run for all activity starts from a certain package during
    443      * a short predefined amount of time.
    444      */
    445     void registerRemoteAnimationForNextActivityStart(in String packageName,
    446            in RemoteAnimationAdapter adapter);
    447 
    448     /**
    449      * Registers remote animations for a display.
    450      */
    451     void registerRemoteAnimationsForDisplay(int displayId, in RemoteAnimationDefinition definition);
    452 
    453     /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */
    454     void alwaysShowUnsupportedCompileSdkWarning(in ComponentName activity);
    455 
    456     void setVrThread(int tid);
    457     void setPersistentVrThread(int tid);
    458     void stopAppSwitches();
    459     void resumeAppSwitches();
    460     void setActivityController(in IActivityController watcher, boolean imAMonkey);
    461     void setVoiceKeepAwake(in IVoiceInteractionSession session, boolean keepAwake);
    462 
    463     int getPackageScreenCompatMode(in String packageName);
    464     void setPackageScreenCompatMode(in String packageName, int mode);
    465     boolean getPackageAskScreenCompat(in String packageName);
    466     void setPackageAskScreenCompat(in String packageName, boolean ask);
    467 
    468     /**
    469      * Clears launch params for given packages.
    470      */
    471     void clearLaunchParamsForPackages(in List<String> packageNames);
    472 
    473     /**
    474      * Makes the display with the given id a single task instance display. I.e the display can only
    475      * contain one task.
    476      */
    477     void setDisplayToSingleTaskInstance(int displayId);
    478 
    479     /**
    480      * Restarts the activity by killing its process if it is visible. If the activity is not
    481      * visible, the activity will not be restarted immediately and just keep the activity record in
    482      * the stack. It also resets the current override configuration so the activity will use the
    483      * configuration according to the latest state.
    484      *
    485      * @param activityToken The token of the target activity to restart.
    486      */
    487     void restartActivityProcessIfVisible(in IBinder activityToken);
    488 
    489     /**
    490      * Reports that an Activity received a back key press when there were no additional activities
    491      * on the back stack. If the Activity should be finished, the callback will be invoked. A
    492      * callback is used instead of finishing the activity directly from the server such that the
    493      * client may perform actions prior to finishing.
    494      */
    495     void onBackPressedOnTaskRoot(in IBinder activityToken, in IRequestFinishCallback callback);
    496 }
    497