summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 80725dc..8d69477 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