Merge "Add persistentFeature application attribute." into oc-dev
am: e4960cf495
Change-Id: Idf9355d092efa1ffb7eacd9299e3a8471396d3d6
This commit is contained in:
@@ -993,6 +993,7 @@ package android {
|
||||
field public static final int persistableMode = 16843821; // 0x101042d
|
||||
field public static final int persistent = 16842765; // 0x101000d
|
||||
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
|
||||
field public static final int persistentFeature = 16844134; // 0x1010566
|
||||
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
|
||||
field public static final int pivotX = 16843189; // 0x10101b5
|
||||
field public static final int pivotY = 16843190; // 0x10101b6
|
||||
|
||||
@@ -1109,6 +1109,7 @@ package android {
|
||||
field public static final int persistableMode = 16843821; // 0x101042d
|
||||
field public static final int persistent = 16842765; // 0x101000d
|
||||
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
|
||||
field public static final int persistentFeature = 16844134; // 0x1010566
|
||||
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
|
||||
field public static final int pivotX = 16843189; // 0x10101b5
|
||||
field public static final int pivotY = 16843190; // 0x10101b6
|
||||
|
||||
@@ -993,6 +993,7 @@ package android {
|
||||
field public static final int persistableMode = 16843821; // 0x101042d
|
||||
field public static final int persistent = 16842765; // 0x101000d
|
||||
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
|
||||
field public static final int persistentFeature = 16844134; // 0x1010566
|
||||
field public static final deprecated int phoneNumber = 16843111; // 0x1010167
|
||||
field public static final int pivotX = 16843189; // 0x10101b5
|
||||
field public static final int pivotY = 16843190; // 0x10101b6
|
||||
|
||||
@@ -1761,6 +1761,17 @@ public abstract class PackageManager {
|
||||
@SdkConstant(SdkConstantType.FEATURE)
|
||||
public static final String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
|
||||
|
||||
/**
|
||||
* Feature for {@link #getSystemAvailableFeatures} and
|
||||
* {@link #hasSystemFeature}: The device supports any
|
||||
* one of the {@link #FEATURE_NFC}, {@link #FEATURE_NFC_HOST_CARD_EMULATION},
|
||||
* or {@link #FEATURE_NFC_HOST_CARD_EMULATION_NFCF} features.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.FEATURE)
|
||||
public static final String FEATURE_NFC_ANY = "android.hardware.nfc.any";
|
||||
|
||||
/**
|
||||
* Feature for {@link #getSystemAvailableFeatures} and
|
||||
* {@link #hasSystemFeature}: The device supports the OpenGL ES
|
||||
|
||||
@@ -3363,7 +3363,12 @@ public class PackageParser {
|
||||
if (sa.getBoolean(
|
||||
com.android.internal.R.styleable.AndroidManifestApplication_persistent,
|
||||
false)) {
|
||||
ai.flags |= ApplicationInfo.FLAG_PERSISTENT;
|
||||
// Check if persistence is based on a feature being present
|
||||
final String requiredFeature = sa.getNonResourceString(
|
||||
com.android.internal.R.styleable.AndroidManifestApplication_persistentFeature);
|
||||
if (requiredFeature == null || mCallback.hasFeature(requiredFeature)) {
|
||||
ai.flags |= ApplicationInfo.FLAG_PERSISTENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,6 +322,10 @@
|
||||
your application running at all times. -->
|
||||
<attr name="persistent" format="boolean" />
|
||||
|
||||
<!-- If set, the "persistent" attribute will only be honored if the feature
|
||||
specified here is present on the device. -->
|
||||
<attr name="persistentFeature" format="string" />
|
||||
|
||||
<!-- Flag to specify if this application needs to be present for all users. Only pre-installed
|
||||
applications can request this feature. Default value is false. -->
|
||||
<attr name="requiredForAllUsers" format="boolean" />
|
||||
@@ -1358,6 +1362,7 @@
|
||||
for normal behavior. -->
|
||||
<attr name="hasCode" format="boolean" />
|
||||
<attr name="persistent" />
|
||||
<attr name="persistentFeature" />
|
||||
<attr name="requiredForAllUsers" />
|
||||
<!-- Specify whether the components in this application are enabled or not (that is, can be
|
||||
instantiated by the system).
|
||||
|
||||
@@ -2815,6 +2815,7 @@
|
||||
<public name="maxAspectRatio"/>
|
||||
<public name="iconSpaceReserved"/>
|
||||
<public name="defaultFocusHighlightEnabled" />
|
||||
<public name="persistentFeature"/>
|
||||
</public-group>
|
||||
|
||||
<public-group type="style" first-id="0x010302e0">
|
||||
|
||||
Reference in New Issue
Block a user