diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-01 04:51:12 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-01 04:51:12 +0000 |
commit | 2acc9bd2e5e450a9ca333cc7158a30627d0a55a0 (patch) | |
tree | be7c5a5f794a3ea913fe1ab60c4b5708150094ef | |
parent | 130d552d38a7ed3da018e96aea893faa960969a2 (diff) | |
parent | faa09f9b92e629c90680a2546cdf34949c2f6f9c (diff) | |
download | base-android10-qpr2-s2-release.tar.gz |
Merge cherrypicks of [10916097, 10914739, 10912787, 10909613, 10915495, 10914740, 10916100, 10916045, 10916046] into sparse-6342279-L99500000514397997android-10.0.0_r34android10-qpr2-s2-release
Change-Id: I1ed34743bbaa1c7f24b031239ee85b6825dc8ff9
-rw-r--r-- | core/java/android/app/Presentation.java | 16 | ||||
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 8 |
2 files changed, 7 insertions, 17 deletions
diff --git a/core/java/android/app/Presentation.java b/core/java/android/app/Presentation.java index b3a39f5025c7..cb72d4d5dc2c 100644 --- a/core/java/android/app/Presentation.java +++ b/core/java/android/app/Presentation.java @@ -26,18 +26,18 @@ import android.content.res.Resources; import android.hardware.display.DisplayManager; import android.hardware.display.DisplayManager.DisplayListener; import android.os.Binder; -import android.os.Handler; import android.os.IBinder; -import android.os.Message; -import android.util.DisplayMetrics; -import android.util.Log; -import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.Display; import android.view.Gravity; import android.view.Window; import android.view.WindowManager; import android.view.WindowManagerImpl; +import android.os.Handler; +import android.os.Message; +import android.util.DisplayMetrics; +import android.util.Log; +import android.util.TypedValue; /** * Base class for presentations. @@ -116,9 +116,7 @@ import android.view.WindowManagerImpl; * The display manager keeps track of all displays in the system. However, not all * displays are appropriate for showing presentations. For example, if an activity * attempted to show a presentation on the main display it might obscure its own content - * (it's like opening a dialog on top of your activity). Creating a presentation on the main - * display will result in {@link android.view.WindowManager.InvalidDisplayException} being thrown - * when invoking {@link #show()}. + * (it's like opening a dialog on top of your activity). * </p><p> * Here's how to identify suitable displays for showing presentations using * {@link DisplayManager#getDisplays(String)} and the @@ -245,7 +243,7 @@ public class Presentation extends Dialog { /** * Inherited from {@link Dialog#show}. Will throw * {@link android.view.WindowManager.InvalidDisplayException} if the specified secondary - * {@link Display} can't be found or if it does not have {@link Display#FLAG_PRESENTATION} set. + * {@link Display} can't be found. */ @Override public void show() { diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 86427a12c610..f67b4fe78f58 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -61,7 +61,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_DREAM; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; -import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; @@ -1298,13 +1297,6 @@ public class WindowManagerService extends IWindowManager.Stub return WindowManagerGlobal.ADD_PERMISSION_DENIED; } - if (type == TYPE_PRESENTATION && !displayContent.getDisplay().isPublicPresentation()) { - Slog.w(TAG_WM, - "Attempted to add presentation window to a non-suitable display. " - + "Aborting."); - return WindowManagerGlobal.ADD_INVALID_DISPLAY; - } - AppWindowToken atoken = null; final boolean hasParent = parentWindow != null; // Use existing parent window token for child windows since they go in the same token |