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

Commit 778523ca 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

Change-Id: I1856f049fbb1f76e728f881c088579309b81a57c
parents 74282f07 75966998
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;
    }
}