@@ -123,7 +123,7 @@ public interface WindowManagerPolicy {
123123 /**
124124 * This key event should put the device to sleep (and engage keyguard if necessary)
125125 * To be returned from {@link #interceptKeyBeforeQueueing}.
126- * Do not return this and {@link #ACTION_POKE_USER_ACTIVITY } or {@link #ACTION_PASS_TO_USER}.
126+ * Do not return this and {@link #ACTION_WAKE_UP } or {@link #ACTION_PASS_TO_USER}.
127127 */
128128 public final static int ACTION_GO_TO_SLEEP = 0x00000004 ;
129129
@@ -338,6 +338,12 @@ public void computeFrameLw(Rect parentFrame, Rect displayFrame,
338338 * Check whether the process hosting this window is currently alive.
339339 */
340340 public boolean isAlive ();
341+
342+ /**
343+ * Check if window is on {@link Display#DEFAULT_DISPLAY}.
344+ * @return true if window is on default display.
345+ */
346+ public boolean isDefaultDisplay ();
341347 }
342348
343349 /**
@@ -707,7 +713,7 @@ public int prepareAddWindowLw(WindowState win,
707713 * @param isScreenOn True if the screen is already on
708714 *
709715 * @return The bitwise or of the {@link #ACTION_PASS_TO_USER},
710- * {@link #ACTION_POKE_USER_ACTIVITY } and {@link #ACTION_GO_TO_SLEEP} flags.
716+ * {@link #ACTION_WAKE_UP } and {@link #ACTION_GO_TO_SLEEP} flags.
711717 */
712718 public int interceptKeyBeforeQueueing (KeyEvent event , int policyFlags , boolean isScreenOn );
713719
@@ -721,7 +727,7 @@ public int prepareAddWindowLw(WindowState win,
721727 * @param policyFlags The policy flags associated with the motion.
722728 *
723729 * @return The bitwise or of the {@link #ACTION_PASS_TO_USER},
724- * {@link #ACTION_POKE_USER_ACTIVITY } and {@link #ACTION_GO_TO_SLEEP} flags.
730+ * {@link #ACTION_WAKE_UP } and {@link #ACTION_GO_TO_SLEEP} flags.
725731 */
726732 public int interceptMotionBeforeQueueingWhenScreenOff (int policyFlags );
727733
@@ -762,12 +768,14 @@ public int prepareAddWindowLw(WindowState win,
762768 /**
763769 * Called when layout of the windows is about to start.
764770 *
771+ * @param isDefaultDisplay true if window is on {@link Display#DEFAULT_DISPLAY}.
765772 * @param displayWidth The current full width of the screen.
766773 * @param displayHeight The current full height of the screen.
767774 * @param displayRotation The current rotation being applied to the base
768775 * window.
769776 */
770- public void beginLayoutLw (int displayWidth , int displayHeight , int displayRotation );
777+ public void beginLayoutLw (boolean isDefaultDisplay , int displayWidth , int displayHeight ,
778+ int displayRotation );
771779
772780 /**
773781 * Return the rectangle of the screen currently covered by system decorations.
@@ -1066,9 +1074,9 @@ interface OnKeyguardExitResult {
10661074 * Inform the policy that the user has chosen a preferred orientation ("rotation lock").
10671075 *
10681076 * @param mode One of {@link WindowManagerPolicy#USER_ROTATION_LOCKED} or
1069- * {@link * WindowManagerPolicy#USER_ROTATION_FREE}.
1077+ * {@link WindowManagerPolicy#USER_ROTATION_FREE}.
10701078 * @param rotation One of {@link Surface#ROTATION_0}, {@link Surface#ROTATION_90},
1071- * {@link Surface#ROTATION_180}, {@link Surface#ROTATION_270}.
1079+ * {@link Surface#ROTATION_180}, {@link Surface#ROTATION_270}.
10721080 */
10731081 public void setUserRotationMode (int mode , int rotation );
10741082
0 commit comments