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

Commit f56c9f43 authored by Ruben Brunk's avatar Ruben Brunk
Browse files

Add manifest attribute for VR activities.

- Allow jank-free VR->VR activity transitions, even during
  long activity transitions.

Bug: 28115931
Change-Id: I1e3fd1a5245bac3433ea6282cb1c7a71f0e0266f
parent b56b72a8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -514,6 +514,7 @@ package android {
    field public static final int elevation = 16843840; // 0x1010440
    field public static final int ellipsize = 16842923; // 0x10100ab
    field public static final int ems = 16843096; // 0x1010158
    field public static final int enableVrMode = 16844072; // 0x1010528
    field public static final int enabled = 16842766; // 0x101000e
    field public static final int end = 16843996; // 0x10104dc
    field public static final int endColor = 16843166; // 0x101019e
+1 −0
Original line number Diff line number Diff line
@@ -611,6 +611,7 @@ package android {
    field public static final int elevation = 16843840; // 0x1010440
    field public static final int ellipsize = 16842923; // 0x10100ab
    field public static final int ems = 16843096; // 0x1010158
    field public static final int enableVrMode = 16844072; // 0x1010528
    field public static final int enabled = 16842766; // 0x101000e
    field public static final int end = 16843996; // 0x10104dc
    field public static final int endColor = 16843166; // 0x101019e
+1 −0
Original line number Diff line number Diff line
@@ -514,6 +514,7 @@ package android {
    field public static final int elevation = 16843840; // 0x1010440
    field public static final int ellipsize = 16842923; // 0x10100ab
    field public static final int ems = 16843096; // 0x1010158
    field public static final int enableVrMode = 16844072; // 0x1010528
    field public static final int enabled = 16842766; // 0x101000e
    field public static final int end = 16843996; // 0x10104dc
    field public static final int endColor = 16843166; // 0x101019e
+13 −0
Original line number Diff line number Diff line
@@ -190,6 +190,13 @@ public class ActivityInfo extends ComponentInfo
     */
    public int resizeMode;

    /**
     * Name of the VrListenerService component to run for this activity.
     * @see android.R.attr#enableVrMode
     * @hide
     */
    public String requestedVrComponent;

    /**
     * Bit in {@link #flags} indicating whether this activity is able to
     * run in multiple processes.  If
@@ -794,6 +801,7 @@ public class ActivityInfo extends ComponentInfo
        lockTaskLaunchMode = orig.lockTaskLaunchMode;
        windowLayout = orig.windowLayout;
        resizeMode = orig.resizeMode;
        requestedVrComponent = orig.requestedVrComponent;
    }

    /**
@@ -896,6 +904,9 @@ public class ActivityInfo extends ComponentInfo
                    + windowLayout.heightFraction + ", " + windowLayout.gravity);
        }
        pw.println(prefix + "resizeMode=" + resizeModeToString(resizeMode));
        if (requestedVrComponent != null) {
            pw.println(prefix + "requestedVrComponent=" + requestedVrComponent);
        }
        super.dumpBack(pw, prefix, flags);
    }

@@ -939,6 +950,7 @@ public class ActivityInfo extends ComponentInfo
            dest.writeInt(0);
        }
        dest.writeInt(resizeMode);
        dest.writeString(requestedVrComponent);
    }

    public static final Parcelable.Creator<ActivityInfo> CREATOR
@@ -972,6 +984,7 @@ public class ActivityInfo extends ComponentInfo
            windowLayout = new WindowLayout(source);
        }
        resizeMode = source.readInt();
        requestedVrComponent = source.readString();
    }

    /**
+3 −0
Original line number Diff line number Diff line
@@ -3554,6 +3554,9 @@ public class PackageParser {
            a.info.encryptionAware = a.info.directBootAware = sa.getBoolean(
                    R.styleable.AndroidManifestActivity_directBootAware,
                    false);

            a.info.requestedVrComponent =
                sa.getString(R.styleable.AndroidManifestActivity_enableVrMode);
        } else {
            a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
            a.info.configChanges = 0;
Loading