Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +9 −16 Original line number Diff line number Diff line Loading @@ -126,7 +126,6 @@ import android.util.SparseArray; import android.util.SparseBooleanArray; import android.util.proto.ProtoOutputStream; import android.view.DisplayInfo; import android.view.IWindowManager; import android.view.InputChannel; import android.view.InputDevice; import android.view.MotionEvent; Loading Loading @@ -289,7 +288,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub private final Handler mHandler; final InputMethodSettings mSettings; final SettingsObserver mSettingsObserver; final IWindowManager mIWindowManager; private final SparseBooleanArray mLoggedDeniedGetInputMethodWindowVisibleHeightForUid = new SparseBooleanArray(0); final WindowManagerInternal mWindowManagerInternal; Loading Loading @@ -1715,8 +1713,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub mHandler = Handler.createAsync(thread.getLooper(), this); // Note: SettingsObserver doesn't register observers in its constructor. mSettingsObserver = new SettingsObserver(mHandler); mIWindowManager = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); Loading Loading @@ -3160,10 +3156,9 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub mImeSwitcherNotification.setContentTitle(title) .setContentText(summary) .setContentIntent(mImeSwitchPendingIntent); try { // TODO(b/120076400): Figure out what is the best behavior if ((mNotificationManager != null) && !mIWindowManager.hasNavigationBar(DEFAULT_DISPLAY)) { && !mWindowManagerInternal.hasNavigationBar(DEFAULT_DISPLAY)) { if (DEBUG) { Slog.d(TAG, "--- show notification: label = " + summary); } Loading @@ -3172,8 +3167,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub mImeSwitcherNotification.build(), UserHandle.ALL); mNotificationShown = true; } } catch (RemoteException e) { } } else { if (mNotificationShown && mNotificationManager != null) { if (DEBUG) { Loading services/core/java/com/android/server/wm/WindowManagerInternal.java +9 −0 Original line number Diff line number Diff line Loading @@ -602,6 +602,15 @@ public abstract class WindowManagerInternal { public abstract void updateInputMethodTargetWindow(@NonNull IBinder imeToken, @NonNull IBinder imeTargetWindowToken); /** * Returns the presence of a software navigation bar on the specified display. * * @param displayId the id of display to check if there is a software navigation bar. * @return {@code true} if there is a software navigation. {@code false} otherwise, including * the case when the specified display does not exist. */ public abstract boolean hasNavigationBar(int displayId); /** * Returns true when the hardware keyboard is available. */ Loading services/core/java/com/android/server/wm/WindowManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -7910,6 +7910,11 @@ public class WindowManagerService extends IWindowManager.Stub } } @Override public boolean hasNavigationBar(int displayId) { return WindowManagerService.this.hasNavigationBar(displayId); } @Override public boolean isHardKeyboardAvailable() { synchronized (mGlobalLock) { Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +9 −16 Original line number Diff line number Diff line Loading @@ -126,7 +126,6 @@ import android.util.SparseArray; import android.util.SparseBooleanArray; import android.util.proto.ProtoOutputStream; import android.view.DisplayInfo; import android.view.IWindowManager; import android.view.InputChannel; import android.view.InputDevice; import android.view.MotionEvent; Loading Loading @@ -289,7 +288,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub private final Handler mHandler; final InputMethodSettings mSettings; final SettingsObserver mSettingsObserver; final IWindowManager mIWindowManager; private final SparseBooleanArray mLoggedDeniedGetInputMethodWindowVisibleHeightForUid = new SparseBooleanArray(0); final WindowManagerInternal mWindowManagerInternal; Loading Loading @@ -1715,8 +1713,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub mHandler = Handler.createAsync(thread.getLooper(), this); // Note: SettingsObserver doesn't register observers in its constructor. mSettingsObserver = new SettingsObserver(mHandler); mIWindowManager = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); Loading Loading @@ -3160,10 +3156,9 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub mImeSwitcherNotification.setContentTitle(title) .setContentText(summary) .setContentIntent(mImeSwitchPendingIntent); try { // TODO(b/120076400): Figure out what is the best behavior if ((mNotificationManager != null) && !mIWindowManager.hasNavigationBar(DEFAULT_DISPLAY)) { && !mWindowManagerInternal.hasNavigationBar(DEFAULT_DISPLAY)) { if (DEBUG) { Slog.d(TAG, "--- show notification: label = " + summary); } Loading @@ -3172,8 +3167,6 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub mImeSwitcherNotification.build(), UserHandle.ALL); mNotificationShown = true; } } catch (RemoteException e) { } } else { if (mNotificationShown && mNotificationManager != null) { if (DEBUG) { Loading
services/core/java/com/android/server/wm/WindowManagerInternal.java +9 −0 Original line number Diff line number Diff line Loading @@ -602,6 +602,15 @@ public abstract class WindowManagerInternal { public abstract void updateInputMethodTargetWindow(@NonNull IBinder imeToken, @NonNull IBinder imeTargetWindowToken); /** * Returns the presence of a software navigation bar on the specified display. * * @param displayId the id of display to check if there is a software navigation bar. * @return {@code true} if there is a software navigation. {@code false} otherwise, including * the case when the specified display does not exist. */ public abstract boolean hasNavigationBar(int displayId); /** * Returns true when the hardware keyboard is available. */ Loading
services/core/java/com/android/server/wm/WindowManagerService.java +5 −0 Original line number Diff line number Diff line Loading @@ -7910,6 +7910,11 @@ public class WindowManagerService extends IWindowManager.Stub } } @Override public boolean hasNavigationBar(int displayId) { return WindowManagerService.this.hasNavigationBar(displayId); } @Override public boolean isHardKeyboardAvailable() { synchronized (mGlobalLock) { Loading