Merge "Add manifest attribute for VR activities." into nyc-dev
This commit is contained in:
@@ -513,6 +513,7 @@ package android {
|
|||||||
field public static final int elevation = 16843840; // 0x1010440
|
field public static final int elevation = 16843840; // 0x1010440
|
||||||
field public static final int ellipsize = 16842923; // 0x10100ab
|
field public static final int ellipsize = 16842923; // 0x10100ab
|
||||||
field public static final int ems = 16843096; // 0x1010158
|
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 enabled = 16842766; // 0x101000e
|
||||||
field public static final int end = 16843996; // 0x10104dc
|
field public static final int end = 16843996; // 0x10104dc
|
||||||
field public static final int endColor = 16843166; // 0x101019e
|
field public static final int endColor = 16843166; // 0x101019e
|
||||||
|
|||||||
@@ -617,6 +617,7 @@ package android {
|
|||||||
field public static final int elevation = 16843840; // 0x1010440
|
field public static final int elevation = 16843840; // 0x1010440
|
||||||
field public static final int ellipsize = 16842923; // 0x10100ab
|
field public static final int ellipsize = 16842923; // 0x10100ab
|
||||||
field public static final int ems = 16843096; // 0x1010158
|
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 enabled = 16842766; // 0x101000e
|
||||||
field public static final int end = 16843996; // 0x10104dc
|
field public static final int end = 16843996; // 0x10104dc
|
||||||
field public static final int endColor = 16843166; // 0x101019e
|
field public static final int endColor = 16843166; // 0x101019e
|
||||||
|
|||||||
@@ -513,6 +513,7 @@ package android {
|
|||||||
field public static final int elevation = 16843840; // 0x1010440
|
field public static final int elevation = 16843840; // 0x1010440
|
||||||
field public static final int ellipsize = 16842923; // 0x10100ab
|
field public static final int ellipsize = 16842923; // 0x10100ab
|
||||||
field public static final int ems = 16843096; // 0x1010158
|
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 enabled = 16842766; // 0x101000e
|
||||||
field public static final int end = 16843996; // 0x10104dc
|
field public static final int end = 16843996; // 0x10104dc
|
||||||
field public static final int endColor = 16843166; // 0x101019e
|
field public static final int endColor = 16843166; // 0x101019e
|
||||||
|
|||||||
@@ -190,6 +190,13 @@ public class ActivityInfo extends ComponentInfo
|
|||||||
*/
|
*/
|
||||||
public int resizeMode;
|
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
|
* Bit in {@link #flags} indicating whether this activity is able to
|
||||||
* run in multiple processes. If
|
* run in multiple processes. If
|
||||||
@@ -794,6 +801,7 @@ public class ActivityInfo extends ComponentInfo
|
|||||||
lockTaskLaunchMode = orig.lockTaskLaunchMode;
|
lockTaskLaunchMode = orig.lockTaskLaunchMode;
|
||||||
windowLayout = orig.windowLayout;
|
windowLayout = orig.windowLayout;
|
||||||
resizeMode = orig.resizeMode;
|
resizeMode = orig.resizeMode;
|
||||||
|
requestedVrComponent = orig.requestedVrComponent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -896,6 +904,9 @@ public class ActivityInfo extends ComponentInfo
|
|||||||
+ windowLayout.heightFraction + ", " + windowLayout.gravity);
|
+ windowLayout.heightFraction + ", " + windowLayout.gravity);
|
||||||
}
|
}
|
||||||
pw.println(prefix + "resizeMode=" + resizeModeToString(resizeMode));
|
pw.println(prefix + "resizeMode=" + resizeModeToString(resizeMode));
|
||||||
|
if (requestedVrComponent != null) {
|
||||||
|
pw.println(prefix + "requestedVrComponent=" + requestedVrComponent);
|
||||||
|
}
|
||||||
super.dumpBack(pw, prefix, flags);
|
super.dumpBack(pw, prefix, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -939,6 +950,7 @@ public class ActivityInfo extends ComponentInfo
|
|||||||
dest.writeInt(0);
|
dest.writeInt(0);
|
||||||
}
|
}
|
||||||
dest.writeInt(resizeMode);
|
dest.writeInt(resizeMode);
|
||||||
|
dest.writeString(requestedVrComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Parcelable.Creator<ActivityInfo> CREATOR
|
public static final Parcelable.Creator<ActivityInfo> CREATOR
|
||||||
@@ -972,6 +984,7 @@ public class ActivityInfo extends ComponentInfo
|
|||||||
windowLayout = new WindowLayout(source);
|
windowLayout = new WindowLayout(source);
|
||||||
}
|
}
|
||||||
resizeMode = source.readInt();
|
resizeMode = source.readInt();
|
||||||
|
requestedVrComponent = source.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3532,6 +3532,9 @@ public class PackageParser {
|
|||||||
a.info.encryptionAware = a.info.directBootAware = sa.getBoolean(
|
a.info.encryptionAware = a.info.directBootAware = sa.getBoolean(
|
||||||
R.styleable.AndroidManifestActivity_directBootAware,
|
R.styleable.AndroidManifestActivity_directBootAware,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
|
a.info.requestedVrComponent =
|
||||||
|
sa.getString(R.styleable.AndroidManifestActivity_enableVrMode);
|
||||||
} else {
|
} else {
|
||||||
a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
|
a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
|
||||||
a.info.configChanges = 0;
|
a.info.configChanges = 0;
|
||||||
|
|||||||
@@ -552,6 +552,15 @@
|
|||||||
should not be interrupted with other activities or notifications. -->
|
should not be interrupted with other activities or notifications. -->
|
||||||
<attr name="immersive" format="boolean" />
|
<attr name="immersive" format="boolean" />
|
||||||
|
|
||||||
|
<!-- Flag declaring that this activity will be run in VR mode, and specifying
|
||||||
|
the component of the VrListenerService that should be bound while this
|
||||||
|
Activity is visible if installed and enabled on this device. This is
|
||||||
|
equivalent to calling {@link android.app.Activity#setVrModeEnabled} with the
|
||||||
|
the given component name within this Activity. Declaring this will prevent
|
||||||
|
the system from leaving VR mode during an Activity transtion one VR activity
|
||||||
|
to another. -->
|
||||||
|
<attr name="enableVrMode" format="string" />
|
||||||
|
|
||||||
<!-- Specify the order in which content providers hosted by a process
|
<!-- Specify the order in which content providers hosted by a process
|
||||||
are instantiated when that process is created. Not needed unless
|
are instantiated when that process is created. Not needed unless
|
||||||
you have providers with dependencies between each other, to make
|
you have providers with dependencies between each other, to make
|
||||||
@@ -1884,6 +1893,7 @@
|
|||||||
For example, {@link android.R.attr#supportsPictureInPicture} activities are placed
|
For example, {@link android.R.attr#supportsPictureInPicture} activities are placed
|
||||||
in a task/stack that isn't focusable. This flag allows them to be focusable.-->
|
in a task/stack that isn't focusable. This flag allows them to be focusable.-->
|
||||||
<attr name="alwaysFocusable" format="boolean" />
|
<attr name="alwaysFocusable" format="boolean" />
|
||||||
|
<attr name="enableVrMode" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<!-- The <code>activity-alias</code> tag declares a new
|
<!-- The <code>activity-alias</code> tag declares a new
|
||||||
|
|||||||
@@ -2714,6 +2714,7 @@
|
|||||||
<public type="attr" name="contentInsetStartWithNavigation" />
|
<public type="attr" name="contentInsetStartWithNavigation" />
|
||||||
<public type="attr" name="contentInsetEndWithActions" />
|
<public type="attr" name="contentInsetEndWithActions" />
|
||||||
<public type="attr" name="numberPickerStyle" />
|
<public type="attr" name="numberPickerStyle" />
|
||||||
|
<public type="attr" name="enableVrMode" />
|
||||||
|
|
||||||
<public type="style" name="Theme.Material.Light.DialogWhenLarge.DarkActionBar" />
|
<public type="style" name="Theme.Material.Light.DialogWhenLarge.DarkActionBar" />
|
||||||
<public type="style" name="Widget.Material.SeekBar.Discrete" />
|
<public type="style" name="Widget.Material.SeekBar.Discrete" />
|
||||||
|
|||||||
@@ -721,6 +721,9 @@ final class ActivityRecord {
|
|||||||
}
|
}
|
||||||
|
|
||||||
immersive = (aInfo.flags & ActivityInfo.FLAG_IMMERSIVE) != 0;
|
immersive = (aInfo.flags & ActivityInfo.FLAG_IMMERSIVE) != 0;
|
||||||
|
|
||||||
|
requestedVrComponent = (aInfo.requestedVrComponent == null) ?
|
||||||
|
null : ComponentName.unflattenFromString(aInfo.requestedVrComponent);
|
||||||
} else {
|
} else {
|
||||||
realActivity = null;
|
realActivity = null;
|
||||||
taskAffinity = null;
|
taskAffinity = null;
|
||||||
@@ -732,6 +735,7 @@ final class ActivityRecord {
|
|||||||
noDisplay = false;
|
noDisplay = false;
|
||||||
mActivityType = APPLICATION_ACTIVITY_TYPE;
|
mActivityType = APPLICATION_ACTIVITY_TYPE;
|
||||||
immersive = false;
|
immersive = false;
|
||||||
|
requestedVrComponent = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user