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

am: 778523ca5c

Change-Id: Ida41d373fac39153c2f16c1508e81d231872d62b
This commit is contained in:
Jiaquan He
2017-05-30 13:36:09 +00:00
committed by android-build-merger

View File

@@ -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;
}
}