From 891146c6a6e40f40d9e9ca34378389a5aa6a53a7 Mon Sep 17 00:00:00 2001 From: Garfield Tan Date: Tue, 9 Oct 2018 12:14:00 -0700 Subject: Implement launch bounds logic in Android (3/3) This CL introduces persistence to launch bounds logic. It also wires up the following state changes and persister: 1) freeform resizing; 2) windowing mode change; 3) display change; 4) task closing. We may still need to persist immersive mode, but that needs further discussion. Changed launch bounds modifier a bit so that it won't launch tasks that are completely out of the new display or conflict to existing tasks. Bug: 113252871 Test: Manual tests on that freeform launch bounds are persisted across reboots. atest WmTests:LaunchParamsPersisterTests atest WmTests:LaunchParamsControllerTests atest WmTests:PersisterQueueTests Change-Id: I20f3056735253c668c7f09c6eb5204e6a5990b1c --- core/java/android/view/Display.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/java/android/view/Display.java') diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 719a401ce0cf..4401b501538f 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -450,6 +450,19 @@ public final class Display { return mDisplayId; } + /** + * Gets the display unique id. + *

+ * Unique id is different from display id because physical displays have stable unique id across + * reboots. + * + * @see com.android.service.display.DisplayDevice#hasStableUniqueId(). + * @hide + */ + public String getUniqueId() { + return mDisplayInfo.uniqueId; + } + /** * Returns true if this display is still valid, false if the display has been removed. * -- cgit v1.2.3