summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/inputmethod/EditorInfo.java2
-rw-r--r--core/java/com/android/internal/statusbar/IStatusBar.aidl2
-rw-r--r--core/java/com/android/internal/statusbar/IStatusBarService.aidl2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java4
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java2
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodSystemProperty.java (renamed from core/java/android/view/inputmethod/InputMethodSystemProperty.java)17
-rw-r--r--services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java1
-rw-r--r--services/core/java/com/android/server/statusbar/StatusBarManagerService.java6
-rw-r--r--services/core/java/com/android/server/wm/ActivityTaskManagerService.java2
-rw-r--r--services/java/com/android/server/SystemServer.java2
12 files changed, 22 insertions, 34 deletions
diff --git a/core/java/android/view/inputmethod/EditorInfo.java b/core/java/android/view/inputmethod/EditorInfo.java
index e1a9898b6292..a26243c7cad5 100644
--- a/core/java/android/view/inputmethod/EditorInfo.java
+++ b/core/java/android/view/inputmethod/EditorInfo.java
@@ -480,7 +480,7 @@ public class EditorInfo implements InputType, Parcelable {
* matter what user ID the calling process has.
*
* <p>Note: This field will be silently ignored when
- * {@link android.view.inputmethod.InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED} is
+ * {@link com.android.server.inputmethod.InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED} is
* {@code true}.</p>
*
* <p>Note also that pseudo handles such as {@link UserHandle#ALL} are not supported.</p>
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index c715577cb7d2..cf0394d466ea 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -58,7 +58,7 @@ oneway interface IStatusBar
void topAppWindowChanged(int displayId, boolean menuVisible);
void setImeWindowStatus(int displayId, in IBinder token, int vis, int backDisposition,
- boolean showImeSwitcher);
+ boolean showImeSwitcher, boolean isMultiClientImeEnabled);
void setWindowState(int display, int window, int state);
void showRecentApps(boolean triggeredFromAltTab);
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 598c3917bf95..85ae18e86793 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -49,7 +49,7 @@ interface IStatusBarService
@UnsupportedAppUsage
void removeIcon(String slot);
void setImeWindowStatus(int displayId, in IBinder token, int vis, int backDisposition,
- boolean showImeSwitcher);
+ boolean showImeSwitcher, boolean isMultiClientImeEnabled);
void expandSettingsPanel(String subPanel);
// ---- Methods below are for use by the status bar policy services ----
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 6329af56077b..fa0fe136b8eb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -43,7 +43,6 @@ import android.os.Looper;
import android.os.Message;
import android.util.Pair;
import android.util.SparseArray;
-import android.view.inputmethod.InputMethodSystemProperty;
import androidx.annotation.VisibleForTesting;
@@ -481,7 +480,7 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
@Override
public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
- boolean showImeSwitcher) {
+ boolean showImeSwitcher, boolean isMultiClientImeEnabled) {
synchronized (mLock) {
mHandler.removeMessages(MSG_SHOW_IME_BUTTON);
SomeArgs args = SomeArgs.obtain();
@@ -489,6 +488,7 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
args.argi2 = vis;
args.argi3 = backDisposition;
args.argi4 = showImeSwitcher ? 1 : 0;
+ args.argi5 = isMultiClientImeEnabled ? 1 : 0;
args.arg1 = token;
Message m = mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, args);
m.sendToTarget();
@@ -801,11 +801,10 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
}
private void handleShowImeButton(int displayId, IBinder token, int vis, int backDisposition,
- boolean showImeSwitcher) {
+ boolean showImeSwitcher, boolean isMultiClientImeEnabled) {
if (displayId == INVALID_DISPLAY) return;
- if (!InputMethodSystemProperty.MULTI_CLIENT_IME_ENABLED
- && mLastUpdatedImeDisplayId != displayId
+ if (!isMultiClientImeEnabled && mLastUpdatedImeDisplayId != displayId
&& mLastUpdatedImeDisplayId != INVALID_DISPLAY) {
// Set previous NavBar's IME window status as invisible when IME
// window switched to another display for single-session IME case.
@@ -891,7 +890,8 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
args = (SomeArgs) msg.obj;
handleShowImeButton(args.argi1 /* displayId */, (IBinder) args.arg1 /* token */,
args.argi2 /* vis */, args.argi3 /* backDisposition */,
- args.argi4 != 0 /* showImeSwitcher */);
+ args.argi4 != 0 /* showImeSwitcher */,
+ args.argi5 != 0 /* isMultiClientImeEnabled */);
break;
case MSG_SHOW_RECENT_APPS:
for (int i = 0; i < mCallbacks.size(); i++) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java
index 84a7d4f0ff15..1e1f21568377 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/CommandQueueTest.java
@@ -129,7 +129,7 @@ public class CommandQueueTest extends SysuiTestCase {
@Test
public void testShowImeButton() {
- mCommandQueue.setImeWindowStatus(DEFAULT_DISPLAY, null, 1, 2, true);
+ mCommandQueue.setImeWindowStatus(DEFAULT_DISPLAY, null, 1, 2, true, false);
waitForIdleSync();
verify(mCallbacks).setImeWindowStatus(
eq(DEFAULT_DISPLAY), eq(null), eq(1), eq(2), eq(true));
@@ -137,7 +137,7 @@ public class CommandQueueTest extends SysuiTestCase {
@Test
public void testShowImeButtonForSecondaryDisplay() {
- mCommandQueue.setImeWindowStatus(SECONDARY_DISPLAY, null, 1, 2, true);
+ mCommandQueue.setImeWindowStatus(SECONDARY_DISPLAY, null, 1, 2, true, false);
waitForIdleSync();
verify(mCallbacks).setImeWindowStatus(
eq(SECONDARY_DISPLAY), eq(null), eq(1), eq(2), eq(true));
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java
index 3da9a4bdf759..db8af3975cc8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java
@@ -183,7 +183,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest {
// Set IME window status for default NavBar.
mCommandQueue.setImeWindowStatus(DEFAULT_DISPLAY, null, IME_VISIBLE,
- BACK_DISPOSITION_DEFAULT, true);
+ BACK_DISPOSITION_DEFAULT, true, false);
Handler.getMain().runWithScissors(() -> { }, 500);
// Verify IME window state will be updated in default NavBar & external NavBar state reset.
@@ -194,7 +194,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest {
// Set IME window status for external NavBar.
mCommandQueue.setImeWindowStatus(EXTERNAL_DISPLAY_ID, null,
- IME_VISIBLE, BACK_DISPOSITION_DEFAULT, true);
+ IME_VISIBLE, BACK_DISPOSITION_DEFAULT, true, false);
Handler.getMain().runWithScissors(() -> { }, 500);
// Verify IME window state will be updated in external NavBar & default NavBar state reset.
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 09e93759196f..f20003a2ee04 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -2551,7 +2551,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
final boolean needsToShowImeSwitcher = shouldShowImeSwitcherLocked(vis);
if (mStatusBar != null) {
mStatusBar.setImeWindowStatus(mCurTokenDisplayId, mCurToken, vis, backDisposition,
- needsToShowImeSwitcher);
+ needsToShowImeSwitcher, false /*isMultiClientImeEnabled*/);
}
final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
if (imi != null && needsToShowImeSwitcher) {
diff --git a/core/java/android/view/inputmethod/InputMethodSystemProperty.java b/services/core/java/com/android/server/inputmethod/InputMethodSystemProperty.java
index e20c2fdc8074..a6a68934accd 100644
--- a/core/java/android/view/inputmethod/InputMethodSystemProperty.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodSystemProperty.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.view.inputmethod;
+package com.android.server.inputmethod;
import android.annotation.Nullable;
import android.content.ComponentName;
@@ -23,8 +23,6 @@ import android.os.SystemProperties;
/**
* Various (pseudo) constants about IME behaviors.
- *
- * @hide
*/
public class InputMethodSystemProperty {
/**
@@ -58,23 +56,12 @@ public class InputMethodSystemProperty {
/**
* {@link ComponentName} of multi-client IME to be used.
- *
- * <p>TODO: Move this back to MultiClientInputMethodManagerService once
- * {@link #PER_PROFILE_IME_ENABLED} always becomes {@code true}.</p>
- *
- * @hide
*/
@Nullable
- public static final ComponentName sMultiClientImeComponentName =
- getMultiClientImeComponentName();
+ static final ComponentName sMultiClientImeComponentName = getMultiClientImeComponentName();
/**
* {@code true} when multi-client IME is enabled.
- *
- * <p>TODO: Move this back to MultiClientInputMethodManagerService once
- * {@link #PER_PROFILE_IME_ENABLED} always becomes {@code true}.</p>
- *
- * @hide
*/
public static final boolean MULTI_CLIENT_IME_ENABLED = (sMultiClientImeComponentName != null);
}
diff --git a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
index 3dd730471dca..02e29e0b2ab5 100644
--- a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
@@ -67,7 +67,6 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnectionInspector.MissingMethodFlags;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype;
-import android.view.inputmethod.InputMethodSystemProperty;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index 828f79007b95..d67048fe548d 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -841,7 +841,8 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D
@Override
public void setImeWindowStatus(int displayId, final IBinder token, final int vis,
- final int backDisposition, final boolean showImeSwitcher) {
+ final int backDisposition, final boolean showImeSwitcher,
+ boolean isMultiClientImeEnabled) {
enforceStatusBar();
if (SPEW) {
@@ -858,7 +859,8 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D
if (mBar == null) return;
try {
mBar.setImeWindowStatus(
- displayId, token, vis, backDisposition, showImeSwitcher);
+ displayId, token, vis, backDisposition, showImeSwitcher,
+ isMultiClientImeEnabled);
} catch (RemoteException ex) { }
});
}
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index f231af9913f8..20ccfa81a6ac 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -225,7 +225,6 @@ import android.view.IRecentsAnimationRunner;
import android.view.RemoteAnimationAdapter;
import android.view.RemoteAnimationDefinition;
import android.view.WindowManager;
-import android.view.inputmethod.InputMethodSystemProperty;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
@@ -262,6 +261,7 @@ import com.android.server.am.PendingIntentRecord;
import com.android.server.am.UserState;
import com.android.server.appop.AppOpsService;
import com.android.server.firewall.IntentFirewall;
+import com.android.server.inputmethod.InputMethodSystemProperty;
import com.android.server.pm.UserManagerService;
import com.android.server.policy.PermissionPolicyInternal;
import com.android.server.uri.UriGrantsManagerInternal;
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 16007d775283..6e0d83433559 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -67,7 +67,6 @@ import android.util.EventLog;
import android.util.Slog;
import android.view.WindowManager;
import android.view.contentcapture.ContentCaptureManager;
-import android.view.inputmethod.InputMethodSystemProperty;
import com.android.internal.R;
import com.android.internal.logging.MetricsLogger;
@@ -101,6 +100,7 @@ import com.android.server.hdmi.HdmiControlService;
import com.android.server.incident.IncidentCompanionService;
import com.android.server.input.InputManagerService;
import com.android.server.inputmethod.InputMethodManagerService;
+import com.android.server.inputmethod.InputMethodSystemProperty;
import com.android.server.inputmethod.MultiClientInputMethodManagerService;
import com.android.server.lights.LightsService;
import com.android.server.media.MediaResourceMonitorService;