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

Commit f6e00a2f authored by Daniel Hsieh's avatar Daniel Hsieh Committed by Android (Google) Code Review
Browse files

Merge "Dump magnification tracking typing focus info for dumpsys accessibility"

parents df2f9b70 611b80cf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -516,6 +516,8 @@ class AccessibilityUserState {
                .append(String.valueOf(mMagnificationCapabilities));
        pw.append(", audioDescriptionByDefaultEnabled=")
                .append(String.valueOf(mIsAudioDescriptionByDefaultRequested));
        pw.append(", magnificationFollowTypingEnabled=")
                .append(String.valueOf(mMagnificationFollowTypingEnabled));
        pw.append("}");
        pw.println();
        pw.append("     shortcut key:{");
+4 −0
Original line number Diff line number Diff line
@@ -769,6 +769,10 @@ public class FullScreenMagnificationController implements
        mMagnificationFollowTypingEnabled = enabled;
    }

    boolean isMagnificationFollowTypingEnabled() {
        return mMagnificationFollowTypingEnabled;
    }

    /**
     * Remove the display magnification with given id.
     *
+17 −1
Original line number Diff line number Diff line
@@ -365,13 +365,18 @@ public class MagnificationProcessor {
        mController.getFullScreenMagnificationController().unregister(displayId);
    }

    /** Dumps {@link MagnificationConfig} and magnification region of magnifiers on the displays. */
    /**
     * Dumps magnification configuration {@link MagnificationConfig} and state for each
     * {@link Display}
     */
    public void dump(final PrintWriter pw, ArrayList<Display> displaysList) {
        for (int i = 0; i < displaysList.size(); i++) {
            final int displayId = displaysList.get(i).getDisplayId();

            final MagnificationConfig config = getMagnificationConfig(displayId);
            pw.println("Magnifier on display#" + displayId);
            pw.append("    " + config).println();

            final Region region = new Region();
            getCurrentMagnificationRegion(displayId, region, true);
            if (!region.isEmpty()) {
@@ -379,6 +384,8 @@ public class MagnificationProcessor {
            }
            pw.append("    IdOfLastServiceToMagnify="
                    + getIdOfLastServiceToMagnify(config.getMode(), displayId)).println();

            dumpTrackingTypingFocusEnabledState(pw, displayId, config.getMode());
        }
    }

@@ -389,4 +396,13 @@ public class MagnificationProcessor {
                : mController.getWindowMagnificationMgr().getIdOfLastServiceToMagnify(
                        displayId);
    }

    private void dumpTrackingTypingFocusEnabledState(final PrintWriter pw, int displayId,
            int mode) {
        if (mode == MAGNIFICATION_MODE_WINDOW) {
            pw.append("    TrackingTypingFocusEnabled="  + mController
                            .getWindowMagnificationMgr().isTrackingTypingFocusEnabled(displayId))
                    .println();
        }
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -318,6 +318,10 @@ public class WindowMagnificationManager implements
        mMagnificationFollowTypingEnabled = enabled;
    }

    boolean isMagnificationFollowTypingEnabled() {
        return mMagnificationFollowTypingEnabled;
    }

    /**
     * Get the ID of the last service that changed the magnification config.
     *