Loading core/java/android/app/MediaRouteButton.java +4 −4 Original line number Diff line number Diff line Loading @@ -256,10 +256,10 @@ public class MediaRouteButton extends View { protected void drawableStateChanged() { super.drawableStateChanged(); if (mRemoteIndicator != null) { int[] myDrawableState = getDrawableState(); mRemoteIndicator.setState(myDrawableState); invalidate(); final Drawable remoteIndicator = mRemoteIndicator; if (remoteIndicator != null && remoteIndicator.isStateful() && remoteIndicator.setState(getDrawableState())) { invalidateDrawable(remoteIndicator); } } Loading core/java/android/view/View.java +10 −4 Original line number Diff line number Diff line Loading @@ -17042,27 +17042,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @CallSuper protected void drawableStateChanged() { final int[] state = getDrawableState(); boolean changed = false; final Drawable bg = mBackground; if (bg != null && bg.isStateful()) { bg.setState(state); changed |= bg.setState(state); } final Drawable fg = mForegroundInfo != null ? mForegroundInfo.mDrawable : null; if (fg != null && fg.isStateful()) { fg.setState(state); changed |= fg.setState(state); } if (mScrollCache != null) { final Drawable scrollBar = mScrollCache.scrollBar; if (scrollBar != null && scrollBar.isStateful()) { scrollBar.setState(state); changed |= scrollBar.setState(state) && mScrollCache.state != ScrollabilityCache.OFF; } } if (mStateListAnimator != null) { mStateListAnimator.setState(state); } if (changed) { invalidate(); } } /** core/java/android/widget/AbsListView.java +6 −3 Original line number Diff line number Diff line Loading @@ -2777,11 +2777,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } void updateSelectorState() { if (mSelector != null) { final Drawable selector = mSelector; if (selector != null && selector.isStateful()) { if (shouldShowSelector()) { mSelector.setState(getDrawableStateForSelector()); if (selector.setState(getDrawableStateForSelector())) { invalidateDrawable(selector); } } else { mSelector.setState(StateSet.NOTHING); selector.setState(StateSet.NOTHING); } } } Loading core/java/android/widget/AbsSeekBar.java +3 −2 Original line number Diff line number Diff line Loading @@ -369,8 +369,9 @@ public abstract class AbsSeekBar extends ProgressBar { } final Drawable thumb = mThumb; if (thumb != null && thumb.isStateful()) { thumb.setState(getDrawableState()); if (thumb != null && thumb.isStateful() && thumb.setState(getDrawableState())) { invalidateDrawable(thumb); } } Loading core/java/android/widget/CheckedTextView.java +5 −8 Original line number Diff line number Diff line Loading @@ -426,13 +426,10 @@ public class CheckedTextView extends TextView implements Checkable { protected void drawableStateChanged() { super.drawableStateChanged(); if (mCheckMarkDrawable != null) { int[] myDrawableState = getDrawableState(); // Set the state of the Drawable mCheckMarkDrawable.setState(myDrawableState); invalidate(); final Drawable checkMarkDrawable = mCheckMarkDrawable; if (checkMarkDrawable != null && checkMarkDrawable.isStateful() && checkMarkDrawable.setState(getDrawableState())) { invalidateDrawable(checkMarkDrawable); } } Loading Loading
core/java/android/app/MediaRouteButton.java +4 −4 Original line number Diff line number Diff line Loading @@ -256,10 +256,10 @@ public class MediaRouteButton extends View { protected void drawableStateChanged() { super.drawableStateChanged(); if (mRemoteIndicator != null) { int[] myDrawableState = getDrawableState(); mRemoteIndicator.setState(myDrawableState); invalidate(); final Drawable remoteIndicator = mRemoteIndicator; if (remoteIndicator != null && remoteIndicator.isStateful() && remoteIndicator.setState(getDrawableState())) { invalidateDrawable(remoteIndicator); } } Loading
core/java/android/view/View.java +10 −4 Original line number Diff line number Diff line Loading @@ -17042,27 +17042,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @CallSuper protected void drawableStateChanged() { final int[] state = getDrawableState(); boolean changed = false; final Drawable bg = mBackground; if (bg != null && bg.isStateful()) { bg.setState(state); changed |= bg.setState(state); } final Drawable fg = mForegroundInfo != null ? mForegroundInfo.mDrawable : null; if (fg != null && fg.isStateful()) { fg.setState(state); changed |= fg.setState(state); } if (mScrollCache != null) { final Drawable scrollBar = mScrollCache.scrollBar; if (scrollBar != null && scrollBar.isStateful()) { scrollBar.setState(state); changed |= scrollBar.setState(state) && mScrollCache.state != ScrollabilityCache.OFF; } } if (mStateListAnimator != null) { mStateListAnimator.setState(state); } if (changed) { invalidate(); } } /**
core/java/android/widget/AbsListView.java +6 −3 Original line number Diff line number Diff line Loading @@ -2777,11 +2777,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } void updateSelectorState() { if (mSelector != null) { final Drawable selector = mSelector; if (selector != null && selector.isStateful()) { if (shouldShowSelector()) { mSelector.setState(getDrawableStateForSelector()); if (selector.setState(getDrawableStateForSelector())) { invalidateDrawable(selector); } } else { mSelector.setState(StateSet.NOTHING); selector.setState(StateSet.NOTHING); } } } Loading
core/java/android/widget/AbsSeekBar.java +3 −2 Original line number Diff line number Diff line Loading @@ -369,8 +369,9 @@ public abstract class AbsSeekBar extends ProgressBar { } final Drawable thumb = mThumb; if (thumb != null && thumb.isStateful()) { thumb.setState(getDrawableState()); if (thumb != null && thumb.isStateful() && thumb.setState(getDrawableState())) { invalidateDrawable(thumb); } } Loading
core/java/android/widget/CheckedTextView.java +5 −8 Original line number Diff line number Diff line Loading @@ -426,13 +426,10 @@ public class CheckedTextView extends TextView implements Checkable { protected void drawableStateChanged() { super.drawableStateChanged(); if (mCheckMarkDrawable != null) { int[] myDrawableState = getDrawableState(); // Set the state of the Drawable mCheckMarkDrawable.setState(myDrawableState); invalidate(); final Drawable checkMarkDrawable = mCheckMarkDrawable; if (checkMarkDrawable != null && checkMarkDrawable.isStateful() && checkMarkDrawable.setState(getDrawableState())) { invalidateDrawable(checkMarkDrawable); } } Loading