Loading core/java/android/app/ActivityClient.java +0 −13 Original line number Diff line number Diff line Loading @@ -431,19 +431,6 @@ public class ActivityClient { } } /** * Restart the process and activity to adopt the latest configuration for size compat mode. * This only takes effect for visible activity because invisible background activity can be * restarted naturally when it becomes visible. */ public void restartActivityProcessIfVisible(IBinder token) { try { getActivityClientController().restartActivityProcessIfVisible(token); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /** Removes the snapshot of home task. */ public void invalidateHomeTaskSnapshot(IBinder homeToken) { try { Loading core/java/android/app/IActivityClientController.aidl +0 −10 Original line number Diff line number Diff line Loading @@ -116,16 +116,6 @@ interface IActivityClientController { /** See {@link android.app.Activity#setDisablePreviewScreenshots}. */ oneway void setDisablePreviewScreenshots(in IBinder token, boolean disable); /** * Restarts the activity by killing its process if it is visible. If the activity is not * visible, the activity will not be restarted immediately and just keep the activity record in * the stack. It also resets the current override configuration so the activity will use the * configuration according to the latest state. * * @param activityToken The token of the target activity to restart. */ void restartActivityProcessIfVisible(in IBinder activityToken); /** * It should only be called from home activity to remove its outdated snapshot. The home * snapshot is used to speed up entering home from screen off. If the content of home activity Loading core/java/android/app/TaskInfo.java +1 −12 Original line number Diff line number Diff line Loading @@ -186,13 +186,6 @@ public class TaskInfo { @Nullable public ActivityInfo topActivityInfo; /** * The top activity in this task. * @hide */ @Nullable public IBinder topActivityToken; /** * Whether the direct top activity is in size compat mode on foreground. * @hide Loading Loading @@ -356,8 +349,7 @@ public class TaskInfo { return displayId == that.displayId && taskId == that.taskId && topActivityInSizeCompat == that.topActivityInSizeCompat // TopActivityToken and bounds are important if top activity is in size compat && (!topActivityInSizeCompat || topActivityToken.equals(that.topActivityToken)) // Bounds are important if top activity is in size compat && (!topActivityInSizeCompat || configuration.windowConfiguration.getBounds() .equals(that.configuration.windowConfiguration.getBounds())) && (!topActivityInSizeCompat || configuration.getLayoutDirection() Loading Loading @@ -396,7 +388,6 @@ public class TaskInfo { parentTaskId = source.readInt(); isFocused = source.readBoolean(); isVisible = source.readBoolean(); topActivityToken = source.readStrongBinder(); topActivityInSizeCompat = source.readBoolean(); mTopActivityLocusId = source.readTypedObject(LocusId.CREATOR); } Loading Loading @@ -434,7 +425,6 @@ public class TaskInfo { dest.writeInt(parentTaskId); dest.writeBoolean(isFocused); dest.writeBoolean(isVisible); dest.writeStrongBinder(topActivityToken); dest.writeBoolean(topActivityInSizeCompat); dest.writeTypedObject(mTopActivityLocusId, flags); } Loading Loading @@ -462,7 +452,6 @@ public class TaskInfo { + " parentTaskId=" + parentTaskId + " isFocused=" + isFocused + " isVisible=" + isVisible + " topActivityToken=" + topActivityToken + " topActivityInSizeCompat=" + topActivityInSizeCompat + " locusId= " + mTopActivityLocusId + "}"; Loading core/java/android/window/ITaskOrganizerController.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,9 @@ interface ITaskOrganizerController { */ void setInterceptBackPressedOnTaskRoot(in WindowContainerToken task, boolean interceptBackPressed); /** * Restarts the top activity in the given task by killing its process if it is visible. */ void restartTaskTopActivityProcessIfVisible(in WindowContainerToken task); } core/java/android/window/TaskOrganizer.java +13 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,19 @@ public class TaskOrganizer extends WindowOrganizer { } } /** * Restarts the top activity in the given task by killing its process if it is visible. * @hide */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public void restartTaskTopActivityProcessIfVisible(@NonNull WindowContainerToken task) { try { mTaskOrganizerController.restartTaskTopActivityProcessIfVisible(task); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets the executor to run callbacks on. * @hide Loading Loading
core/java/android/app/ActivityClient.java +0 −13 Original line number Diff line number Diff line Loading @@ -431,19 +431,6 @@ public class ActivityClient { } } /** * Restart the process and activity to adopt the latest configuration for size compat mode. * This only takes effect for visible activity because invisible background activity can be * restarted naturally when it becomes visible. */ public void restartActivityProcessIfVisible(IBinder token) { try { getActivityClientController().restartActivityProcessIfVisible(token); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } /** Removes the snapshot of home task. */ public void invalidateHomeTaskSnapshot(IBinder homeToken) { try { Loading
core/java/android/app/IActivityClientController.aidl +0 −10 Original line number Diff line number Diff line Loading @@ -116,16 +116,6 @@ interface IActivityClientController { /** See {@link android.app.Activity#setDisablePreviewScreenshots}. */ oneway void setDisablePreviewScreenshots(in IBinder token, boolean disable); /** * Restarts the activity by killing its process if it is visible. If the activity is not * visible, the activity will not be restarted immediately and just keep the activity record in * the stack. It also resets the current override configuration so the activity will use the * configuration according to the latest state. * * @param activityToken The token of the target activity to restart. */ void restartActivityProcessIfVisible(in IBinder activityToken); /** * It should only be called from home activity to remove its outdated snapshot. The home * snapshot is used to speed up entering home from screen off. If the content of home activity Loading
core/java/android/app/TaskInfo.java +1 −12 Original line number Diff line number Diff line Loading @@ -186,13 +186,6 @@ public class TaskInfo { @Nullable public ActivityInfo topActivityInfo; /** * The top activity in this task. * @hide */ @Nullable public IBinder topActivityToken; /** * Whether the direct top activity is in size compat mode on foreground. * @hide Loading Loading @@ -356,8 +349,7 @@ public class TaskInfo { return displayId == that.displayId && taskId == that.taskId && topActivityInSizeCompat == that.topActivityInSizeCompat // TopActivityToken and bounds are important if top activity is in size compat && (!topActivityInSizeCompat || topActivityToken.equals(that.topActivityToken)) // Bounds are important if top activity is in size compat && (!topActivityInSizeCompat || configuration.windowConfiguration.getBounds() .equals(that.configuration.windowConfiguration.getBounds())) && (!topActivityInSizeCompat || configuration.getLayoutDirection() Loading Loading @@ -396,7 +388,6 @@ public class TaskInfo { parentTaskId = source.readInt(); isFocused = source.readBoolean(); isVisible = source.readBoolean(); topActivityToken = source.readStrongBinder(); topActivityInSizeCompat = source.readBoolean(); mTopActivityLocusId = source.readTypedObject(LocusId.CREATOR); } Loading Loading @@ -434,7 +425,6 @@ public class TaskInfo { dest.writeInt(parentTaskId); dest.writeBoolean(isFocused); dest.writeBoolean(isVisible); dest.writeStrongBinder(topActivityToken); dest.writeBoolean(topActivityInSizeCompat); dest.writeTypedObject(mTopActivityLocusId, flags); } Loading Loading @@ -462,7 +452,6 @@ public class TaskInfo { + " parentTaskId=" + parentTaskId + " isFocused=" + isFocused + " isVisible=" + isVisible + " topActivityToken=" + topActivityToken + " topActivityInSizeCompat=" + topActivityInSizeCompat + " locusId= " + mTopActivityLocusId + "}"; Loading
core/java/android/window/ITaskOrganizerController.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,9 @@ interface ITaskOrganizerController { */ void setInterceptBackPressedOnTaskRoot(in WindowContainerToken task, boolean interceptBackPressed); /** * Restarts the top activity in the given task by killing its process if it is visible. */ void restartTaskTopActivityProcessIfVisible(in WindowContainerToken task); }
core/java/android/window/TaskOrganizer.java +13 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,19 @@ public class TaskOrganizer extends WindowOrganizer { } } /** * Restarts the top activity in the given task by killing its process if it is visible. * @hide */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public void restartTaskTopActivityProcessIfVisible(@NonNull WindowContainerToken task) { try { mTaskOrganizerController.restartTaskTopActivityProcessIfVisible(task); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets the executor to run callbacks on. * @hide Loading