Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -53562,6 +53562,7 @@ package android.view.inspector { method public int mapIntFlag(@NonNull String, @AttrRes int, @NonNull android.view.inspector.IntFlagMapping); method public int mapLong(@NonNull String, @AttrRes int); method public int mapObject(@NonNull String, @AttrRes int); method public int mapResourceId(@NonNull String, @AttrRes int); method public int mapShort(@NonNull String, @AttrRes int); } Loading @@ -53584,6 +53585,7 @@ package android.view.inspector { method public void readIntFlag(int, int); method public void readLong(int, long); method public void readObject(int, @Nullable Object); method public void readResourceId(int, @AnyRes int); method public void readShort(int, short); } api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3061,6 +3061,7 @@ package android.view.inspector { enum_constant public static final android.view.inspector.InspectableProperty.ValueType INT_ENUM; enum_constant public static final android.view.inspector.InspectableProperty.ValueType INT_FLAG; enum_constant public static final android.view.inspector.InspectableProperty.ValueType NONE; enum_constant public static final android.view.inspector.InspectableProperty.ValueType RESOURCE_ID; } } Loading core/java/android/view/inspector/InspectableProperty.java +12 −1 Original line number Diff line number Diff line Loading @@ -233,6 +233,17 @@ public @interface InspectableProperty { * @hide */ @TestApi GRAVITY GRAVITY, /** * Value is a resource ID * * This type is inferred from the presence of a resource ID annotation such as * {@link android.annotation.AnyRes}. * * @hide */ @TestApi RESOURCE_ID } } core/java/android/view/inspector/PropertyMapper.java +10 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,16 @@ public interface PropertyMapper { @AttrRes int attributeId, @NonNull IntEnumMapping mapping); /** * Map a string name to an integer ID for an attribute that contains resource IDs. * * @param name The name of the property * @param attributeId If the property is from an XML attribute, the resource ID of the property * @return An integer ID for the property * @throws PropertyConflictException If the property name is already mapped as another type. */ int mapResourceId(@NonNull String name, @AttrRes int attributeId); /** * Map a string name to an integer ID for a flag set packed into an int property. * Loading core/java/android/view/inspector/PropertyReader.java +13 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view.inspector; import android.annotation.AnyRes; import android.annotation.ColorInt; import android.annotation.ColorLong; import android.annotation.NonNull; Loading Loading @@ -150,7 +151,7 @@ public interface PropertyReader { void readColor(int id, @Nullable Color value); /** * Read {@link android.view.Gravity} packed into an primitive {int}. * Read {@link android.view.Gravity} packed into an primitive {@code int}. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property Loading @@ -159,7 +160,7 @@ public interface PropertyReader { void readGravity(int id, int value); /** * Read an enumeration packed into a primitive {int}. * Read an enumeration packed into a primitive {@code int}. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property Loading @@ -168,7 +169,7 @@ public interface PropertyReader { void readIntEnum(int id, int value); /** * Read a flag packed into a primitive {int}. * Read a flag packed into a primitive {@code int}. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property Loading @@ -176,6 +177,15 @@ public interface PropertyReader { */ void readIntFlag(int id, int value); /** * Read an integer that contains a resource ID. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property * @throws PropertyTypeMismatchException If the property ID is not mapped as a resource ID. */ void readResourceId(int id, @AnyRes int value); /** * Thrown if a client calls a typed read method for a property of a different type. */ Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -53562,6 +53562,7 @@ package android.view.inspector { method public int mapIntFlag(@NonNull String, @AttrRes int, @NonNull android.view.inspector.IntFlagMapping); method public int mapLong(@NonNull String, @AttrRes int); method public int mapObject(@NonNull String, @AttrRes int); method public int mapResourceId(@NonNull String, @AttrRes int); method public int mapShort(@NonNull String, @AttrRes int); } Loading @@ -53584,6 +53585,7 @@ package android.view.inspector { method public void readIntFlag(int, int); method public void readLong(int, long); method public void readObject(int, @Nullable Object); method public void readResourceId(int, @AnyRes int); method public void readShort(int, short); }
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3061,6 +3061,7 @@ package android.view.inspector { enum_constant public static final android.view.inspector.InspectableProperty.ValueType INT_ENUM; enum_constant public static final android.view.inspector.InspectableProperty.ValueType INT_FLAG; enum_constant public static final android.view.inspector.InspectableProperty.ValueType NONE; enum_constant public static final android.view.inspector.InspectableProperty.ValueType RESOURCE_ID; } } Loading
core/java/android/view/inspector/InspectableProperty.java +12 −1 Original line number Diff line number Diff line Loading @@ -233,6 +233,17 @@ public @interface InspectableProperty { * @hide */ @TestApi GRAVITY GRAVITY, /** * Value is a resource ID * * This type is inferred from the presence of a resource ID annotation such as * {@link android.annotation.AnyRes}. * * @hide */ @TestApi RESOURCE_ID } }
core/java/android/view/inspector/PropertyMapper.java +10 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,16 @@ public interface PropertyMapper { @AttrRes int attributeId, @NonNull IntEnumMapping mapping); /** * Map a string name to an integer ID for an attribute that contains resource IDs. * * @param name The name of the property * @param attributeId If the property is from an XML attribute, the resource ID of the property * @return An integer ID for the property * @throws PropertyConflictException If the property name is already mapped as another type. */ int mapResourceId(@NonNull String name, @AttrRes int attributeId); /** * Map a string name to an integer ID for a flag set packed into an int property. * Loading
core/java/android/view/inspector/PropertyReader.java +13 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view.inspector; import android.annotation.AnyRes; import android.annotation.ColorInt; import android.annotation.ColorLong; import android.annotation.NonNull; Loading Loading @@ -150,7 +151,7 @@ public interface PropertyReader { void readColor(int id, @Nullable Color value); /** * Read {@link android.view.Gravity} packed into an primitive {int}. * Read {@link android.view.Gravity} packed into an primitive {@code int}. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property Loading @@ -159,7 +160,7 @@ public interface PropertyReader { void readGravity(int id, int value); /** * Read an enumeration packed into a primitive {int}. * Read an enumeration packed into a primitive {@code int}. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property Loading @@ -168,7 +169,7 @@ public interface PropertyReader { void readIntEnum(int id, int value); /** * Read a flag packed into a primitive {int}. * Read a flag packed into a primitive {@code int}. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property Loading @@ -176,6 +177,15 @@ public interface PropertyReader { */ void readIntFlag(int id, int value); /** * Read an integer that contains a resource ID. * * @param id Identifier of the property from a {@link PropertyMapper} * @param value Value of the property * @throws PropertyTypeMismatchException If the property ID is not mapped as a resource ID. */ void readResourceId(int id, @AnyRes int value); /** * Thrown if a client calls a typed read method for a property of a different type. */ Loading