Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dcb9463 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Opt out default focus highlight for TV."

parents 92dd7193 f5a0d099
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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;
        }
    }
@@ -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;
    }
    /**
+3 −0
Original line number Diff line number Diff line
@@ -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>
+3 −0
Original line number Diff line number Diff line
@@ -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>
+1 −0
Original line number Diff line number Diff line
@@ -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" />