Loading core/java/android/view/View.java +8 −1 Original line number Diff line number Diff line Loading @@ -3887,6 +3887,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private Drawable mDefaultFocusHighlight; private Drawable mDefaultFocusHighlightCache; private boolean mDefaultFocusHighlightSizeChanged; /** * True if the default focus highlight is needed on the target device. */ private static boolean sUseDefaultFocusHighlight; private String mTransitionName; Loading Loading @@ -4464,6 +4468,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, sAutoFocusableOffUIThreadWontNotifyParents = targetSdkVersion < Build.VERSION_CODES.O; sUseDefaultFocusHighlight = context.getResources().getBoolean( com.android.internal.R.bool.config_useDefaultFocusHighlight); sCompatibilityDone = true; } } Loading Loading @@ -19677,7 +19684,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final boolean hasFocusStateSpecified = background == null || !background.isStateful() || !background.hasFocusStateSpecified(); return !isInTouchMode() && getDefaultFocusHighlightEnabled() && hasFocusStateSpecified && isAttachedToWindow(); && isAttachedToWindow() && sUseDefaultFocusHighlight; } /** core/res/res/values-television/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,7 @@ <!-- The default gravity for the picture-in-picture window. Currently, this maps to Gravity.BOTTOM | Gravity.RIGHT --> <integer name="config_defaultPictureInPictureGravity">0x55</integer> <!-- Whether the device uses the default focus highlight when focus state isn't specified. --> <bool name="config_useDefaultFocusHighlight">false</bool> </resources> core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2835,4 +2835,7 @@ specified name exists on the device, autofill will be disabled by default. --> <string name="config_defaultAutofillService" translatable="false"></string> <!-- Whether the device uses the default focus highlight when focus state isn't specified. --> <bool name="config_useDefaultFocusHighlight">true</bool> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ <java-symbol type="integer" name="config_mdc_initial_max_retry" /> <java-symbol type="integer" name="config_keepPreloadsMinDays" /> <java-symbol type="bool" name="config_hasPermanentDpad" /> <java-symbol type="bool" name="config_useDefaultFocusHighlight" /> <java-symbol type="color" name="tab_indicator_text_v4" /> Loading Loading
core/java/android/view/View.java +8 −1 Original line number Diff line number Diff line Loading @@ -3887,6 +3887,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private Drawable mDefaultFocusHighlight; private Drawable mDefaultFocusHighlightCache; private boolean mDefaultFocusHighlightSizeChanged; /** * True if the default focus highlight is needed on the target device. */ private static boolean sUseDefaultFocusHighlight; private String mTransitionName; Loading Loading @@ -4464,6 +4468,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, sAutoFocusableOffUIThreadWontNotifyParents = targetSdkVersion < Build.VERSION_CODES.O; sUseDefaultFocusHighlight = context.getResources().getBoolean( com.android.internal.R.bool.config_useDefaultFocusHighlight); sCompatibilityDone = true; } } Loading Loading @@ -19677,7 +19684,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final boolean hasFocusStateSpecified = background == null || !background.isStateful() || !background.hasFocusStateSpecified(); return !isInTouchMode() && getDefaultFocusHighlightEnabled() && hasFocusStateSpecified && isAttachedToWindow(); && isAttachedToWindow() && sUseDefaultFocusHighlight; } /**
core/res/res/values-television/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,7 @@ <!-- The default gravity for the picture-in-picture window. Currently, this maps to Gravity.BOTTOM | Gravity.RIGHT --> <integer name="config_defaultPictureInPictureGravity">0x55</integer> <!-- Whether the device uses the default focus highlight when focus state isn't specified. --> <bool name="config_useDefaultFocusHighlight">false</bool> </resources>
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2835,4 +2835,7 @@ specified name exists on the device, autofill will be disabled by default. --> <string name="config_defaultAutofillService" translatable="false"></string> <!-- Whether the device uses the default focus highlight when focus state isn't specified. --> <bool name="config_useDefaultFocusHighlight">true</bool> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ <java-symbol type="integer" name="config_mdc_initial_max_retry" /> <java-symbol type="integer" name="config_keepPreloadsMinDays" /> <java-symbol type="bool" name="config_hasPermanentDpad" /> <java-symbol type="bool" name="config_useDefaultFocusHighlight" /> <java-symbol type="color" name="tab_indicator_text_v4" /> Loading