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

Commit 6b830b4e authored by Jiaquan He's avatar Jiaquan He Committed by android-build-merger
Browse files

Merge changes from topic 'highlight_fixed' into oc-dev am: 75966998

am: 778523ca

Change-Id: Ida41d373fac39153c2f16c1508e81d231872d62b
parents 2a03e998 778523ca
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.widget;
import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -1640,4 +1641,13 @@ public class ImageView extends View {
        super.encodeProperties(stream);
        stream.addProperty("layout:baseline", getBaseline());
    }

    /** @hide */
    @Override
    @TestApi
    public boolean isDefaultFocusHighlightNeeded(Drawable background, Drawable foreground) {
        final boolean lackFocusState = mDrawable == null || !mDrawable.isStateful()
                || !mDrawable.hasFocusStateSpecified();
        return super.isDefaultFocusHighlightNeeded(background, foreground) && lackFocusState;
    }
}