Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1fba70f authored by Michael Groover's avatar Michael Groover
Browse files

Expose ActivityOptions#isShareIdentityEnabled API

Android U introduced new APIs to allow a launching app to share its
identity with a launched activity. This commit exposes a new API
in ActivityOptions to return whether a launching app has opted-in to
sharing its identity from an instance of ActivityOptions.

Bug: 262712655
Test: atest ShareIdentityTest
Change-Id: I6f77ed7151baa3ca572ef58a1867a91c98403a97
parent 9e5f1194
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4611,6 +4611,7 @@ package android.app {
    method public boolean getLockTaskMode();
    method public int getSplashScreenStyle();
    method public boolean isPendingIntentBackgroundActivityLaunchAllowed();
    method public boolean isShareIdentityEnabled();
    method public static android.app.ActivityOptions makeBasic();
    method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int);
    method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int);
+3 −3
Original line number Diff line number Diff line
@@ -1499,13 +1499,13 @@ public class ActivityOptions extends ComponentOptions {
     * Returns whether the launching app has opted-in to sharing its identity with the launched
     * activity.
     *
     * @return {@code true} if the launching app has opted-in to sharing its identity
     *
     * @see #setShareIdentityEnabled(boolean)
     * @see Activity#getLaunchedFromUid()
     * @see Activity#getLaunchedFromPackage()
     *
     * @hide
     */
    public boolean getShareIdentity() {
    public boolean isShareIdentityEnabled() {
        return mShareIdentity;
    }

+1 −1
Original line number Diff line number Diff line
@@ -2003,7 +2003,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

            mOverrideTaskTransition = options.getOverrideTaskTransition();
            mDismissKeyguard = options.getDismissKeyguard();
            mShareIdentity = options.getShareIdentity();
            mShareIdentity = options.isShareIdentityEnabled();
        }

        ColorDisplayService.ColorDisplayServiceInternal cds = LocalServices.getService(