diff options
author | Alan Viverette <alanv@google.com> | 2015-01-30 18:04:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-30 18:04:48 +0000 |
commit | b59041595b08a7aca8d425fc6e6b16583a275f12 (patch) | |
tree | 96537b5f024cfff5b83e5ad5a19e250dd709e5d5 /core/java/android/view/WindowManager.java | |
parent | 14dc3c900febb05cca89ffe610ebf7fb970e552b (diff) | |
parent | 5435a30ae552391f14009c4459731ae149675b18 (diff) | |
download | frameworks_base-b59041595b08a7aca8d425fc6e6b16583a275f12.zip frameworks_base-b59041595b08a7aca8d425fc6e6b16583a275f12.tar.gz frameworks_base-b59041595b08a7aca8d425fc6e6b16583a275f12.tar.bz2 |
Merge "Add transition support to PopupWindow"
Diffstat (limited to 'core/java/android/view/WindowManager.java')
-rw-r--r-- | core/java/android/view/WindowManager.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 12b310f..740cb5d 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1325,6 +1325,16 @@ public interface WindowManager extends ViewManager { * @hide */ public final Rect surfaceInsets = new Rect(); + + /** + * Whether the surface insets have been manually set. When set to + * {@code false}, the view root will automatically determine the + * appropriate surface insets. + * + * @see #surfaceInsets + * @hide + */ + public boolean hasManualSurfaceInsets; /** * The desired bitmap format. May be one of the constants in @@ -1621,6 +1631,7 @@ public interface WindowManager extends ViewManager { out.writeInt(surfaceInsets.top); out.writeInt(surfaceInsets.right); out.writeInt(surfaceInsets.bottom); + out.writeInt(hasManualSurfaceInsets ? 1 : 0); out.writeInt(needsMenuKey); } @@ -1669,6 +1680,7 @@ public interface WindowManager extends ViewManager { surfaceInsets.top = in.readInt(); surfaceInsets.right = in.readInt(); surfaceInsets.bottom = in.readInt(); + hasManualSurfaceInsets = in.readInt() != 0; needsMenuKey = in.readInt(); } @@ -1851,6 +1863,11 @@ public interface WindowManager extends ViewManager { changes |= SURFACE_INSETS_CHANGED; } + if (hasManualSurfaceInsets != o.hasManualSurfaceInsets) { + hasManualSurfaceInsets = o.hasManualSurfaceInsets; + changes |= SURFACE_INSETS_CHANGED; + } + if (needsMenuKey != o.needsMenuKey) { needsMenuKey = o.needsMenuKey; changes |= NEEDS_MENU_KEY_CHANGED; @@ -1959,8 +1976,11 @@ public interface WindowManager extends ViewManager { if (userActivityTimeout >= 0) { sb.append(" userActivityTimeout=").append(userActivityTimeout); } - if (!surfaceInsets.equals(Insets.NONE)) { + if (!surfaceInsets.equals(Insets.NONE) || hasManualSurfaceInsets) { sb.append(" surfaceInsets=").append(surfaceInsets); + if (hasManualSurfaceInsets) { + sb.append(" (manual)"); + } } if (needsMenuKey != NEEDS_MENU_UNSET) { sb.append(" needsMenuKey="); |