Merge "Sleep activities with AOD" into oc-mr1-dev am: f1ef6ef742
am: 2b99571564
Change-Id: Iae4b6dd49ba82cff1ba17b0d1265a085e1ad459e
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.view;
|
||||
|
||||
import android.Manifest.permission;
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.RequiresPermission;
|
||||
@@ -1424,6 +1425,15 @@ public interface WindowManager extends ViewManager {
|
||||
*/
|
||||
public static final int PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY = 0x00100000;
|
||||
|
||||
/**
|
||||
* If this flag is set on the window, window manager will acquire a sleep token that puts
|
||||
* all activities to sleep as long as this window is visible. When this flag is set, the
|
||||
* window needs to occlude all activity windows.
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(permission.DEVICE_POWER)
|
||||
public static final int PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN = 0x00200000;
|
||||
|
||||
/**
|
||||
* Control flags that are private to the platform.
|
||||
* @hide
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.view;
|
||||
|
||||
import static android.Manifest.permission;
|
||||
import static android.view.Display.DEFAULT_DISPLAY;
|
||||
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
|
||||
import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
|
||||
@@ -486,11 +487,17 @@ public interface WindowManagerPolicy {
|
||||
|
||||
/**
|
||||
* Returns true if the window owner can add internal system windows.
|
||||
* That is, they have {@link android.Manifest.permission#INTERNAL_SYSTEM_WINDOW}.
|
||||
* That is, they have {@link permission#INTERNAL_SYSTEM_WINDOW}.
|
||||
*/
|
||||
default boolean canAddInternalSystemWindow() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the window owner has the permission to acquire a sleep token when it's
|
||||
* visible. That is, they have the permission {@link permission#DEVICE_POWER}.
|
||||
*/
|
||||
boolean canAcquireSleepToken();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -775,7 +782,7 @@ public interface WindowManagerPolicy {
|
||||
* @param type The type of window being assigned.
|
||||
* @param canAddInternalSystemWindow If the owner window associated with the type we are
|
||||
* evaluating can add internal system windows. I.e they have
|
||||
* {@link android.Manifest.permission#INTERNAL_SYSTEM_WINDOW}. If true, alert window
|
||||
* {@link permission#INTERNAL_SYSTEM_WINDOW}. If true, alert window
|
||||
* types {@link android.view.WindowManager.LayoutParams#isSystemAlertWindowType(int)}
|
||||
* can be assigned layers greater than the layer for
|
||||
* {@link android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY} Else, their
|
||||
|
||||
Reference in New Issue
Block a user