OSDN Git Service

Control magnification only with the setting.
authorPhil Weaver <pweaver@google.com>
Fri, 26 Feb 2016 17:47:12 +0000 (09:47 -0800)
committerPhil Weaver <pweaver@google.com>
Fri, 26 Feb 2016 19:34:35 +0000 (11:34 -0800)
Don't turn off magnification if gestures are enabled.

Bug: 26571116
Change-Id: I8dafcd4eef50bfa8f9474bf98637f8e54f3527e1

services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java

index 4be6833..0b1e138 100644 (file)
@@ -1748,14 +1748,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
     private void updateMagnificationLocked(UserState userState) {
         final int userId = userState.mUserId;
         if (userId == mCurrentUserId && mMagnificationController != null) {
-            if (userHasMagnificationServicesLocked(userState)) {
+            if (userState.mIsDisplayMagnificationEnabled ||
+                    userHasMagnificationServicesLocked(userState)) {
                 mMagnificationController.setUserId(userState.mUserId);
             } else {
                 // If the user no longer has any magnification-controlling
                 // services and is not using magnification gestures, then
                 // reset the state to normal.
-                if (!userState.mIsDisplayMagnificationEnabled
-                        && mMagnificationController.resetIfNeeded(true)) {
+                if (mMagnificationController.resetIfNeeded(true)) {
                     // Animations are still running, so wait until we receive a
                     // callback verifying that we've reset magnification.
                     mUnregisterMagnificationOnReset = true;