diff options
-rw-r--r-- | api/test-current.txt | 12 | ||||
-rw-r--r-- | core/java/android/view/View.java | 164 | ||||
-rw-r--r-- | core/java/android/view/ViewGroup.java | 28 | ||||
-rw-r--r-- | core/java/android/view/inspector/InspectableProperty.java | 18 | ||||
-rw-r--r-- | core/java/android/webkit/WebView.java | 6 | ||||
-rw-r--r-- | core/java/android/widget/AbsListView.java | 16 | ||||
-rw-r--r-- | core/java/android/widget/DatePicker.java | 4 | ||||
-rw-r--r-- | core/java/android/widget/GridLayout.java | 8 | ||||
-rw-r--r-- | core/java/android/widget/GridView.java | 8 | ||||
-rw-r--r-- | core/java/android/widget/LinearLayout.java | 4 | ||||
-rw-r--r-- | core/java/android/widget/TextView.java | 132 | ||||
-rw-r--r-- | core/java/android/widget/TimePicker.java | 4 | ||||
-rw-r--r-- | tools/processors/view_inspector/src/java/android/processor/view/inspector/InspectablePropertyProcessor.java | 8 |
13 files changed, 207 insertions, 205 deletions
diff --git a/api/test-current.txt b/api/test-current.txt index 4ccfa1c06745..d6d3d3efb630 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -3175,19 +3175,19 @@ package android.view.inspector { @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.FIELD}) public @interface InspectableProperty { method public abstract int attributeId() default android.content.res.Resources.ID_NULL; - method public abstract android.view.inspector.InspectableProperty.EnumMap[] enumMapping() default {}; - method public abstract android.view.inspector.InspectableProperty.FlagMap[] flagMapping() default {}; + method public abstract android.view.inspector.InspectableProperty.EnumEntry[] enumMapping() default {}; + method public abstract android.view.inspector.InspectableProperty.FlagEntry[] flagMapping() default {}; method public abstract boolean hasAttributeId() default true; method public abstract String name() default ""; method public abstract android.view.inspector.InspectableProperty.ValueType valueType() default android.view.inspector.InspectableProperty.ValueType.INFERRED; } - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface InspectableProperty.EnumMap { + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface InspectableProperty.EnumEntry { method public abstract String name(); method public abstract int value(); } - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface InspectableProperty.FlagMap { + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public static @interface InspectableProperty.FlagEntry { method public abstract int mask() default 0; method public abstract String name(); method public abstract int target(); @@ -3216,7 +3216,7 @@ package android.widget { } public class DatePicker extends android.widget.FrameLayout { - method @android.view.inspector.InspectableProperty(name="datePickerMode", enumMapping={@android.view.inspector.InspectableProperty.EnumMap(value=android.widget.DatePicker.MODE_SPINNER, name="spinner"), @android.view.inspector.InspectableProperty.EnumMap(value=android.widget.DatePicker.MODE_CALENDAR, name="calendar")}) public int getMode(); + method @android.view.inspector.InspectableProperty(name="datePickerMode", enumMapping={@android.view.inspector.InspectableProperty.EnumEntry(value=android.widget.DatePicker.MODE_SPINNER, name="spinner"), @android.view.inspector.InspectableProperty.EnumEntry(value=android.widget.DatePicker.MODE_CALENDAR, name="calendar")}) public int getMode(); field public static final int MODE_CALENDAR = 2; // 0x2 field public static final int MODE_SPINNER = 1; // 0x1 } @@ -3252,7 +3252,7 @@ package android.widget { method public android.view.View getAmView(); method public android.view.View getHourView(); method public android.view.View getMinuteView(); - method @android.view.inspector.InspectableProperty(name="timePickerMode", enumMapping={@android.view.inspector.InspectableProperty.EnumMap(name="clock", value=android.widget.TimePicker.MODE_CLOCK), @android.view.inspector.InspectableProperty.EnumMap(name="spinner", value=android.widget.TimePicker.MODE_SPINNER)}) public int getMode(); + method @android.view.inspector.InspectableProperty(name="timePickerMode", enumMapping={@android.view.inspector.InspectableProperty.EnumEntry(name="clock", value=android.widget.TimePicker.MODE_CLOCK), @android.view.inspector.InspectableProperty.EnumEntry(name="spinner", value=android.widget.TimePicker.MODE_SPINNER)}) public int getMode(); method public android.view.View getPmView(); field public static final int MODE_CLOCK = 2; // 0x2 field public static final int MODE_SPINNER = 1; // 0x1 diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index b857f1ed9996..f83bd64587bf 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -125,8 +125,8 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.view.inspector.InspectableProperty; -import android.view.inspector.InspectableProperty.EnumMap; -import android.view.inspector.InspectableProperty.FlagMap; +import android.view.inspector.InspectableProperty.EnumEntry; +import android.view.inspector.InspectableProperty.FlagEntry; import android.widget.Checkable; import android.widget.FrameLayout; import android.widget.ScrollBarDrawable; @@ -6897,13 +6897,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return a bitmask representing the enabled scroll indicators */ @InspectableProperty(flagMapping = { - @FlagMap(target = SCROLL_INDICATORS_NONE, mask = 0xffff_ffff, name = "none"), - @FlagMap(target = SCROLL_INDICATOR_TOP, name = "top"), - @FlagMap(target = SCROLL_INDICATOR_BOTTOM, name = "bottom"), - @FlagMap(target = SCROLL_INDICATOR_LEFT, name = "left"), - @FlagMap(target = SCROLL_INDICATOR_RIGHT, name = "right"), - @FlagMap(target = SCROLL_INDICATOR_START, name = "start"), - @FlagMap(target = SCROLL_INDICATOR_END, name = "end") + @FlagEntry(target = SCROLL_INDICATORS_NONE, mask = 0xffff_ffff, name = "none"), + @FlagEntry(target = SCROLL_INDICATOR_TOP, name = "top"), + @FlagEntry(target = SCROLL_INDICATOR_BOTTOM, name = "bottom"), + @FlagEntry(target = SCROLL_INDICATOR_LEFT, name = "left"), + @FlagEntry(target = SCROLL_INDICATOR_RIGHT, name = "right"), + @FlagEntry(target = SCROLL_INDICATOR_START, name = "start"), + @FlagEntry(target = SCROLL_INDICATOR_END, name = "end") }) @ScrollIndicators public int getScrollIndicators() { @@ -9032,12 +9032,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, to = "noExcludeDescendants")}) @InspectableProperty(enumMapping = { - @EnumMap(value = IMPORTANT_FOR_AUTOFILL_AUTO, name = "auto"), - @EnumMap(value = IMPORTANT_FOR_AUTOFILL_YES, name = "yes"), - @EnumMap(value = IMPORTANT_FOR_AUTOFILL_NO, name = "no"), - @EnumMap(value = IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, + @EnumEntry(value = IMPORTANT_FOR_AUTOFILL_AUTO, name = "auto"), + @EnumEntry(value = IMPORTANT_FOR_AUTOFILL_YES, name = "yes"), + @EnumEntry(value = IMPORTANT_FOR_AUTOFILL_NO, name = "no"), + @EnumEntry(value = IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, name = "yesExcludeDescendants"), - @EnumMap(value = IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, + @EnumEntry(value = IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, name = "noExcludeDescendants"), }) public @AutofillImportance int getImportantForAutofill() { @@ -9225,12 +9225,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, to = "noExcludeDescendants")}) @InspectableProperty(enumMapping = { - @EnumMap(value = IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, name = "auto"), - @EnumMap(value = IMPORTANT_FOR_CONTENT_CAPTURE_YES, name = "yes"), - @EnumMap(value = IMPORTANT_FOR_CONTENT_CAPTURE_NO, name = "no"), - @EnumMap(value = IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, + @EnumEntry(value = IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, name = "auto"), + @EnumEntry(value = IMPORTANT_FOR_CONTENT_CAPTURE_YES, name = "yes"), + @EnumEntry(value = IMPORTANT_FOR_CONTENT_CAPTURE_NO, name = "no"), + @EnumEntry(value = IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, name = "yesExcludeDescendants"), - @EnumMap(value = IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, + @EnumEntry(value = IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, name = "noExcludeDescendants"), }) public @ContentCaptureImportance int getImportantForContentCapture() { @@ -10534,9 +10534,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @Deprecated @DrawingCacheQuality @InspectableProperty(enumMapping = { - @EnumMap(value = DRAWING_CACHE_QUALITY_LOW, name = "low"), - @EnumMap(value = DRAWING_CACHE_QUALITY_HIGH, name = "high"), - @EnumMap(value = DRAWING_CACHE_QUALITY_AUTO, name = "auto") + @EnumEntry(value = DRAWING_CACHE_QUALITY_LOW, name = "low"), + @EnumEntry(value = DRAWING_CACHE_QUALITY_HIGH, name = "high"), + @EnumEntry(value = DRAWING_CACHE_QUALITY_AUTO, name = "auto") }) public int getDrawingCacheQuality() { return mViewFlags & DRAWING_CACHE_QUALITY_MASK; @@ -11276,9 +11276,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = GONE, to = "GONE") }) @InspectableProperty(enumMapping = { - @EnumMap(value = VISIBLE, name = "visible"), - @EnumMap(value = INVISIBLE, name = "invisible"), - @EnumMap(value = GONE, name = "gone") + @EnumEntry(value = VISIBLE, name = "visible"), + @EnumEntry(value = INVISIBLE, name = "invisible"), + @EnumEntry(value = GONE, name = "gone") }) @Visibility public int getVisibility() { @@ -11527,10 +11527,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = LAYOUT_DIRECTION_LOCALE, to = "LOCALE") }) @InspectableProperty(hasAttributeId = false, enumMapping = { - @EnumMap(value = LAYOUT_DIRECTION_LTR, name = "ltr"), - @EnumMap(value = LAYOUT_DIRECTION_RTL, name = "rtl"), - @EnumMap(value = LAYOUT_DIRECTION_INHERIT, name = "inherit"), - @EnumMap(value = LAYOUT_DIRECTION_LOCALE, name = "locale") + @EnumEntry(value = LAYOUT_DIRECTION_LTR, name = "ltr"), + @EnumEntry(value = LAYOUT_DIRECTION_RTL, name = "rtl"), + @EnumEntry(value = LAYOUT_DIRECTION_INHERIT, name = "inherit"), + @EnumEntry(value = LAYOUT_DIRECTION_LOCALE, name = "locale") }) @LayoutDir public int getRawLayoutDirection() { @@ -11586,8 +11586,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = LAYOUT_DIRECTION_RTL, to = "RESOLVED_DIRECTION_RTL") }) @InspectableProperty(enumMapping = { - @EnumMap(value = LAYOUT_DIRECTION_LTR, name = "ltr"), - @EnumMap(value = LAYOUT_DIRECTION_RTL, name = "rtl") + @EnumEntry(value = LAYOUT_DIRECTION_LTR, name = "ltr"), + @EnumEntry(value = LAYOUT_DIRECTION_RTL, name = "rtl") }) @ResolvedLayoutDir public int getLayoutDirection() { @@ -12072,9 +12072,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = FOCUSABLE_AUTO, to = "FOCUSABLE_AUTO") }, category = "focus") @InspectableProperty(enumMapping = { - @EnumMap(value = NOT_FOCUSABLE, name = "false"), - @EnumMap(value = FOCUSABLE, name = "true"), - @EnumMap(value = FOCUSABLE_AUTO, name = "auto") + @EnumEntry(value = NOT_FOCUSABLE, name = "false"), + @EnumEntry(value = FOCUSABLE, name = "true"), + @EnumEntry(value = FOCUSABLE_AUTO, name = "auto") }) @Focusable public int getFocusable() { @@ -12957,10 +12957,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, to = "noHideDescendants") }) @InspectableProperty(enumMapping = { - @EnumMap(value = IMPORTANT_FOR_ACCESSIBILITY_AUTO, name = "auto"), - @EnumMap(value = IMPORTANT_FOR_ACCESSIBILITY_YES, name = "yes"), - @EnumMap(value = IMPORTANT_FOR_ACCESSIBILITY_NO, name = "no"), - @EnumMap(value = IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, + @EnumEntry(value = IMPORTANT_FOR_ACCESSIBILITY_AUTO, name = "auto"), + @EnumEntry(value = IMPORTANT_FOR_ACCESSIBILITY_YES, name = "yes"), + @EnumEntry(value = IMPORTANT_FOR_ACCESSIBILITY_NO, name = "no"), + @EnumEntry(value = IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, name = "noHideDescendants"), }) public int getImportantForAccessibility() { @@ -13016,9 +13016,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #setAccessibilityLiveRegion(int) */ @InspectableProperty(enumMapping = { - @EnumMap(value = ACCESSIBILITY_LIVE_REGION_NONE, name = "none"), - @EnumMap(value = ACCESSIBILITY_LIVE_REGION_POLITE, name = "polite"), - @EnumMap(value = ACCESSIBILITY_LIVE_REGION_ASSERTIVE, name = "assertive") + @EnumEntry(value = ACCESSIBILITY_LIVE_REGION_NONE, name = "none"), + @EnumEntry(value = ACCESSIBILITY_LIVE_REGION_POLITE, name = "polite"), + @EnumEntry(value = ACCESSIBILITY_LIVE_REGION_ASSERTIVE, name = "assertive") }) public int getAccessibilityLiveRegion() { return (mPrivateFlags2 & PFLAG2_ACCESSIBILITY_LIVE_REGION_MASK) @@ -18625,9 +18625,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @hide */ @InspectableProperty(name = "requiresFadingEdge", flagMapping = { - @FlagMap(target = FADING_EDGE_NONE, mask = FADING_EDGE_MASK, name = "none"), - @FlagMap(target = FADING_EDGE_VERTICAL, name = "vertical"), - @FlagMap(target = FADING_EDGE_HORIZONTAL, name = "horizontal") + @FlagEntry(target = FADING_EDGE_NONE, mask = FADING_EDGE_MASK, name = "none"), + @FlagEntry(target = FADING_EDGE_VERTICAL, name = "vertical"), + @FlagEntry(target = FADING_EDGE_HORIZONTAL, name = "horizontal") }) public int getFadingEdge() { return mViewFlags & FADING_EDGE_MASK; @@ -18922,10 +18922,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = SCROLLBARS_OUTSIDE_INSET, to = "OUTSIDE_INSET") }) @InspectableProperty(name = "scrollbarStyle", enumMapping = { - @EnumMap(value = SCROLLBARS_INSIDE_OVERLAY, name = "insideOverlay"), - @EnumMap(value = SCROLLBARS_INSIDE_INSET, name = "insideInset"), - @EnumMap(value = SCROLLBARS_OUTSIDE_OVERLAY, name = "outsideOverlay"), - @EnumMap(value = SCROLLBARS_OUTSIDE_INSET, name = "outsideInset") + @EnumEntry(value = SCROLLBARS_INSIDE_OVERLAY, name = "insideOverlay"), + @EnumEntry(value = SCROLLBARS_INSIDE_INSET, name = "insideInset"), + @EnumEntry(value = SCROLLBARS_OUTSIDE_OVERLAY, name = "outsideOverlay"), + @EnumEntry(value = SCROLLBARS_OUTSIDE_INSET, name = "outsideInset") }) @ScrollBarStyle public int getScrollBarStyle() { @@ -20478,9 +20478,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #LAYER_TYPE_HARDWARE */ @InspectableProperty(enumMapping = { - @EnumMap(value = LAYER_TYPE_NONE, name = "none"), - @EnumMap(value = LAYER_TYPE_SOFTWARE, name = "software"), - @EnumMap(value = LAYER_TYPE_HARDWARE, name = "hardware") + @EnumEntry(value = LAYER_TYPE_NONE, name = "none"), + @EnumEntry(value = LAYER_TYPE_SOFTWARE, name = "software"), + @EnumEntry(value = LAYER_TYPE_HARDWARE, name = "hardware") }) @LayerType public int getLayerType() { @@ -26160,9 +26160,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return This view's over-scroll mode. */ @InspectableProperty(enumMapping = { - @EnumMap(value = OVER_SCROLL_ALWAYS, name = "always"), - @EnumMap(value = OVER_SCROLL_IF_CONTENT_SCROLLS, name = "ifContentScrolls"), - @EnumMap(value = OVER_SCROLL_NEVER, name = "never") + @EnumEntry(value = OVER_SCROLL_ALWAYS, name = "always"), + @EnumEntry(value = OVER_SCROLL_IF_CONTENT_SCROLLS, name = "ifContentScrolls"), + @EnumEntry(value = OVER_SCROLL_NEVER, name = "never") }) public int getOverScrollMode() { return mOverScrollMode; @@ -26553,14 +26553,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = TEXT_DIRECTION_FIRST_STRONG_RTL, to = "FIRST_STRONG_RTL") }) @InspectableProperty(hasAttributeId = false, enumMapping = { - @EnumMap(value = TEXT_DIRECTION_INHERIT, name = "inherit"), - @EnumMap(value = TEXT_DIRECTION_LOCALE, name = "locale"), - @EnumMap(value = TEXT_DIRECTION_ANY_RTL, name = "anyRtl"), - @EnumMap(value = TEXT_DIRECTION_LTR, name = "ltr"), - @EnumMap(value = TEXT_DIRECTION_RTL, name = "rtl"), - @EnumMap(value = TEXT_DIRECTION_FIRST_STRONG, name = "firstStrong"), - @EnumMap(value = TEXT_DIRECTION_FIRST_STRONG_LTR, name = "firstStrongLtr"), - @EnumMap(value = TEXT_DIRECTION_FIRST_STRONG_RTL, name = "firstStrongRtl"), + @EnumEntry(value = TEXT_DIRECTION_INHERIT, name = "inherit"), + @EnumEntry(value = TEXT_DIRECTION_LOCALE, name = "locale"), + @EnumEntry(value = TEXT_DIRECTION_ANY_RTL, name = "anyRtl"), + @EnumEntry(value = TEXT_DIRECTION_LTR, name = "ltr"), + @EnumEntry(value = TEXT_DIRECTION_RTL, name = "rtl"), + @EnumEntry(value = TEXT_DIRECTION_FIRST_STRONG, name = "firstStrong"), + @EnumEntry(value = TEXT_DIRECTION_FIRST_STRONG_LTR, name = "firstStrongLtr"), + @EnumEntry(value = TEXT_DIRECTION_FIRST_STRONG_RTL, name = "firstStrongRtl"), }) @UnsupportedAppUsage public int getRawTextDirection() { @@ -26630,13 +26630,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = TEXT_DIRECTION_FIRST_STRONG_RTL, to = "FIRST_STRONG_RTL") }) @InspectableProperty(hasAttributeId = false, enumMapping = { - @EnumMap(value = TEXT_DIRECTION_LOCALE, name = "locale"), - @EnumMap(value = TEXT_DIRECTION_ANY_RTL, name = "anyRtl"), - @EnumMap(value = TEXT_DIRECTION_LTR, name = "ltr"), - @EnumMap(value = TEXT_DIRECTION_RTL, name = "rtl"), - @EnumMap(value = TEXT_DIRECTION_FIRST_STRONG, name = "firstStrong"), - @EnumMap(value = TEXT_DIRECTION_FIRST_STRONG_LTR, name = "firstStrongLtr"), - @EnumMap(value = TEXT_DIRECTION_FIRST_STRONG_RTL, name = "firstStrongRtl"), + @EnumEntry(value = TEXT_DIRECTION_LOCALE, name = "locale"), + @EnumEntry(value = TEXT_DIRECTION_ANY_RTL, name = "anyRtl"), + @EnumEntry(value = TEXT_DIRECTION_LTR, name = "ltr"), + @EnumEntry(value = TEXT_DIRECTION_RTL, name = "rtl"), + @EnumEntry(value = TEXT_DIRECTION_FIRST_STRONG, name = "firstStrong"), + @EnumEntry(value = TEXT_DIRECTION_FIRST_STRONG_LTR, name = "firstStrongLtr"), + @EnumEntry(value = TEXT_DIRECTION_FIRST_STRONG_RTL, name = "firstStrongRtl"), }) public int getTextDirection() { return (mPrivateFlags2 & PFLAG2_TEXT_DIRECTION_RESOLVED_MASK) >> PFLAG2_TEXT_DIRECTION_RESOLVED_MASK_SHIFT; @@ -26810,13 +26810,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = TEXT_ALIGNMENT_VIEW_END, to = "VIEW_END") }) @InspectableProperty(hasAttributeId = false, enumMapping = { - @EnumMap(value = TEXT_ALIGNMENT_INHERIT, name = "inherit"), - @EnumMap(value = TEXT_ALIGNMENT_GRAVITY, name = "gravity"), - @EnumMap(value = TEXT_ALIGNMENT_TEXT_START, name = "textStart"), - @EnumMap(value = TEXT_ALIGNMENT_TEXT_END, name = "textEnd"), - @EnumMap(value = TEXT_ALIGNMENT_CENTER, name = "center"), - @EnumMap(value = TEXT_ALIGNMENT_VIEW_START, name = "viewStart"), - @EnumMap(value = TEXT_ALIGNMENT_VIEW_END, name = "viewEnd") + @EnumEntry(value = TEXT_ALIGNMENT_INHERIT, name = "inherit"), + @EnumEntry(value = TEXT_ALIGNMENT_GRAVITY, name = "gravity"), + @EnumEntry(value = TEXT_ALIGNMENT_TEXT_START, name = "textStart"), + @EnumEntry(value = TEXT_ALIGNMENT_TEXT_END, name = "textEnd"), + @EnumEntry(value = TEXT_ALIGNMENT_CENTER, name = "center"), + @EnumEntry(value = TEXT_ALIGNMENT_VIEW_START, name = "viewStart"), + @EnumEntry(value = TEXT_ALIGNMENT_VIEW_END, name = "viewEnd") }) @TextAlignment @UnsupportedAppUsage @@ -26885,12 +26885,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = TEXT_ALIGNMENT_VIEW_END, to = "VIEW_END") }) @InspectableProperty(enumMapping = { - @EnumMap(value = TEXT_ALIGNMENT_GRAVITY, name = "gravity"), - @EnumMap(value = TEXT_ALIGNMENT_TEXT_START, name = "textStart"), - @EnumMap(value = TEXT_ALIGNMENT_TEXT_END, name = "textEnd"), - @EnumMap(value = TEXT_ALIGNMENT_CENTER, name = "center"), - @EnumMap(value = TEXT_ALIGNMENT_VIEW_START, name = "viewStart"), - @EnumMap(value = TEXT_ALIGNMENT_VIEW_END, name = "viewEnd") + @EnumEntry(value = TEXT_ALIGNMENT_GRAVITY, name = "gravity"), + @EnumEntry(value = TEXT_ALIGNMENT_TEXT_START, name = "textStart"), + @EnumEntry(value = TEXT_ALIGNMENT_TEXT_END, name = "textEnd"), + @EnumEntry(value = TEXT_ALIGNMENT_CENTER, name = "center"), + @EnumEntry(value = TEXT_ALIGNMENT_VIEW_START, name = "viewStart"), + @EnumEntry(value = TEXT_ALIGNMENT_VIEW_END, name = "viewEnd") }) @TextAlignment public int getTextAlignment() { diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 4964ee1f0d28..a4d80dcfe7d2 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -61,7 +61,7 @@ import android.view.animation.LayoutAnimationController; import android.view.animation.Transformation; import android.view.autofill.Helper; import android.view.inspector.InspectableProperty; -import android.view.inspector.InspectableProperty.EnumMap; +import android.view.inspector.InspectableProperty.EnumEntry; import com.android.internal.R; @@ -778,9 +778,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @ViewDebug.IntToString(from = FOCUS_BLOCK_DESCENDANTS, to = "FOCUS_BLOCK_DESCENDANTS") }) @InspectableProperty(enumMapping = { - @EnumMap(value = FOCUS_BEFORE_DESCENDANTS, name = "beforeDescendants"), - @EnumMap(value = FOCUS_AFTER_DESCENDANTS, name = "afterDescendants"), - @EnumMap(value = FOCUS_BLOCK_DESCENDANTS, name = "blocksDescendants") + @EnumEntry(value = FOCUS_BEFORE_DESCENDANTS, name = "beforeDescendants"), + @EnumEntry(value = FOCUS_AFTER_DESCENDANTS, name = "afterDescendants"), + @EnumEntry(value = FOCUS_BLOCK_DESCENDANTS, name = "blocksDescendants") }) public int getDescendantFocusability() { return mGroupFlags & FLAG_MASK_FOCUSABILITY; @@ -6574,10 +6574,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @ViewDebug.IntToString(from = PERSISTENT_ALL_CACHES, to = "ALL") }) @InspectableProperty(enumMapping = { - @EnumMap(value = PERSISTENT_NO_CACHE, name = "none"), - @EnumMap(value = PERSISTENT_ANIMATION_CACHE, name = "animation"), - @EnumMap(value = PERSISTENT_SCROLLING_CACHE, name = "scrolling"), - @EnumMap(value = PERSISTENT_ALL_CACHES, name = "all"), + @EnumEntry(value = PERSISTENT_NO_CACHE, name = "none"), + @EnumEntry(value = PERSISTENT_ANIMATION_CACHE, name = "animation"), + @EnumEntry(value = PERSISTENT_SCROLLING_CACHE, name = "scrolling"), + @EnumEntry(value = PERSISTENT_ALL_CACHES, name = "all"), }) public int getPersistentDrawingCache() { return mPersistentDrawingCache; @@ -6657,8 +6657,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @see #setLayoutMode(int) */ @InspectableProperty(enumMapping = { - @EnumMap(value = LAYOUT_MODE_CLIP_BOUNDS, name = "clipBounds"), - @EnumMap(value = LAYOUT_MODE_OPTICAL_BOUNDS, name = "opticalBounds") + @EnumEntry(value = LAYOUT_MODE_CLIP_BOUNDS, name = "clipBounds"), + @EnumEntry(value = LAYOUT_MODE_OPTICAL_BOUNDS, name = "opticalBounds") }) public int getLayoutMode() { if (mLayoutMode == LAYOUT_MODE_UNDEFINED) { @@ -7849,8 +7849,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT") }) @InspectableProperty(name = "layout_width", enumMapping = { - @InspectableProperty.EnumMap(name = "match_parent", value = MATCH_PARENT), - @InspectableProperty.EnumMap(name = "wrap_content", value = WRAP_CONTENT) + @EnumEntry(name = "match_parent", value = MATCH_PARENT), + @EnumEntry(name = "wrap_content", value = WRAP_CONTENT) }) public int width; @@ -7864,8 +7864,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager @ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT") }) @InspectableProperty(name = "layout_height", enumMapping = { - @InspectableProperty.EnumMap(name = "match_parent", value = MATCH_PARENT), - @InspectableProperty.EnumMap(name = "wrap_content", value = WRAP_CONTENT) + @EnumEntry(name = "match_parent", value = MATCH_PARENT), + @EnumEntry(name = "wrap_content", value = WRAP_CONTENT) }) public int height; diff --git a/core/java/android/view/inspector/InspectableProperty.java b/core/java/android/view/inspector/InspectableProperty.java index 97ede862bfaa..03f1ec5821d0 100644 --- a/core/java/android/view/inspector/InspectableProperty.java +++ b/core/java/android/view/inspector/InspectableProperty.java @@ -87,21 +87,21 @@ public @interface InspectableProperty { * * Note that {@link #enumMapping()} cannot be used simultaneously with {@link #flagMapping()}. * - * @return An array of {@link EnumMap}, empty if not applicable + * @return An array of {@link EnumEntry}, empty if not applicable * @see android.annotation.IntDef */ - EnumMap[] enumMapping() default {}; + EnumEntry[] enumMapping() default {}; /** * For flags packed into primitive {int} properties, model the string names of the flags. * * Note that {@link #flagMapping()} cannot be used simultaneously with {@link #enumMapping()}. * - * @return An array of {@link FlagMap}, empty if not applicable + * @return An array of {@link FlagEntry}, empty if not applicable * @see android.annotation.IntDef * @see IntFlagMapping */ - FlagMap[] flagMapping() default {}; + FlagEntry[] flagMapping() default {}; /** @@ -113,7 +113,7 @@ public @interface InspectableProperty { @Target({TYPE}) @Retention(SOURCE) @TestApi - @interface EnumMap { + @interface EnumEntry { /** * The string name of this enumeration value. * @@ -138,7 +138,7 @@ public @interface InspectableProperty { @Target({TYPE}) @Retention(SOURCE) @TestApi - @interface FlagMap { + @interface FlagEntry { /** * The string name of this flag. * @@ -195,7 +195,7 @@ public @interface InspectableProperty { * * This is inferred if {@link #enumMapping()} is specified. * - * @see EnumMap + * @see EnumEntry * @hide */ @TestApi @@ -206,7 +206,7 @@ public @interface InspectableProperty { * * This is inferred if {@link #flagMapping()} is specified. * - * @see FlagMap + * @see FlagEntry * @hide */ @TestApi @@ -227,7 +227,7 @@ public @interface InspectableProperty { /** * Value packs gravity information. * - * This type is not inferred, and is non-trivial to represent using {@link FlagMap}. + * This type is not inferred, and is non-trivial to represent using {@link FlagEntry}. * * @see android.view.Gravity * @hide diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 034cabd5702e..26dba45666fc 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2292,9 +2292,9 @@ public class WebView extends AbsoluteLayout * @return the requested renderer priority policy. */ @InspectableProperty(hasAttributeId = false, enumMapping = { - @InspectableProperty.EnumMap(name = "waived", value = RENDERER_PRIORITY_WAIVED), - @InspectableProperty.EnumMap(name = "bound", value = RENDERER_PRIORITY_BOUND), - @InspectableProperty.EnumMap(name = "important", value = RENDERER_PRIORITY_IMPORTANT) + @InspectableProperty.EnumEntry(name = "waived", value = RENDERER_PRIORITY_WAIVED), + @InspectableProperty.EnumEntry(name = "bound", value = RENDERER_PRIORITY_BOUND), + @InspectableProperty.EnumEntry(name = "important", value = RENDERER_PRIORITY_IMPORTANT) }) @RendererPriority public int getRendererRequestedPriority() { diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 24f1fb5cc352..4cb552d29c32 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -83,7 +83,7 @@ import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputContentInfo; import android.view.inputmethod.InputMethodManager; import android.view.inspector.InspectableProperty; -import android.view.inspector.InspectableProperty.EnumMap; +import android.view.inspector.InspectableProperty.EnumEntry; import android.widget.RemoteViews.OnClickHandler; import com.android.internal.R; @@ -1221,10 +1221,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * @return The current choice mode */ @InspectableProperty(enumMapping = { - @EnumMap(value = CHOICE_MODE_NONE, name = "none"), - @EnumMap(value = CHOICE_MODE_SINGLE, name = "singleChoice"), - @EnumMap(value = CHOICE_MODE_MULTIPLE, name = "multipleChoice"), - @EnumMap(value = CHOICE_MODE_MULTIPLE_MODAL, name = "multipleChoiceModal") + @EnumEntry(value = CHOICE_MODE_NONE, name = "none"), + @EnumEntry(value = CHOICE_MODE_SINGLE, name = "singleChoice"), + @InspectableProperty.EnumEntry(value = CHOICE_MODE_MULTIPLE, name = "multipleChoice"), + @EnumEntry(value = CHOICE_MODE_MULTIPLE_MODAL, name = "multipleChoiceModal") }) public int getChoiceMode() { return mChoiceMode; @@ -6293,9 +6293,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * {@link #TRANSCRIPT_MODE_ALWAYS_SCROLL} */ @InspectableProperty(enumMapping = { - @EnumMap(value = TRANSCRIPT_MODE_DISABLED, name = "disabled"), - @EnumMap(value = TRANSCRIPT_MODE_NORMAL, name = "normal"), - @EnumMap(value = TRANSCRIPT_MODE_ALWAYS_SCROLL, name = "alwaysScroll") + @EnumEntry(value = TRANSCRIPT_MODE_DISABLED, name = "disabled"), + @EnumEntry(value = TRANSCRIPT_MODE_NORMAL, name = "normal"), + @EnumEntry(value = TRANSCRIPT_MODE_ALWAYS_SCROLL, name = "alwaysScroll") }) public int getTranscriptMode() { return mTranscriptMode; diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index ecb846b1fcce..0c593be1ee7d 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -216,8 +216,8 @@ public class DatePicker extends FrameLayout { * @hide Visible for testing only. */ @InspectableProperty(name = "datePickerMode", enumMapping = { - @InspectableProperty.EnumMap(value = MODE_SPINNER, name = "spinner"), - @InspectableProperty.EnumMap(value = MODE_CALENDAR, name = "calendar") + @InspectableProperty.EnumEntry(value = MODE_SPINNER, name = "spinner"), + @InspectableProperty.EnumEntry(value = MODE_CALENDAR, name = "calendar") }) @DatePickerMode @TestApi diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java index 1c8bb0470e2e..8cda47dae39b 100644 --- a/core/java/android/widget/GridLayout.java +++ b/core/java/android/widget/GridLayout.java @@ -331,8 +331,8 @@ public class GridLayout extends ViewGroup { */ @Orientation @InspectableProperty(enumMapping = { - @InspectableProperty.EnumMap(value = HORIZONTAL, name = "horizontal"), - @InspectableProperty.EnumMap(value = VERTICAL, name = "vertical") + @InspectableProperty.EnumEntry(value = HORIZONTAL, name = "horizontal"), + @InspectableProperty.EnumEntry(value = VERTICAL, name = "vertical") }) public int getOrientation() { return mOrientation; @@ -510,8 +510,8 @@ public class GridLayout extends ViewGroup { */ @AlignmentMode @InspectableProperty(enumMapping = { - @InspectableProperty.EnumMap(value = ALIGN_BOUNDS, name = "alignBounds"), - @InspectableProperty.EnumMap(value = ALIGN_MARGINS, name = "alignMargins"), + @InspectableProperty.EnumEntry(value = ALIGN_BOUNDS, name = "alignBounds"), + @InspectableProperty.EnumEntry(value = ALIGN_MARGINS, name = "alignMargins"), }) public int getAlignmentMode() { return mAlignmentMode; diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java index f44c33178242..4e39a559c6ea 100644 --- a/core/java/android/widget/GridView.java +++ b/core/java/android/widget/GridView.java @@ -2174,11 +2174,11 @@ public class GridView extends AbsListView { @StretchMode @InspectableProperty(enumMapping = { - @InspectableProperty.EnumMap(value = NO_STRETCH, name = "none"), - @InspectableProperty.EnumMap(value = STRETCH_SPACING, name = "spacingWidth"), - @InspectableProperty.EnumMap( + @InspectableProperty.EnumEntry(value = NO_STRETCH, name = "none"), + @InspectableProperty.EnumEntry(value = STRETCH_SPACING, name = "spacingWidth"), + @InspectableProperty.EnumEntry( value = STRETCH_SPACING_UNIFORM, name = "spacingWidthUniform"), - @InspectableProperty.EnumMap(value = STRETCH_COLUMN_WIDTH, name = "columnWidth"), + @InspectableProperty.EnumEntry(value = STRETCH_COLUMN_WIDTH, name = "columnWidth"), }) public int getStretchMode() { return mStretchMode; diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index bdde4352d69d..a83e82699938 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -1850,8 +1850,8 @@ public class LinearLayout extends ViewGroup { */ @OrientationMode @InspectableProperty(enumMapping = { - @InspectableProperty.EnumMap(value = HORIZONTAL, name = "horizontal"), - @InspectableProperty.EnumMap(value = VERTICAL, name = "vertical") + @InspectableProperty.EnumEntry(value = HORIZONTAL, name = "horizontal"), + @InspectableProperty.EnumEntry(value = VERTICAL, name = "vertical") }) public int getOrientation() { return mOrientation; diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 04bcb1451b61..a5a1a80cca88 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -173,8 +173,8 @@ import android.view.inputmethod.ExtractedTextRequest; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.view.inspector.InspectableProperty; -import android.view.inspector.InspectableProperty.EnumMap; -import android.view.inspector.InspectableProperty.FlagMap; +import android.view.inspector.InspectableProperty.EnumEntry; +import android.view.inspector.InspectableProperty.FlagEntry; import android.view.textclassifier.TextClassification; import android.view.textclassifier.TextClassificationContext; import android.view.textclassifier.TextClassificationManager; @@ -1900,8 +1900,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see #setAutoSizeTextTypeUniformWithPresetSizes(int[], int) */ @InspectableProperty(enumMapping = { - @EnumMap(name = "none", value = AUTO_SIZE_TEXT_TYPE_NONE), - @EnumMap(name = "uniform", value = AUTO_SIZE_TEXT_TYPE_UNIFORM) + @EnumEntry(name = "none", value = AUTO_SIZE_TEXT_TYPE_NONE), + @EnumEntry(name = "uniform", value = AUTO_SIZE_TEXT_TYPE_UNIFORM) }) @AutoSizeTextType public int getAutoSizeTextType() { @@ -3527,10 +3527,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_autoLink */ @InspectableProperty(name = "autoLink", flagMapping = { - @FlagMap(name = "web", target = Linkify.WEB_URLS), - @FlagMap(name = "email", target = Linkify.EMAIL_ADDRESSES), - @FlagMap(name = "phone", target = Linkify.PHONE_NUMBERS), - @FlagMap(name = "map", target = Linkify.MAP_ADDRESSES) + @FlagEntry(name = "web", target = Linkify.WEB_URLS), + @FlagEntry(name = "email", target = Linkify.EMAIL_ADDRESSES), + @FlagEntry(name = "phone", target = Linkify.PHONE_NUMBERS), + @FlagEntry(name = "map", target = Linkify.MAP_ADDRESSES) }) public final int getAutoLinkMask() { return mAutoLinkMask; @@ -4515,9 +4515,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see #setBreakStrategy(int) */ @InspectableProperty(enumMapping = { - @EnumMap(name = "simple", value = Layout.BREAK_STRATEGY_SIMPLE), - @EnumMap(name = "high_quality", value = Layout.BREAK_STRATEGY_HIGH_QUALITY), - @EnumMap(name = "balanced", value = Layout.BREAK_STRATEGY_BALANCED) + @EnumEntry(name = "simple", value = Layout.BREAK_STRATEGY_SIMPLE), + @EnumEntry(name = "high_quality", value = Layout.BREAK_STRATEGY_HIGH_QUALITY), + @EnumEntry(name = "balanced", value = Layout.BREAK_STRATEGY_BALANCED) }) @Layout.BreakStrategy public int getBreakStrategy() { @@ -4566,9 +4566,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see #setHyphenationFrequency(int) */ @InspectableProperty(enumMapping = { - @EnumMap(name = "none", value = Layout.HYPHENATION_FREQUENCY_NONE), - @EnumMap(name = "normal", value = Layout.HYPHENATION_FREQUENCY_NORMAL), - @EnumMap(name = "full", value = Layout.HYPHENATION_FREQUENCY_FULL) + @EnumEntry(name = "none", value = Layout.HYPHENATION_FREQUENCY_NONE), + @EnumEntry(name = "normal", value = Layout.HYPHENATION_FREQUENCY_NORMAL), + @EnumEntry(name = "full", value = Layout.HYPHENATION_FREQUENCY_FULL) }) @Layout.HyphenationFrequency public int getHyphenationFrequency() { @@ -4628,8 +4628,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see #setJustificationMode(int) */ @InspectableProperty(enumMapping = { - @EnumMap(name = "none", value = Layout.JUSTIFICATION_MODE_NONE), - @EnumMap(name = "inter_word", value = Layout.JUSTIFICATION_MODE_INTER_WORD) + @EnumEntry(name = "none", value = Layout.JUSTIFICATION_MODE_NONE), + @EnumEntry(name = "inter_word", value = Layout.JUSTIFICATION_MODE_INTER_WORD) }) public @Layout.JustificationMode int getJustificationMode() { return mJustificationMode; @@ -6667,142 +6667,142 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see android.text.InputType */ @InspectableProperty(flagMapping = { - @FlagMap(name = "none", mask = 0xffffffff, target = InputType.TYPE_NULL), - @FlagMap( + @FlagEntry(name = "none", mask = 0xffffffff, target = InputType.TYPE_NULL), + @FlagEntry( name = "text", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL), - @FlagMap( + @FlagEntry( name = "textUri", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI), - @FlagMap( + @FlagEntry( name = "textEmailAddress", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS), - @FlagMap( + @FlagEntry( name = "textEmailSubject", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_SUBJECT), - @FlagMap( + @FlagEntry( name = "textShortMessage", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE), - @FlagMap( + @FlagEntry( name = "textLongMessage", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_LONG_MESSAGE), - @FlagMap( + @FlagEntry( name = "textPersonName", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PERSON_NAME), - @FlagMap( + @FlagEntry( name = "textPostalAddress", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_POSTAL_ADDRESS), - @FlagMap( + @FlagEntry( name = "textPassword", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD), - @FlagMap( + @FlagEntry( name = "textVisiblePassword", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD), - @FlagMap( + @FlagEntry( name = "textWebEditText", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT), - @FlagMap( + @FlagEntry( name = "textFilter", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_FILTER), - @FlagMap( + @FlagEntry( name = "textPhonetic", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PHONETIC), - @FlagMap( + @FlagEntry( name = "textWebEmailAddress", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS), - @FlagMap( + @FlagEntry( name = "textWebPassword", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD), - @FlagMap( + @FlagEntry( name = "number", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_NORMAL), - @FlagMap( + @FlagEntry( name = "numberPassword", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD), - @FlagMap( + @FlagEntry( name = "phone", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_PHONE), - @FlagMap( + @FlagEntry( name = "datetime", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_DATETIME | InputType.TYPE_DATETIME_VARIATION_NORMAL), - @FlagMap( + @FlagEntry( name = "date", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_DATETIME | InputType.TYPE_DATETIME_VARIATION_DATE), - @FlagMap( + @FlagEntry( name = "time", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_VARIATION, target = InputType.TYPE_CLASS_DATETIME | InputType.TYPE_DATETIME_VARIATION_TIME), - @FlagMap( + @FlagEntry( name = "textCapCharacters", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS), - @FlagMap( + @FlagEntry( name = "textCapWords", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_WORDS), - @FlagMap( + @FlagEntry( name = "textCapSentences", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES), - @FlagMap( + @FlagEntry( name = "textAutoCorrect", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT), - @FlagMap( + @FlagEntry( name = "textAutoComplete", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE), - @FlagMap( + @FlagEntry( name = "textMultiLine", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE), - @FlagMap( + @FlagEntry( name = "textImeMultiLine", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_IME_MULTI_LINE), - @FlagMap( + @FlagEntry( name = "textNoSuggestions", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS), - @FlagMap( + @FlagEntry( name = "numberSigned", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED), - @FlagMap( + @FlagEntry( name = "numberDecimal", mask = InputType.TYPE_MASK_CLASS | InputType.TYPE_MASK_FLAGS, target = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL), @@ -6832,49 +6832,51 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @see EditorInfo */ @InspectableProperty(flagMapping = { - @FlagMap(name = "normal", mask = 0xffffffff, target = EditorInfo.IME_NULL), - @FlagMap( + @FlagEntry(name = "normal", mask = 0xffffffff, target = EditorInfo.IME_NULL), + @FlagEntry( name = "actionUnspecified", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_UNSPECIFIED), - @FlagMap( + @FlagEntry( name = "actionNone", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_NONE), - @FlagMap( + @FlagEntry( name = "actionGo", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_GO), - @FlagMap( + @FlagEntry( name = "actionSearch", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_SEARCH), - @FlagMap( + @FlagEntry( name = "actionSend", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_SEND), - @FlagMap( + @FlagEntry( name = "actionNext", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_NEXT), - @FlagMap( + @FlagEntry( name = "actionDone", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_DONE), - @FlagMap( + @FlagEntry( name = "actionPrevious", mask = EditorInfo.IME_MASK_ACTION, target = EditorInfo.IME_ACTION_PREVIOUS), - @FlagMap(name = "flagForceAscii", target = EditorInfo.IME_FLAG_FORCE_ASCII), - @FlagMap(name = "flagNavigateNext", target = EditorInfo.IME_FLAG_NAVIGATE_NEXT), - @FlagMap(name = "flagNavigatePrevious", target = EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS), - @FlagMap( + @FlagEntry(name = "flagForceAscii", target = EditorInfo.IME_FLAG_FORCE_ASCII), + @FlagEntry(name = "flagNavigateNext", target = EditorInfo.IME_FLAG_NAVIGATE_NEXT), + @FlagEntry( + name = "flagNavigatePrevious", + target = EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS), + @FlagEntry( name = "flagNoAccessoryAction", target = EditorInfo.IME_FLAG_NO_ACCESSORY_ACTION), - @FlagMap(name = "flagNoEnterAction", target = EditorInfo.IME_FLAG_NO_ENTER_ACTION), - @FlagMap(name = "flagNoExtractUi", target = EditorInfo.IME_FLAG_NO_EXTRACT_UI), - @FlagMap(name = "flagNoFullscreen", target = EditorInfo.IME_FLAG_NO_FULLSCREEN), - @FlagMap( + @FlagEntry(name = "flagNoEnterAction", target = EditorInfo.IME_FLAG_NO_ENTER_ACTION), + @FlagEntry(name = "flagNoExtractUi", target = EditorInfo.IME_FLAG_NO_EXTRACT_UI), + @FlagEntry(name = "flagNoFullscreen", target = EditorInfo.IME_FLAG_NO_FULLSCREEN), + @FlagEntry( name = "flagNoPersonalizedLearning", target = EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING), }) diff --git a/core/java/android/widget/TimePicker.java b/core/java/android/widget/TimePicker.java index c7a298016d44..8a5d5312bd7b 100644 --- a/core/java/android/widget/TimePicker.java +++ b/core/java/android/widget/TimePicker.java @@ -169,8 +169,8 @@ public class TimePicker extends FrameLayout { @TimePickerMode @TestApi @InspectableProperty(name = "timePickerMode", enumMapping = { - @InspectableProperty.EnumMap(name = "clock", value = MODE_CLOCK), - @InspectableProperty.EnumMap(name = "spinner", value = MODE_SPINNER) + @InspectableProperty.EnumEntry(name = "clock", value = MODE_CLOCK), + @InspectableProperty.EnumEntry(name = "spinner", value = MODE_SPINNER) }) public int getMode() { return mMode; diff --git a/tools/processors/view_inspector/src/java/android/processor/view/inspector/InspectablePropertyProcessor.java b/tools/processors/view_inspector/src/java/android/processor/view/inspector/InspectablePropertyProcessor.java index 2042a68857fb..7f5f9ca8a8f8 100644 --- a/tools/processors/view_inspector/src/java/android/processor/view/inspector/InspectablePropertyProcessor.java +++ b/tools/processors/view_inspector/src/java/android/processor/view/inspector/InspectablePropertyProcessor.java @@ -635,14 +635,14 @@ public final class InspectablePropertyProcessor implements ModelProcessor { final String name = mAnnotationUtils.typedValueByName( "name", String.class, accessor, enumAnnotation) .orElseThrow(() -> new ProcessingException( - "Name is required for @EnumMap", + "Name is required for @EnumEntry", accessor, enumAnnotation)); final int value = mAnnotationUtils.typedValueByName( "value", Integer.class, accessor, enumAnnotation) .orElseThrow(() -> new ProcessingException( - "Value is required for @EnumMap", + "Value is required for @EnumEntry", accessor, enumAnnotation)); @@ -684,14 +684,14 @@ public final class InspectablePropertyProcessor implements ModelProcessor { final String name = mAnnotationUtils.typedValueByName( "name", String.class, accessor, flagAnnotation) .orElseThrow(() -> new ProcessingException( - "Name is required for @FlagMap", + "Name is required for @FlagEntry", accessor, flagAnnotation)); final int target = mAnnotationUtils.typedValueByName( "target", Integer.class, accessor, flagAnnotation) .orElseThrow(() -> new ProcessingException( - "Target is required for @FlagMap", + "Target is required for @FlagEntry", accessor, flagAnnotation)); |