summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2019-01-28 10:10:22 -0800
committer Yohei Yukawa <yukawa@google.com> 2019-01-28 10:10:22 -0800
commit30026c854ce2f42bb88b03bc6ce2f3b6f8b24273 (patch)
treeb0ee59abf18c9f5c2318bd75c65bddb2e0323ea8
parent501ef0172527ece8d0cf0f9b813408d9fe1c4136 (diff)
Enable per-profile IME by default
With this CL, per-profile IME will be enabled by default. Note that on debuggable builds (Build.IS_DEBUGGABLE == true), developers can still disable per-profile IME mode as follows. adb root adb shell setprop persist.debug.per_profile_ime 0 adb reboot Note that multi-client IME [1] is a completely different story, because it was designed to be fully multi-user / multi-profile aware since its begging. Enabling multi-client mode means that per-profile mode is always enabled, because that's the only mode that MultiClientInputMethodManagerService supports. [1]: I41dfe854557b178d8af740bc2869c936fc88608b bae5bea23cfac3769569a230b56ad85cdd000675 Fix: 63907246 Fix: 111083076 Test: atest CtsAdminTestCases CtsDevicePolicyManagerTestCases Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases Test: Did multiple manual tests. * OTA scenario from older builds * Unlocking devices by typing password * App focus changes between personal apps and work apps * Direct-reply notifications from personal / work users * IME whitelist is only enforced to work IME settings Change-Id: I854ce92b2bf3aab49f14f6cde444acf2182b9ad0
-rw-r--r--core/java/android/view/inputmethod/InputMethodSystemProperty.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodSystemProperty.java b/core/java/android/view/inputmethod/InputMethodSystemProperty.java
index 57ed7f923e88..7c79d44e7d31 100644
--- a/core/java/android/view/inputmethod/InputMethodSystemProperty.java
+++ b/core/java/android/view/inputmethod/InputMethodSystemProperty.java
@@ -93,8 +93,14 @@ public class InputMethodSystemProperty {
* {@code true} when per-profile IME is enabled.
* @hide
*/
- public static final boolean PER_PROFILE_IME_ENABLED = MULTI_CLIENT_IME_ENABLED
- || Build.IS_DEBUGGABLE && SystemProperties.getBoolean(
- PROP_DEBUG_PER_PROFILE_IME, false);
-
+ public static final boolean PER_PROFILE_IME_ENABLED;
+ static {
+ if (MULTI_CLIENT_IME_ENABLED) {
+ PER_PROFILE_IME_ENABLED = true;
+ } else if (Build.IS_DEBUGGABLE) {
+ PER_PROFILE_IME_ENABLED = SystemProperties.getBoolean(PROP_DEBUG_PER_PROFILE_IME, true);
+ } else {
+ PER_PROFILE_IME_ENABLED = true;
+ }
+ }
}