diff options
| author | Ruben Brunk <rubenbrunk@google.com> | 2016-04-26 22:05:28 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-04-26 22:05:30 +0000 |
| commit | f84b3e0e2fe11c8ee1d86ad44236ba4129fc3ae1 (patch) | |
| tree | fa5e0b962b8e8bf7f4f63d926b561b6de46dbd22 /core/java | |
| parent | 5475c951bc5efff1f67ac61e2be46b0a3a18408e (diff) | |
| parent | f56c9f432bafda9765f5ffcb25be5259645e121d (diff) | |
Merge "Add manifest attribute for VR activities." into nyc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 13 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index 0f4cbbba707b..167befc089dd 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -191,6 +191,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 * true, the system may instantiate it in the some process as the @@ -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(); } /** diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 54091db79779..65020224914c 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -3532,6 +3532,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; |
