Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a12f640 authored by Anna Galusza's avatar Anna Galusza
Browse files

Fix bug where service disabled with disableSelf() would not reset soft keyboard

behavior.
Bug: 27947344

Change-Id: I19583cad14616416be3582c30653d244a27aa366
parent 9a99629e
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -1784,10 +1784,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
                    userState.mEnabledServices.contains(userState.mServiceChangingSoftKeyboardMode);
                    userState.mEnabledServices.contains(userState.mServiceChangingSoftKeyboardMode);


            if (!serviceChangingSoftKeyboardModeIsEnabled) {
            if (!serviceChangingSoftKeyboardModeIsEnabled) {
                final long identity = Binder.clearCallingIdentity();
                try {
                    Settings.Secure.putIntForUser(mContext.getContentResolver(),
                    Settings.Secure.putIntForUser(mContext.getContentResolver(),
                            Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE,
                            Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE,
                            0,
                            0,
                            userState.mUserId);
                            userState.mUserId);
                } finally {
                    Binder.restoreCallingIdentity(identity);
                }
                userState.mSoftKeyboardShowMode = 0;
                userState.mSoftKeyboardShowMode = 0;
                userState.mServiceChangingSoftKeyboardMode = null;
                userState.mServiceChangingSoftKeyboardMode = null;
            }
            }