Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -23374,6 +23374,7 @@ package android.view { method public void onResolvedTextDirectionReset(); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method public void onScreenStateChanged(int); method protected void onScrollChanged(int, int, int, int); method protected boolean onSetAlpha(int); method protected void onSizeChanged(int, int, int, int); Loading Loading @@ -23583,6 +23584,8 @@ package android.view { field public static final android.util.Property ROTATION_Y; field public static final android.util.Property SCALE_X; field public static final android.util.Property SCALE_Y; field public static final int SCREEN_STATE_OFF = 2; // 0x2 field public static final int SCREEN_STATE_ON = 1; // 0x1 field public static final int SCROLLBARS_INSIDE_INSET = 16777216; // 0x1000000 field public static final int SCROLLBARS_INSIDE_OVERLAY = 0; // 0x0 field public static final int SCROLLBARS_OUTSIDE_INSET = 50331648; // 0x3000000 core/java/android/view/IWindow.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ oneway interface IWindow { boolean reportDraw, in Configuration newConfig); void dispatchAppVisibility(boolean visible); void dispatchGetNewSurface(); void dispatchScreenStatus(boolean on); void dispatchScreenState(boolean on); /** * Tell the window that it is either gaining or losing focus. Keep it up Loading core/java/android/view/View.java +33 −0 Original line number Diff line number Diff line Loading @@ -1993,6 +1993,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ public static final int FIND_VIEWS_WITH_ACCESSIBILITY_NODE_PROVIDERS = 0x00000004; /** * Indicates that the screen has changed state and is now off. * * @see #onScreenStateChanged(int) */ public static final int SCREEN_STATE_OFF = 0x0; /** * Indicates that the screen has changed state and is now on. * * @see #onScreenStateChanged(int */ public static final int SCREEN_STATE_ON = 0x1; /** * Controls the over-scroll mode for this view. * See {@link #overScrollBy(int, int, int, int, int, int, int, int, boolean)}, Loading Loading @@ -9603,6 +9617,25 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } } /** * @see #onScreenStateChanged(int) */ void dispatchScreenStateChanged(int screenState) { onScreenStateChanged(screenState); } /** * This method is called whenever the state of the screen this view is * attached to changes. A state change will usually occurs when the screen * turns on or off (whether it happens automatically or the user does it * manually.) * * @param screenState The new state of the screen. Can be either * {@link #SCREEN_STATE_ON} or {@link #SCREEN_STATE_OFF} */ public void onScreenStateChanged(int screenState) { } /** * Resolve and cache the layout direction. LTR is set initially. This is implicitly supposing * that the parent directionality can and will be resolved before its children. Loading core/java/android/view/ViewGroup.java +11 −0 Original line number Diff line number Diff line Loading @@ -2253,6 +2253,17 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } @Override void dispatchScreenStateChanged(int screenState) { super.dispatchScreenStateChanged(screenState); final int count = mChildrenCount; final View[] children = mChildren; for (int i = 0; i < count; i++) { children[i].dispatchScreenStateChanged(screenState); } } @Override boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { boolean handled = super.dispatchPopulateAccessibilityEventInternal(event); Loading core/java/android/view/ViewRootImpl.java +12 −9 Original line number Diff line number Diff line Loading @@ -761,9 +761,12 @@ public final class ViewRootImpl implements ViewParent, scheduleTraversals(); } void handleScreenStatusChange(boolean on) { void handleScreenStateChange(boolean on) { if (on != mAttachInfo.mScreenOn) { mAttachInfo.mScreenOn = on; if (mView != null) { mView.dispatchScreenStateChanged(on ? View.SCREEN_STATE_ON : View.SCREEN_STATE_OFF); } if (on) { mFullRedrawNeeded = true; scheduleTraversals(); Loading Loading @@ -2500,7 +2503,7 @@ public final class ViewRootImpl implements ViewParent, private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_VIEW_ID = 21; private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT = 22; private final static int MSG_PROCESS_INPUT_EVENTS = 23; private final static int MSG_DISPATCH_SCREEN_STATUS = 24; private final static int MSG_DISPATCH_SCREEN_STATE = 24; final class ViewRootHandler extends Handler { @Override Loading Loading @@ -2757,9 +2760,9 @@ public final class ViewRootImpl implements ViewParent, .findAccessibilityNodeInfosByTextUiThread(msg); } } break; case MSG_DISPATCH_SCREEN_STATUS: { case MSG_DISPATCH_SCREEN_STATE: { if (mView != null) { handleScreenStatusChange(msg.arg1 == 1); handleScreenStateChange(msg.arg1 == 1); } } break; } Loading Loading @@ -4142,8 +4145,8 @@ public final class ViewRootImpl implements ViewParent, mHandler.sendMessage(msg); } public void dispatchScreenStatusChange(boolean on) { Message msg = mHandler.obtainMessage(MSG_DISPATCH_SCREEN_STATUS); public void dispatchScreenStateChange(boolean on) { Message msg = mHandler.obtainMessage(MSG_DISPATCH_SCREEN_STATE); msg.arg1 = on ? 1 : 0; mHandler.sendMessage(msg); } Loading Loading @@ -4349,10 +4352,10 @@ public final class ViewRootImpl implements ViewParent, } } public void dispatchScreenStatus(boolean on) { public void dispatchScreenState(boolean on) { final ViewRootImpl viewAncestor = mViewAncestor.get(); if (viewAncestor != null) { viewAncestor.dispatchScreenStatusChange(on); viewAncestor.dispatchScreenStateChange(on); } } Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -23374,6 +23374,7 @@ package android.view { method public void onResolvedTextDirectionReset(); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method public void onScreenStateChanged(int); method protected void onScrollChanged(int, int, int, int); method protected boolean onSetAlpha(int); method protected void onSizeChanged(int, int, int, int); Loading Loading @@ -23583,6 +23584,8 @@ package android.view { field public static final android.util.Property ROTATION_Y; field public static final android.util.Property SCALE_X; field public static final android.util.Property SCALE_Y; field public static final int SCREEN_STATE_OFF = 2; // 0x2 field public static final int SCREEN_STATE_ON = 1; // 0x1 field public static final int SCROLLBARS_INSIDE_INSET = 16777216; // 0x1000000 field public static final int SCROLLBARS_INSIDE_OVERLAY = 0; // 0x0 field public static final int SCROLLBARS_OUTSIDE_INSET = 50331648; // 0x3000000
core/java/android/view/IWindow.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ oneway interface IWindow { boolean reportDraw, in Configuration newConfig); void dispatchAppVisibility(boolean visible); void dispatchGetNewSurface(); void dispatchScreenStatus(boolean on); void dispatchScreenState(boolean on); /** * Tell the window that it is either gaining or losing focus. Keep it up Loading
core/java/android/view/View.java +33 −0 Original line number Diff line number Diff line Loading @@ -1993,6 +1993,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ public static final int FIND_VIEWS_WITH_ACCESSIBILITY_NODE_PROVIDERS = 0x00000004; /** * Indicates that the screen has changed state and is now off. * * @see #onScreenStateChanged(int) */ public static final int SCREEN_STATE_OFF = 0x0; /** * Indicates that the screen has changed state and is now on. * * @see #onScreenStateChanged(int */ public static final int SCREEN_STATE_ON = 0x1; /** * Controls the over-scroll mode for this view. * See {@link #overScrollBy(int, int, int, int, int, int, int, int, boolean)}, Loading Loading @@ -9603,6 +9617,25 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } } /** * @see #onScreenStateChanged(int) */ void dispatchScreenStateChanged(int screenState) { onScreenStateChanged(screenState); } /** * This method is called whenever the state of the screen this view is * attached to changes. A state change will usually occurs when the screen * turns on or off (whether it happens automatically or the user does it * manually.) * * @param screenState The new state of the screen. Can be either * {@link #SCREEN_STATE_ON} or {@link #SCREEN_STATE_OFF} */ public void onScreenStateChanged(int screenState) { } /** * Resolve and cache the layout direction. LTR is set initially. This is implicitly supposing * that the parent directionality can and will be resolved before its children. Loading
core/java/android/view/ViewGroup.java +11 −0 Original line number Diff line number Diff line Loading @@ -2253,6 +2253,17 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } @Override void dispatchScreenStateChanged(int screenState) { super.dispatchScreenStateChanged(screenState); final int count = mChildrenCount; final View[] children = mChildren; for (int i = 0; i < count; i++) { children[i].dispatchScreenStateChanged(screenState); } } @Override boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) { boolean handled = super.dispatchPopulateAccessibilityEventInternal(event); Loading
core/java/android/view/ViewRootImpl.java +12 −9 Original line number Diff line number Diff line Loading @@ -761,9 +761,12 @@ public final class ViewRootImpl implements ViewParent, scheduleTraversals(); } void handleScreenStatusChange(boolean on) { void handleScreenStateChange(boolean on) { if (on != mAttachInfo.mScreenOn) { mAttachInfo.mScreenOn = on; if (mView != null) { mView.dispatchScreenStateChanged(on ? View.SCREEN_STATE_ON : View.SCREEN_STATE_OFF); } if (on) { mFullRedrawNeeded = true; scheduleTraversals(); Loading Loading @@ -2500,7 +2503,7 @@ public final class ViewRootImpl implements ViewParent, private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_VIEW_ID = 21; private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT = 22; private final static int MSG_PROCESS_INPUT_EVENTS = 23; private final static int MSG_DISPATCH_SCREEN_STATUS = 24; private final static int MSG_DISPATCH_SCREEN_STATE = 24; final class ViewRootHandler extends Handler { @Override Loading Loading @@ -2757,9 +2760,9 @@ public final class ViewRootImpl implements ViewParent, .findAccessibilityNodeInfosByTextUiThread(msg); } } break; case MSG_DISPATCH_SCREEN_STATUS: { case MSG_DISPATCH_SCREEN_STATE: { if (mView != null) { handleScreenStatusChange(msg.arg1 == 1); handleScreenStateChange(msg.arg1 == 1); } } break; } Loading Loading @@ -4142,8 +4145,8 @@ public final class ViewRootImpl implements ViewParent, mHandler.sendMessage(msg); } public void dispatchScreenStatusChange(boolean on) { Message msg = mHandler.obtainMessage(MSG_DISPATCH_SCREEN_STATUS); public void dispatchScreenStateChange(boolean on) { Message msg = mHandler.obtainMessage(MSG_DISPATCH_SCREEN_STATE); msg.arg1 = on ? 1 : 0; mHandler.sendMessage(msg); } Loading Loading @@ -4349,10 +4352,10 @@ public final class ViewRootImpl implements ViewParent, } } public void dispatchScreenStatus(boolean on) { public void dispatchScreenState(boolean on) { final ViewRootImpl viewAncestor = mViewAncestor.get(); if (viewAncestor != null) { viewAncestor.dispatchScreenStatusChange(on); viewAncestor.dispatchScreenStateChange(on); } } Loading