summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java15
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 da0bc30..1e61236 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -71,6 +71,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;
@@ -3182,9 +3183,17 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
if (a.getBoolean(com.android.internal.R.styleable.Window_windowContentTransitions, false)) {
requestFeature(FEATURE_CONTENT_TRANSITIONS);
}
- 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();