Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4510,6 +4510,7 @@ package android.app { method @NonNull public final <T extends android.view.View> T requireViewById(@IdRes int); method public final void runOnUiThread(Runnable); method public void setActionBar(@Nullable android.widget.Toolbar); method public void setAllowCrossUidActivitySwitchFromBelow(boolean); method public void setContentTransitionManager(android.transition.TransitionManager); method public void setContentView(@LayoutRes int); method public void setContentView(android.view.View); core/java/android/app/Activity.java +18 −0 Original line number Diff line number Diff line Loading @@ -9192,6 +9192,24 @@ public class Activity extends ContextThemeWrapper ActivityClient.getInstance().setTurnScreenOn(mToken, turnScreenOn); } /** * Specifies whether the activities below this one in the task can also start other activities * or finish the task. * <p> * Starting from Target SDK Level {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, apps * are blocked from starting new activities or finishing their task unless the top activity of * such task belong to the same UID for security reasons. * <p> * Setting this flag to {@code true} will allow the launching app to ignore the restriction if * this activity is on top. Apps matching the UID of this activity are always exempt. * * @param allowed {@code true} to disable the UID restrictions; {@code false} to revert back to * the default behaviour */ public void setAllowCrossUidActivitySwitchFromBelow(boolean allowed) { ActivityClient.getInstance().setAllowCrossUidActivitySwitchFromBelow(mToken, allowed); } /** * Registers remote animations per transition type for this activity. * Loading core/java/android/app/ActivityClient.java +8 −0 Original line number Diff line number Diff line Loading @@ -478,6 +478,14 @@ public class ActivityClient { } } void setAllowCrossUidActivitySwitchFromBelow(IBinder token, boolean allowed) { try { getActivityClientController().setAllowCrossUidActivitySwitchFromBelow(token, allowed); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } int setVrMode(IBinder token, boolean enabled, ComponentName packageName) { try { return getActivityClientController().setVrMode(token, enabled, packageName); Loading core/java/android/app/IActivityClientController.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ interface IActivityClientController { oneway void setShowWhenLocked(in IBinder token, boolean showWhenLocked); oneway void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked); oneway void setTurnScreenOn(in IBinder token, boolean turnScreenOn); oneway void setAllowCrossUidActivitySwitchFromBelow(in IBinder token, boolean allowed); oneway void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle); oneway void overrideActivityTransition(IBinder token, boolean open, int enterAnim, int exitAnim, int backgroundColor); Loading services/core/java/com/android/server/wm/ActivityClientController.java +14 −0 Original line number Diff line number Diff line Loading @@ -1365,6 +1365,20 @@ class ActivityClientController extends IActivityClientController.Stub { } } public void setAllowCrossUidActivitySwitchFromBelow(IBinder token, boolean allowed) { final long origId = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { final ActivityRecord r = ActivityRecord.isInRootTaskLocked(token); if (r != null) { r.setAllowCrossUidActivitySwitchFromBelow(allowed); } } } finally { Binder.restoreCallingIdentity(origId); } } @Override public void reportActivityFullyDrawn(IBinder token, boolean restoredFromBundle) { final long origId = Binder.clearCallingIdentity(); Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4510,6 +4510,7 @@ package android.app { method @NonNull public final <T extends android.view.View> T requireViewById(@IdRes int); method public final void runOnUiThread(Runnable); method public void setActionBar(@Nullable android.widget.Toolbar); method public void setAllowCrossUidActivitySwitchFromBelow(boolean); method public void setContentTransitionManager(android.transition.TransitionManager); method public void setContentView(@LayoutRes int); method public void setContentView(android.view.View);
core/java/android/app/Activity.java +18 −0 Original line number Diff line number Diff line Loading @@ -9192,6 +9192,24 @@ public class Activity extends ContextThemeWrapper ActivityClient.getInstance().setTurnScreenOn(mToken, turnScreenOn); } /** * Specifies whether the activities below this one in the task can also start other activities * or finish the task. * <p> * Starting from Target SDK Level {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, apps * are blocked from starting new activities or finishing their task unless the top activity of * such task belong to the same UID for security reasons. * <p> * Setting this flag to {@code true} will allow the launching app to ignore the restriction if * this activity is on top. Apps matching the UID of this activity are always exempt. * * @param allowed {@code true} to disable the UID restrictions; {@code false} to revert back to * the default behaviour */ public void setAllowCrossUidActivitySwitchFromBelow(boolean allowed) { ActivityClient.getInstance().setAllowCrossUidActivitySwitchFromBelow(mToken, allowed); } /** * Registers remote animations per transition type for this activity. * Loading
core/java/android/app/ActivityClient.java +8 −0 Original line number Diff line number Diff line Loading @@ -478,6 +478,14 @@ public class ActivityClient { } } void setAllowCrossUidActivitySwitchFromBelow(IBinder token, boolean allowed) { try { getActivityClientController().setAllowCrossUidActivitySwitchFromBelow(token, allowed); } catch (RemoteException e) { e.rethrowFromSystemServer(); } } int setVrMode(IBinder token, boolean enabled, ComponentName packageName) { try { return getActivityClientController().setVrMode(token, enabled, packageName); Loading
core/java/android/app/IActivityClientController.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ interface IActivityClientController { oneway void setShowWhenLocked(in IBinder token, boolean showWhenLocked); oneway void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked); oneway void setTurnScreenOn(in IBinder token, boolean turnScreenOn); oneway void setAllowCrossUidActivitySwitchFromBelow(in IBinder token, boolean allowed); oneway void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle); oneway void overrideActivityTransition(IBinder token, boolean open, int enterAnim, int exitAnim, int backgroundColor); Loading
services/core/java/com/android/server/wm/ActivityClientController.java +14 −0 Original line number Diff line number Diff line Loading @@ -1365,6 +1365,20 @@ class ActivityClientController extends IActivityClientController.Stub { } } public void setAllowCrossUidActivitySwitchFromBelow(IBinder token, boolean allowed) { final long origId = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { final ActivityRecord r = ActivityRecord.isInRootTaskLocked(token); if (r != null) { r.setAllowCrossUidActivitySwitchFromBelow(allowed); } } } finally { Binder.restoreCallingIdentity(origId); } } @Override public void reportActivityFullyDrawn(IBinder token, boolean restoredFromBundle) { final long origId = Binder.clearCallingIdentity(); Loading