summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java2
-rw-r--r--core/java/com/android/internal/inputmethod/InputMethodRoot.java61
-rw-r--r--core/res/res/layout/input_method.xml4
-rw-r--r--core/res/res/values/colors.xml1
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java4
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java6
7 files changed, 72 insertions, 7 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 9319d4a..1b7d9ea 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -687,6 +687,8 @@ public class InputMethodService extends AbstractInputMethodService {
mThemeAttrs = obtainStyledAttributes(android.R.styleable.InputMethodService);
mRootView = mInflater.inflate(
com.android.internal.R.layout.input_method, null);
+ mRootView.setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
mWindow.setContentView(mRootView);
mRootView.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsComputer);
if (Settings.Global.getInt(getContentResolver(),
diff --git a/core/java/com/android/internal/inputmethod/InputMethodRoot.java b/core/java/com/android/internal/inputmethod/InputMethodRoot.java
new file mode 100644
index 0000000..f070a58
--- /dev/null
+++ b/core/java/com/android/internal/inputmethod/InputMethodRoot.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.inputmethod;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.util.AttributeSet;
+import android.widget.LinearLayout;
+
+public class InputMethodRoot extends LinearLayout {
+ private final Rect mGuardRect = new Rect();
+ private final Paint mGuardPaint = new Paint();
+
+ public InputMethodRoot(Context context) {
+ this(context, null);
+ }
+
+ public InputMethodRoot(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public InputMethodRoot(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs);
+ setWillNotDraw(false);
+ mGuardPaint.setColor(context.getResources()
+ .getColor(com.android.internal.R.color.input_method_navigation_guard));
+ }
+
+ @Override
+ protected boolean fitSystemWindows(Rect insets) {
+ setPadding(0, 0, 0, insets.bottom);
+ return true;
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+ // draw navigation bar guard
+ final int w = getMeasuredWidth();
+ final int h = getMeasuredHeight();
+ mGuardRect.set(0, h - getPaddingBottom(), w, h);
+ canvas.drawRect(mGuardRect, mGuardPaint);
+ }
+}
diff --git a/core/res/res/layout/input_method.xml b/core/res/res/layout/input_method.xml
index f80d628..23d7189 100644
--- a/core/res/res/layout/input_method.xml
+++ b/core/res/res/layout/input_method.xml
@@ -18,7 +18,7 @@
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.internal.inputmethod.InputMethodRoot xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parentPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -52,4 +52,4 @@
android:layout_height="wrap_content"
android:visibility="gone">
</FrameLayout>
-</LinearLayout>
+</com.android.internal.inputmethod.InputMethodRoot>
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 81ee3af..28e7af7 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -78,6 +78,7 @@
<drawable name="input_method_fullscreen_background">#fff9f9f9</drawable>
<drawable name="input_method_fullscreen_background_holo">@drawable/screen_background_holo_dark</drawable>
+ <color name="input_method_navigation_guard">#ff000000</color>
<!-- For date picker widget -->
<drawable name="selected_day_background">#ff0092f4</drawable>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index ad9144c..edfdcc2 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1441,6 +1441,7 @@
<java-symbol type="bool" name="config_wimaxEnabled" />
<java-symbol type="bool" name="show_ongoing_ime_switcher" />
<java-symbol type="color" name="config_defaultNotificationColor" />
+ <java-symbol type="color" name="input_method_navigation_guard" />
<java-symbol type="drawable" name="ic_notification_ime_default" />
<java-symbol type="drawable" name="ic_notify_wifidisplay" />
<java-symbol type="drawable" name="ic_menu_refresh" />
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index c02a99b..04ca4d6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1923,10 +1923,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
}
private void checkBarMode(int mode, int windowState, BarTransitions transitions) {
- final boolean imeVisible = (mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0;
- final int finalMode = imeVisible ? MODE_OPAQUE : mode;
final boolean anim = (mScreenOn == null || mScreenOn) && windowState != WINDOW_STATE_HIDDEN;
- transitions.transitionTo(finalMode, anim);
+ transitions.transitionTo(mode, anim);
}
private final Runnable mCheckBarModes = new Runnable() {
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 8b6b60a..e9e3b27 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2991,8 +2991,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
pf.left = df.left = of.left = cf.left = vf.left = mDockLeft;
pf.top = df.top = of.top = cf.top = vf.top = mDockTop;
pf.right = df.right = of.right = cf.right = vf.right = mDockRight;
- // IM dock windows always go above the nav bar.
- pf.bottom = df.bottom = of.bottom = cf.bottom = vf.bottom = mStableBottom;
+ // IM dock windows layout below the nav bar...
+ pf.bottom = df.bottom = of.bottom = mRestrictedScreenTop + mRestrictedScreenHeight;
+ // ...with content insets above the nav bar
+ cf.bottom = vf.bottom = mStableBottom;
// IM dock windows always go to the bottom of the screen.
attrs.gravity = Gravity.BOTTOM;
mDockLayer = win.getSurfaceLayer();