diff options
author | Filip Gruszczynski <gruszczy@google.com> | 2014-07-16 16:35:18 -0700 |
---|---|---|
committer | Filip Gruszczynski <gruszczy@google.com> | 2014-07-17 11:23:13 -0700 |
commit | b57503c34d5611b229e694a4aa4cbafb2b8c221e (patch) | |
tree | 93b1ace2613f94b9d8cdef79c0e1aeaf3bb7f840 /policy | |
parent | 65d7c332d7b613f23a26066051cc7496e0efa994 (diff) | |
download | frameworks_base-b57503c34d5611b229e694a4aa4cbafb2b8c221e.zip frameworks_base-b57503c34d5611b229e694a4aa4cbafb2b8c221e.tar.gz frameworks_base-b57503c34d5611b229e694a4aa4cbafb2b8c221e.tar.bz2 |
Only use bottom outset for main display.
Change-Id: I42154d026811ee4b7ba9711c560c7a62fcdde7ee
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index b5f88f0..fe3021b 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -69,6 +69,7 @@ import android.util.SparseArray; import android.util.TypedValue; import android.view.ActionMode; import android.view.ContextThemeWrapper; +import android.view.Display; import android.view.Gravity; import android.view.IRotationWatcher; import android.view.IWindowManager; @@ -2941,9 +2942,17 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { a.getValue(com.android.internal.R.styleable.Window_windowFixedHeightMinor, mFixedHeightMinor); } - if (a.hasValue(com.android.internal.R.styleable.Window_windowOutsetBottom)) { - if (mOutsetBottom == null) mOutsetBottom = new TypedValue(); - a.getValue(com.android.internal.R.styleable.Window_windowOutsetBottom, mOutsetBottom); + + final WindowManager windowService = (WindowManager) getContext().getSystemService( + Context.WINDOW_SERVICE); + if (windowService != null) { + final Display display = windowService.getDefaultDisplay(); + if (display.getDisplayId() == Display.DEFAULT_DISPLAY && + a.hasValue(com.android.internal.R.styleable.Window_windowOutsetBottom)) { + if (mOutsetBottom == null) mOutsetBottom = new TypedValue(); + a.getValue(com.android.internal.R.styleable.Window_windowOutsetBottom, + mOutsetBottom); + } } final Context context = getContext(); |