OSDN Git Service

Disable optimize startInput in IMMS
authorTarandeep Singh <tarandeep@google.com>
Fri, 30 Mar 2018 00:04:44 +0000 (17:04 -0700)
committerTarandeep Singh <tarandeep@google.com>
Fri, 30 Mar 2018 13:12:32 +0000 (13:12 +0000)
Disable optimize start input for P since there are few corner cases that
are not been fully adressed. One solution could be to call finishInput() on every
window focusing-out in bug 9216494

Change-Id: I4deb0a5e5e2ba951ec551e399636736dc0208154
Fixes: 76078731
Bug: 37617707
Test: atest CtsInputMethodTestCases

services/core/java/com/android/server/InputMethodManagerService.java

index f6ff359..40f9476 100644 (file)
@@ -266,9 +266,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
         @GuardedBy("LOCK")
         private boolean mValue;
 
-        public DebugFlag(String key) {
+        public DebugFlag(String key, boolean defaultValue) {
             mKey = key;
-            refresh();
+            mValue = SystemProperties.getBoolean(key, defaultValue);
         }
 
         void refresh() {
@@ -290,7 +290,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
      */
     private static final class DebugFlags {
         static final DebugFlag FLAG_OPTIMIZE_START_INPUT =
-                new DebugFlag("debug.optimize_startinput");
+                new DebugFlag("debug.optimize_startinput", false);
     }