diff options
| author | Jeff Brown <jeffbrown@google.com> | 2014-04-12 01:58:57 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-12 01:58:57 +0000 |
| commit | 9e2fde9c8a3557d6e8d1f3971a421ecdf5c2ce07 (patch) | |
| tree | 9d93f94401bafd7e5a236a608374936b7b48b5ae /core/java/android/view/View.java | |
| parent | 8ebd66c259602f6b0be26fdfd3fe2f55538f6424 (diff) | |
| parent | d912e1f6a111fb33118d116bd72da1a328041bca (diff) | |
| download | frameworks_base-9e2fde9c8a3557d6e8d1f3971a421ecdf5c2ce07.zip frameworks_base-9e2fde9c8a3557d6e8d1f3971a421ecdf5c2ce07.tar.gz frameworks_base-9e2fde9c8a3557d6e8d1f3971a421ecdf5c2ce07.tar.bz2 | |
am d912e1f6: Use the display\'s actual state in the view hierarchy.
* commit 'd912e1f6a111fb33118d116bd72da1a328041bca':
Use the display's actual state in the view hierarchy.
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index fe3bc9e..14e0211 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -16840,8 +16840,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // If the screen is off assume the animation start time is now instead of // the next frame we draw. Keeping the START_ON_FIRST_FRAME start time // would cause the animation to start when the screen turns back on - if (mAttachInfo != null && !mAttachInfo.mScreenOn && - animation.getStartTime() == Animation.START_ON_FIRST_FRAME) { + if (mAttachInfo != null && mAttachInfo.mDisplayState == Display.STATE_OFF + && animation.getStartTime() == Animation.START_ON_FIRST_FRAME) { animation.setStartTime(AnimationUtils.currentAnimationTimeMillis()); } animation.reset(); @@ -18713,7 +18713,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * A set of information given to a view when it is attached to its parent * window. */ - static class AttachInfo { + final static class AttachInfo { interface Callbacks { void playSoundEffect(int effectId); boolean performHapticFeedback(int effectId, boolean always); @@ -18779,7 +18779,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, boolean mHardwareAccelerationRequested; HardwareRenderer mHardwareRenderer; - boolean mScreenOn; + /** + * The state of the display to which the window is attached, as reported + * by {@link Display#getState()}. Note that the display state constants + * declared by {@link Display} do not exactly line up with the screen state + * constants declared by {@link View} (there are more display states than + * screen states). + */ + int mDisplayState = Display.STATE_UNKNOWN; /** * Scale factor used by the compatibility mode |
