summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/SoftInputWindow.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/inputmethodservice/SoftInputWindow.java')
-rw-r--r--core/java/android/inputmethodservice/SoftInputWindow.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/core/java/android/inputmethodservice/SoftInputWindow.java b/core/java/android/inputmethodservice/SoftInputWindow.java
index 6c8eb41d8724..0893d2aad740 100644
--- a/core/java/android/inputmethodservice/SoftInputWindow.java
+++ b/core/java/android/inputmethodservice/SoftInputWindow.java
@@ -23,7 +23,6 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
import android.app.Dialog;
-import android.content.Context;
import android.graphics.Rect;
import android.os.Debug;
import android.os.IBinder;
@@ -32,6 +31,7 @@ import android.util.proto.ProtoOutputStream;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
+import android.view.WindowInsetsController;
import android.view.WindowManager;
import java.lang.annotation.Retention;
@@ -47,6 +47,7 @@ final class SoftInputWindow extends Dialog {
private final KeyEvent.DispatcherState mDispatcherState;
private final Rect mBounds = new Rect();
+ private final InputMethodService mService;
@Retention(SOURCE)
@IntDef(value = {WindowState.TOKEN_PENDING, WindowState.TOKEN_SET,
@@ -120,7 +121,7 @@ final class SoftInputWindow extends Dialog {
/**
* Create a SoftInputWindow that uses a custom style.
*
- * @param context The Context in which the DockWindow should run. In
+ * @param service The {@link InputMethodService} in which the DockWindow should run. In
* particular, it uses the window manager and theme from this context
* to present its UI.
* @param theme A style resource describing the theme to use for the window.
@@ -129,8 +130,10 @@ final class SoftInputWindow extends Dialog {
* using styles. This theme is applied on top of the current theme in
* <var>context</var>. If 0, the default dialog theme will be used.
*/
- SoftInputWindow(Context context, int theme, KeyEvent.DispatcherState dispatcherState) {
- super(context, theme);
+ SoftInputWindow(InputMethodService service, int theme,
+ KeyEvent.DispatcherState dispatcherState) {
+ super(service, theme);
+ mService = service;
mDispatcherState = dispatcherState;
}
@@ -261,6 +264,11 @@ final class SoftInputWindow extends Dialog {
}
}
+ @Override
+ public void onSystemBarAppearanceChanged(@WindowInsetsController.Appearance int appearance) {
+ mService.mNavigationBarController.onSystemBarAppearanceChanged(appearance);
+ }
+
void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
mBounds.dumpDebug(proto, BOUNDS);