Loading api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ package android.app { field public static final int OP_RECORD_AUDIO = 27; // 0x1b field public static final int OP_START_FOREGROUND = 76; // 0x4c field public static final int OP_SYSTEM_ALERT_WINDOW = 24; // 0x18 field public static final long SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE = 151105954L; // 0x901b1a2L field public static final int UID_STATE_BACKGROUND = 600; // 0x258 field public static final int UID_STATE_CACHED = 700; // 0x2bc field public static final int UID_STATE_FOREGROUND = 500; // 0x1f4 Loading core/java/android/app/AppOpsManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,22 @@ public class AppOpsManager { @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q) public static final long CALL_BACK_ON_CHANGED_LISTENER_WITH_SWITCHED_OP_CHANGE = 148180766L; /** * Enforce that all attributionTags send to {@link #noteOp}, {@link #noteProxyOp}, * and {@link #startOp} are defined in the manifest of the package that is specified as * parameter to the methods. * * <p>To enable this change both the package calling {@link #noteOp} as well as the package * specified as parameter to the method need to have this change enable. * * @hide */ @TestApi @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.R) public static final long SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE = 151105954L; private static final int MAX_UNFORWARDED_OPS = 10; final Context mContext; Loading core/java/android/content/pm/parsing/ParsingPackageUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -773,7 +773,7 @@ public class ParsingPackageUtils { if (!ParsedAttribution.isCombinationValid(pkg.getAttributions())) { return input.error( INSTALL_PARSE_FAILED_BAD_MANIFEST, "Combination <feature> tags are not valid" "Combination <attribution> tags are not valid" ); } Loading core/java/android/content/pm/parsing/component/ParsedAttributionUtils.java +3 −8 Original line number Diff line number Diff line Loading @@ -17,13 +17,13 @@ package android.content.pm.parsing.component; import android.annotation.NonNull; import android.content.pm.parsing.result.ParseInput; import android.content.pm.parsing.result.ParseResult; import android.content.res.Resources; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import com.android.internal.R; import android.content.pm.parsing.result.ParseInput; import android.content.pm.parsing.result.ParseResult; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading Loading @@ -52,14 +52,9 @@ public class ParsedAttributionUtils { try { attributionTag = sa.getNonConfigurationString( R.styleable.AndroidManifestAttribution_tag, 0); if (attributionTag == null) { // TODO moltmann: Remove handling of featureId attributionTag = sa.getNonConfigurationString( R.styleable.AndroidManifestAttribution_featureId, 0); if (attributionTag == null) { return input.error("<attribution> does not specify android:tag"); } } if (attributionTag.length() > ParsedAttribution.MAX_ATTRIBUTION_TAG_LEN) { return input.error("android:tag is too long. Max length is " + ParsedAttribution.MAX_ATTRIBUTION_TAG_LEN); Loading core/res/res/values/attrs_manifest.xml +1 −3 Original line number Diff line number Diff line Loading @@ -1862,8 +1862,6 @@ <p>In case this attribution inherits from another attribution, this tag can contain one or multiple {@link #AndroidManifestAttributionInheritFrom inherit-from} tags. --> <declare-styleable name="AndroidManifestAttribution" parent="AndroidManifest"> <!-- TODO moltmann: Remove --> <attr name="featureId" format="string" /> <!-- Required identifier for a attribution. Can be passed to {@link android.content.Context#createAttributionContext} to create a context tagged with this attribution Loading @@ -1873,7 +1871,7 @@ <attr name="label" format="string" /> </declare-styleable> <!-- Declares previously declared features this feature inherits from. --> <!-- Declares previously declared attributions this attribution inherits from. --> <declare-styleable name="AndroidManifestAttributionInheritFrom" parent="AndroidManifestAttribution"> <!-- Identifier of the attribution this attribution inherits from --> Loading Loading
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ package android.app { field public static final int OP_RECORD_AUDIO = 27; // 0x1b field public static final int OP_START_FOREGROUND = 76; // 0x4c field public static final int OP_SYSTEM_ALERT_WINDOW = 24; // 0x18 field public static final long SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE = 151105954L; // 0x901b1a2L field public static final int UID_STATE_BACKGROUND = 600; // 0x258 field public static final int UID_STATE_CACHED = 700; // 0x2bc field public static final int UID_STATE_FOREGROUND = 500; // 0x1f4 Loading
core/java/android/app/AppOpsManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,22 @@ public class AppOpsManager { @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q) public static final long CALL_BACK_ON_CHANGED_LISTENER_WITH_SWITCHED_OP_CHANGE = 148180766L; /** * Enforce that all attributionTags send to {@link #noteOp}, {@link #noteProxyOp}, * and {@link #startOp} are defined in the manifest of the package that is specified as * parameter to the methods. * * <p>To enable this change both the package calling {@link #noteOp} as well as the package * specified as parameter to the method need to have this change enable. * * @hide */ @TestApi @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.R) public static final long SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE = 151105954L; private static final int MAX_UNFORWARDED_OPS = 10; final Context mContext; Loading
core/java/android/content/pm/parsing/ParsingPackageUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -773,7 +773,7 @@ public class ParsingPackageUtils { if (!ParsedAttribution.isCombinationValid(pkg.getAttributions())) { return input.error( INSTALL_PARSE_FAILED_BAD_MANIFEST, "Combination <feature> tags are not valid" "Combination <attribution> tags are not valid" ); } Loading
core/java/android/content/pm/parsing/component/ParsedAttributionUtils.java +3 −8 Original line number Diff line number Diff line Loading @@ -17,13 +17,13 @@ package android.content.pm.parsing.component; import android.annotation.NonNull; import android.content.pm.parsing.result.ParseInput; import android.content.pm.parsing.result.ParseResult; import android.content.res.Resources; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; import com.android.internal.R; import android.content.pm.parsing.result.ParseInput; import android.content.pm.parsing.result.ParseResult; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading Loading @@ -52,14 +52,9 @@ public class ParsedAttributionUtils { try { attributionTag = sa.getNonConfigurationString( R.styleable.AndroidManifestAttribution_tag, 0); if (attributionTag == null) { // TODO moltmann: Remove handling of featureId attributionTag = sa.getNonConfigurationString( R.styleable.AndroidManifestAttribution_featureId, 0); if (attributionTag == null) { return input.error("<attribution> does not specify android:tag"); } } if (attributionTag.length() > ParsedAttribution.MAX_ATTRIBUTION_TAG_LEN) { return input.error("android:tag is too long. Max length is " + ParsedAttribution.MAX_ATTRIBUTION_TAG_LEN); Loading
core/res/res/values/attrs_manifest.xml +1 −3 Original line number Diff line number Diff line Loading @@ -1862,8 +1862,6 @@ <p>In case this attribution inherits from another attribution, this tag can contain one or multiple {@link #AndroidManifestAttributionInheritFrom inherit-from} tags. --> <declare-styleable name="AndroidManifestAttribution" parent="AndroidManifest"> <!-- TODO moltmann: Remove --> <attr name="featureId" format="string" /> <!-- Required identifier for a attribution. Can be passed to {@link android.content.Context#createAttributionContext} to create a context tagged with this attribution Loading @@ -1873,7 +1871,7 @@ <attr name="label" format="string" /> </declare-styleable> <!-- Declares previously declared features this feature inherits from. --> <!-- Declares previously declared attributions this attribution inherits from. --> <declare-styleable name="AndroidManifestAttributionInheritFrom" parent="AndroidManifestAttribution"> <!-- Identifier of the attribution this attribution inherits from --> Loading