diff options
| author | Aurimas Liutikas <aurimas@google.com> | 2019-01-16 12:46:42 -0800 |
|---|---|---|
| committer | Aurimas Liutikas <aurimas@google.com> | 2019-01-17 12:51:58 -0800 |
| commit | d8ebfefceee7fbfaae730d3414c8017840097761 (patch) | |
| tree | 8339a6341f406023a62912bb16599a1c2b99b87d /core/java | |
| parent | 01c723743942183b9ade382f410756dc3e90c427 (diff) | |
Remove old private constant from ResourceId.
Bug: 122967079
Test: make -j builds
Change-Id: I3e999044df02549e84208d38bb77d2ce1d1bd73b
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/AlertDialog.java | 3 | ||||
| -rw-r--r-- | core/java/android/app/Dialog.java | 4 | ||||
| -rw-r--r-- | core/java/android/content/pm/PermissionGroupInfo.java | 6 | ||||
| -rw-r--r-- | core/java/android/content/pm/SuspendDialogInfo.java | 2 | ||||
| -rw-r--r-- | core/java/android/content/res/ResourceId.java | 6 | ||||
| -rw-r--r-- | core/java/android/content/res/Resources.java | 2 | ||||
| -rw-r--r-- | core/java/android/view/inspector/InspectableProperty.java | 8 | ||||
| -rw-r--r-- | core/java/android/widget/TextView.java | 7 | ||||
| -rw-r--r-- | core/java/com/android/internal/app/SuspendedAppActivity.java | 2 |
9 files changed, 17 insertions, 23 deletions
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java index cf40e067e5b1..bfc216a24c1b 100644 --- a/core/java/android/app/AlertDialog.java +++ b/core/java/android/app/AlertDialog.java @@ -25,6 +25,7 @@ import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.DialogInterface; import android.content.res.ResourceId; +import android.content.res.Resources; import android.database.Cursor; import android.graphics.drawable.Drawable; import android.os.Bundle; @@ -465,7 +466,7 @@ public class AlertDialog extends Dialog implements DialogInterface { * @param context the parent context */ public Builder(Context context) { - this(context, resolveDialogTheme(context, ResourceId.ID_NULL)); + this(context, resolveDialogTheme(context, Resources.ID_NULL)); } /** diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index 4bd935c0e924..088c245c9c2c 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -31,7 +31,7 @@ import android.content.ContextWrapper; import android.content.DialogInterface; import android.content.pm.ApplicationInfo; import android.content.res.Configuration; -import android.content.res.ResourceId; +import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; @@ -183,7 +183,7 @@ public class Dialog implements DialogInterface, Window.Callback, Dialog(@NonNull Context context, @StyleRes int themeResId, boolean createContextThemeWrapper) { if (createContextThemeWrapper) { - if (themeResId == ResourceId.ID_NULL) { + if (themeResId == Resources.ID_NULL) { final TypedValue outValue = new TypedValue(); context.getTheme().resolveAttribute(R.attr.dialogTheme, outValue, true); themeResId = outValue.resourceId; diff --git a/core/java/android/content/pm/PermissionGroupInfo.java b/core/java/android/content/pm/PermissionGroupInfo.java index 8cf66d81972f..f21612a58a53 100644 --- a/core/java/android/content/pm/PermissionGroupInfo.java +++ b/core/java/android/content/pm/PermissionGroupInfo.java @@ -49,7 +49,7 @@ public class PermissionGroupInfo extends PackageItemInfo implements Parcelable { * only access while in the foreground. * * From the "requestDetail" attribute or, if not set, {@link - * android.content.res.ResourceId#ID_NULL}. + * android.content.res.Resources#ID_NULL}. * * @hide */ @@ -61,7 +61,7 @@ public class PermissionGroupInfo extends PackageItemInfo implements Parcelable { * access. Also used when requesting both foreground and background access. * * From the "backgroundRequest" attribute or, if not set, {@link - * android.content.res.ResourceId#ID_NULL}. + * android.content.res.Resources#ID_NULL}. * * @hide */ @@ -73,7 +73,7 @@ public class PermissionGroupInfo extends PackageItemInfo implements Parcelable { * background access. * * From the "backgroundRequestDetail" attribute or, if not set, {@link - * android.content.res.ResourceId#ID_NULL}. + * android.content.res.Resources#ID_NULL}. * * @hide */ diff --git a/core/java/android/content/pm/SuspendDialogInfo.java b/core/java/android/content/pm/SuspendDialogInfo.java index c798c99fed90..53b52f535fa0 100644 --- a/core/java/android/content/pm/SuspendDialogInfo.java +++ b/core/java/android/content/pm/SuspendDialogInfo.java @@ -16,7 +16,7 @@ package android.content.pm; -import static android.content.res.ResourceId.ID_NULL; +import static android.content.res.Resources.ID_NULL; import android.annotation.DrawableRes; import android.annotation.NonNull; diff --git a/core/java/android/content/res/ResourceId.java b/core/java/android/content/res/ResourceId.java index adb9cf1c8015..3c7b5fc11164 100644 --- a/core/java/android/content/res/ResourceId.java +++ b/core/java/android/content/res/ResourceId.java @@ -22,12 +22,6 @@ import android.annotation.AnyRes; * @hide */ public final class ResourceId { - - /** - * The {@code null} resource ID. - */ - public static final @AnyRes int ID_NULL = 0; - /** * Checks whether the integer {@code id} is a valid resource ID, as generated by AAPT. * <p>Note that a negative integer is not necessarily an invalid resource ID, and custom diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index dcd6e2ed94c7..baf64ad72a51 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -174,7 +174,7 @@ public class Resources { /** @hide */ public static int selectSystemTheme(int curTheme, int targetSdkVersion, int orig, int holo, int dark, int deviceDefault) { - if (curTheme != ResourceId.ID_NULL) { + if (curTheme != ID_NULL) { return curTheme; } if (targetSdkVersion < Build.VERSION_CODES.HONEYCOMB) { diff --git a/core/java/android/view/inspector/InspectableProperty.java b/core/java/android/view/inspector/InspectableProperty.java index e2a763e22288..a57470c7c908 100644 --- a/core/java/android/view/inspector/InspectableProperty.java +++ b/core/java/android/view/inspector/InspectableProperty.java @@ -20,7 +20,7 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.SOURCE; -import android.content.res.ResourceId; +import android.content.res.Resources; import java.lang.annotation.Retention; import java.lang.annotation.Target; @@ -57,16 +57,16 @@ public @interface InspectableProperty { * If left as {ID_NULL}, and {@link #hasAttributeId()} is true, the attribute ID will be * inferred from {@link #name()}. * - * @return The attribute ID of the property or {@link ResourceId#ID_NULL} + * @return The attribute ID of the property or {@link Resources#ID_NULL} */ - int attributeId() default ResourceId.ID_NULL; + int attributeId() default Resources.ID_NULL; /** * If this property has an attribute ID. * * Set to false if the annotated property does not have an attribute ID, that is, it is not * inflated from an XML attribute. This will prevent the automatic inference of the attribute - * ID if {@link #attributeId()} is set to {@link ResourceId#ID_NULL}. + * ID if {@link #attributeId()} is set to {@link Resources#ID_NULL}. * * @return Whether to infer an attribute ID if not supplied */ diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 0d16998d17ee..4a6095464b42 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -48,7 +48,6 @@ import android.content.UndoManager; import android.content.res.ColorStateList; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; -import android.content.res.ResourceId; import android.content.res.Resources; import android.content.res.TypedArray; import android.content.res.XmlResourceParser; @@ -889,7 +888,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // sanitize autofill requests. private boolean mTextSetFromXmlOrResourceId = false; // Resource id used to set the text. - private @StringRes int mTextId = ResourceId.ID_NULL; + private @StringRes int mTextId = Resources.ID_NULL; // // End of autofill-related attributes @@ -1180,7 +1179,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener case com.android.internal.R.styleable.TextView_text: textIsSetFromXml = true; - mTextId = a.getResourceId(attr, ResourceId.ID_NULL); + mTextId = a.getResourceId(attr, Resources.ID_NULL); text = a.getText(attr); break; @@ -11031,7 +11030,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (viewFor == VIEW_STRUCTURE_FOR_AUTOFILL) { structure.setDataIsSensitive(!mTextSetFromXmlOrResourceId); } - if (mTextId != ResourceId.ID_NULL) { + if (mTextId != Resources.ID_NULL) { try { structure.setTextIdEntry(getResources().getResourceEntryName(mTextId)); } catch (Resources.NotFoundException e) { diff --git a/core/java/com/android/internal/app/SuspendedAppActivity.java b/core/java/com/android/internal/app/SuspendedAppActivity.java index 498de53b65e9..70935d4ac076 100644 --- a/core/java/com/android/internal/app/SuspendedAppActivity.java +++ b/core/java/com/android/internal/app/SuspendedAppActivity.java @@ -16,7 +16,7 @@ package com.android.internal.app; -import static android.content.res.ResourceId.ID_NULL; +import static android.content.res.Resources.ID_NULL; import android.Manifest; import android.app.AlertDialog; |
