Merge "Introduce 'dataExtractionRules' manifest attribute" into sc-dev am: f7bc904f44
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13586918 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iaf2a12ad990212166270713076e123843735d6cd
This commit is contained in:
@@ -507,6 +507,7 @@ package android {
|
|||||||
field public static final int dashGap = 16843175; // 0x10101a7
|
field public static final int dashGap = 16843175; // 0x10101a7
|
||||||
field public static final int dashWidth = 16843174; // 0x10101a6
|
field public static final int dashWidth = 16843174; // 0x10101a6
|
||||||
field public static final int data = 16842798; // 0x101002e
|
field public static final int data = 16842798; // 0x101002e
|
||||||
|
field public static final int dataExtractionRules = 16844350; // 0x101063e
|
||||||
field public static final int datePickerDialogTheme = 16843948; // 0x10104ac
|
field public static final int datePickerDialogTheme = 16843948; // 0x10104ac
|
||||||
field public static final int datePickerMode = 16843955; // 0x10104b3
|
field public static final int datePickerMode = 16843955; // 0x10104b3
|
||||||
field public static final int datePickerStyle = 16843612; // 0x101035c
|
field public static final int datePickerStyle = 16843612; // 0x101035c
|
||||||
|
|||||||
@@ -135,6 +135,18 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||||
public int fullBackupContent = 0;
|
public int fullBackupContent = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applications can set this attribute to an xml resource within their app where they specified
|
||||||
|
* the rules determining which files and directories can be copied from the device as part of
|
||||||
|
* backup or transfer operations.
|
||||||
|
*<p>
|
||||||
|
* Set from the {@link android.R.styleable#AndroidManifestApplication_dataExtractionRules}
|
||||||
|
* attribute in the manifest.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public int dataExtractionRulesRes = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>true</code> if the package is capable of presenting a unified interface representing
|
* <code>true</code> if the package is capable of presenting a unified interface representing
|
||||||
* multiple profiles.
|
* multiple profiles.
|
||||||
@@ -1520,6 +1532,9 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
pw.println(prefix + "fullBackupContent="
|
pw.println(prefix + "fullBackupContent="
|
||||||
+ (fullBackupContent < 0 ? "false" : "true"));
|
+ (fullBackupContent < 0 ? "false" : "true"));
|
||||||
}
|
}
|
||||||
|
if (dataExtractionRulesRes != 0) {
|
||||||
|
pw.println(prefix + "dataExtractionRules=@xml/" + dataExtractionRulesRes);
|
||||||
|
}
|
||||||
pw.println(prefix + "crossProfile=" + (crossProfile ? "true" : "false"));
|
pw.println(prefix + "crossProfile=" + (crossProfile ? "true" : "false"));
|
||||||
if (networkSecurityConfigRes != 0) {
|
if (networkSecurityConfigRes != 0) {
|
||||||
pw.println(prefix + "networkSecurityConfigRes=0x"
|
pw.println(prefix + "networkSecurityConfigRes=0x"
|
||||||
@@ -1749,6 +1764,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
uiOptions = orig.uiOptions;
|
uiOptions = orig.uiOptions;
|
||||||
backupAgentName = orig.backupAgentName;
|
backupAgentName = orig.backupAgentName;
|
||||||
fullBackupContent = orig.fullBackupContent;
|
fullBackupContent = orig.fullBackupContent;
|
||||||
|
dataExtractionRulesRes = orig.dataExtractionRulesRes;
|
||||||
crossProfile = orig.crossProfile;
|
crossProfile = orig.crossProfile;
|
||||||
networkSecurityConfigRes = orig.networkSecurityConfigRes;
|
networkSecurityConfigRes = orig.networkSecurityConfigRes;
|
||||||
category = orig.category;
|
category = orig.category;
|
||||||
@@ -1836,6 +1852,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
dest.writeInt(descriptionRes);
|
dest.writeInt(descriptionRes);
|
||||||
dest.writeInt(uiOptions);
|
dest.writeInt(uiOptions);
|
||||||
dest.writeInt(fullBackupContent);
|
dest.writeInt(fullBackupContent);
|
||||||
|
dest.writeInt(dataExtractionRulesRes);
|
||||||
dest.writeBoolean(crossProfile);
|
dest.writeBoolean(crossProfile);
|
||||||
dest.writeInt(networkSecurityConfigRes);
|
dest.writeInt(networkSecurityConfigRes);
|
||||||
dest.writeInt(category);
|
dest.writeInt(category);
|
||||||
@@ -1920,6 +1937,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
|
|||||||
descriptionRes = source.readInt();
|
descriptionRes = source.readInt();
|
||||||
uiOptions = source.readInt();
|
uiOptions = source.readInt();
|
||||||
fullBackupContent = source.readInt();
|
fullBackupContent = source.readInt();
|
||||||
|
dataExtractionRulesRes = source.readInt();
|
||||||
crossProfile = source.readBoolean();
|
crossProfile = source.readBoolean();
|
||||||
networkSecurityConfigRes = source.readInt();
|
networkSecurityConfigRes = source.readInt();
|
||||||
category = source.readInt();
|
category = source.readInt();
|
||||||
|
|||||||
@@ -260,6 +260,8 @@ public interface ParsingPackage extends ParsingPackageRead {
|
|||||||
|
|
||||||
ParsingPackage setFullBackupContent(int fullBackupContent);
|
ParsingPackage setFullBackupContent(int fullBackupContent);
|
||||||
|
|
||||||
|
ParsingPackage setDataExtractionRules(int dataExtractionRules);
|
||||||
|
|
||||||
ParsingPackage setHasDomainUrls(boolean hasDomainUrls);
|
ParsingPackage setHasDomainUrls(boolean hasDomainUrls);
|
||||||
|
|
||||||
ParsingPackage setIconRes(int iconRes);
|
ParsingPackage setIconRes(int iconRes);
|
||||||
|
|||||||
@@ -334,6 +334,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
|
|||||||
private int descriptionRes;
|
private int descriptionRes;
|
||||||
|
|
||||||
private int fullBackupContent;
|
private int fullBackupContent;
|
||||||
|
private int dataExtractionRules;
|
||||||
private int iconRes;
|
private int iconRes;
|
||||||
private int installLocation = ParsingPackageUtils.PARSE_DEFAULT_INSTALL_LOCATION;
|
private int installLocation = ParsingPackageUtils.PARSE_DEFAULT_INSTALL_LOCATION;
|
||||||
private int labelRes;
|
private int labelRes;
|
||||||
@@ -1015,6 +1016,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
|
|||||||
appInfo.enabled = getBoolean(Booleans.ENABLED);
|
appInfo.enabled = getBoolean(Booleans.ENABLED);
|
||||||
// appInfo.enabledSetting
|
// appInfo.enabledSetting
|
||||||
appInfo.fullBackupContent = fullBackupContent;
|
appInfo.fullBackupContent = fullBackupContent;
|
||||||
|
appInfo.dataExtractionRulesRes = dataExtractionRules;
|
||||||
// TODO(b/135203078): See ParsingPackageImpl#getHiddenApiEnforcementPolicy
|
// TODO(b/135203078): See ParsingPackageImpl#getHiddenApiEnforcementPolicy
|
||||||
// appInfo.mHiddenApiPolicy
|
// appInfo.mHiddenApiPolicy
|
||||||
// appInfo.hiddenUntilInstalled
|
// appInfo.hiddenUntilInstalled
|
||||||
@@ -1163,6 +1165,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
|
|||||||
dest.writeInt(this.compatibleWidthLimitDp);
|
dest.writeInt(this.compatibleWidthLimitDp);
|
||||||
dest.writeInt(this.descriptionRes);
|
dest.writeInt(this.descriptionRes);
|
||||||
dest.writeInt(this.fullBackupContent);
|
dest.writeInt(this.fullBackupContent);
|
||||||
|
dest.writeInt(this.dataExtractionRules);
|
||||||
dest.writeInt(this.iconRes);
|
dest.writeInt(this.iconRes);
|
||||||
dest.writeInt(this.installLocation);
|
dest.writeInt(this.installLocation);
|
||||||
dest.writeInt(this.labelRes);
|
dest.writeInt(this.labelRes);
|
||||||
@@ -1284,6 +1287,7 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
|
|||||||
this.compatibleWidthLimitDp = in.readInt();
|
this.compatibleWidthLimitDp = in.readInt();
|
||||||
this.descriptionRes = in.readInt();
|
this.descriptionRes = in.readInt();
|
||||||
this.fullBackupContent = in.readInt();
|
this.fullBackupContent = in.readInt();
|
||||||
|
this.dataExtractionRules = in.readInt();
|
||||||
this.iconRes = in.readInt();
|
this.iconRes = in.readInt();
|
||||||
this.installLocation = in.readInt();
|
this.installLocation = in.readInt();
|
||||||
this.labelRes = in.readInt();
|
this.labelRes = in.readInt();
|
||||||
@@ -1807,6 +1811,11 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
|
|||||||
return fullBackupContent;
|
return fullBackupContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDataExtractionRules() {
|
||||||
|
return dataExtractionRules;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIconRes() {
|
public int getIconRes() {
|
||||||
return iconRes;
|
return iconRes;
|
||||||
@@ -2263,6 +2272,12 @@ public class ParsingPackageImpl implements ParsingPackage, Parcelable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ParsingPackageImpl setDataExtractionRules(int value) {
|
||||||
|
dataExtractionRules = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ParsingPackageImpl setIconRes(int value) {
|
public ParsingPackageImpl setIconRes(int value) {
|
||||||
iconRes = value;
|
iconRes = value;
|
||||||
|
|||||||
@@ -587,6 +587,11 @@ public interface ParsingPackageRead extends Parcelable {
|
|||||||
*/
|
*/
|
||||||
int getFullBackupContent();
|
int getFullBackupContent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see R.styleable#AndroidManifestApplication_dataExtractionRules
|
||||||
|
*/
|
||||||
|
int getDataExtractionRules();
|
||||||
|
|
||||||
/** @see ApplicationInfo#PRIVATE_FLAG_HAS_DOMAIN_URLS */
|
/** @see ApplicationInfo#PRIVATE_FLAG_HAS_DOMAIN_URLS */
|
||||||
boolean isHasDomainUrls();
|
boolean isHasDomainUrls();
|
||||||
|
|
||||||
|
|||||||
@@ -2168,6 +2168,8 @@ public class ParsingPackageUtils {
|
|||||||
.setNetworkSecurityConfigRes(resId(R.styleable.AndroidManifestApplication_networkSecurityConfig, sa))
|
.setNetworkSecurityConfigRes(resId(R.styleable.AndroidManifestApplication_networkSecurityConfig, sa))
|
||||||
.setRoundIconRes(resId(R.styleable.AndroidManifestApplication_roundIcon, sa))
|
.setRoundIconRes(resId(R.styleable.AndroidManifestApplication_roundIcon, sa))
|
||||||
.setTheme(resId(R.styleable.AndroidManifestApplication_theme, sa))
|
.setTheme(resId(R.styleable.AndroidManifestApplication_theme, sa))
|
||||||
|
.setDataExtractionRules(
|
||||||
|
resId(R.styleable.AndroidManifestApplication_dataExtractionRules, sa))
|
||||||
// Strings
|
// Strings
|
||||||
.setClassLoaderName(string(R.styleable.AndroidManifestApplication_classLoader, sa))
|
.setClassLoaderName(string(R.styleable.AndroidManifestApplication_classLoader, sa))
|
||||||
.setRequiredAccountType(string(R.styleable.AndroidManifestApplication_requiredAccountType, sa))
|
.setRequiredAccountType(string(R.styleable.AndroidManifestApplication_requiredAccountType, sa))
|
||||||
|
|||||||
@@ -1893,6 +1893,11 @@
|
|||||||
<!-- User data will remain unchanged during rollback. -->
|
<!-- User data will remain unchanged during rollback. -->
|
||||||
<enum name="retain" value="2" />
|
<enum name="retain" value="2" />
|
||||||
</attr>
|
</attr>
|
||||||
|
|
||||||
|
<!-- Applications can set this attribute to an xml resource within their app where they
|
||||||
|
specified the rules determining which files and directories can be copied from the device
|
||||||
|
as part of backup or transfer operations. -->
|
||||||
|
<attr name="dataExtractionRules" format="reference"/>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<!-- An attribution is a logical part of an app and is identified by a tag.
|
<!-- An attribution is a logical part of an app and is identified by a tag.
|
||||||
|
|||||||
@@ -3084,6 +3084,7 @@
|
|||||||
<public name="hand_minuteTintMode"/>
|
<public name="hand_minuteTintMode"/>
|
||||||
<public name="hand_secondTint"/>
|
<public name="hand_secondTint"/>
|
||||||
<public name="hand_secondTintMode"/>
|
<public name="hand_secondTintMode"/>
|
||||||
|
<public name="dataExtractionRules"/>
|
||||||
</public-group>
|
</public-group>
|
||||||
|
|
||||||
<public-group type="drawable" first-id="0x010800b5">
|
<public-group type="drawable" first-id="0x010800b5">
|
||||||
|
|||||||
Reference in New Issue
Block a user