Loading services/core/java/com/android/server/wm/AccessibilityController.java +34 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,18 @@ final class AccessibilityController { // Not relevant for the window observer. } void onWMTransition(int displayId, @WindowManager.TransitionType int type) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK)) { mAccessibilityTracing.logTrace(TAG + ".onAppWindowTransition", FLAGS_MAGNIFICATION_CALLBACK, "displayId=" + displayId + "; type=" + type); } final DisplayMagnifier displayMagnifier = mDisplayMagnifiers.get(displayId); if (displayMagnifier != null) { displayMagnifier.onWMTransition(displayId, type); } // Not relevant for the window observer. } void onWindowTransition(WindowState windowState, int transition) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK | FLAGS_WINDOWS_FOR_ACCESSIBILITY_CALLBACK)) { Loading Loading @@ -708,6 +720,28 @@ final class AccessibilityController { } } void onWMTransition(int displayId, @WindowManager.TransitionType int type) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK)) { mAccessibilityTracing.logTrace(LOG_TAG + ".onWMTransition", FLAGS_MAGNIFICATION_CALLBACK, "displayId=" + displayId + "; type=" + type); } if (DEBUG_WINDOW_TRANSITIONS) { Slog.i(LOG_TAG, "Window transition: " + WindowManager.transitTypeToString(type) + " displayId: " + displayId); } final boolean magnifying = mMagnifedViewport.isMagnifying(); if (magnifying) { // All opening/closing situations. switch (type) { case WindowManager.TRANSIT_OPEN: case WindowManager.TRANSIT_TO_FRONT: case WindowManager.TRANSIT_CLOSE: case WindowManager.TRANSIT_TO_BACK: mHandler.sendEmptyMessage(MyHandler.MESSAGE_NOTIFY_USER_CONTEXT_CHANGED); } } } void onWindowTransition(WindowState windowState, int transition) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK)) { mAccessibilityTracing.logTrace(LOG_TAG + ".onWindowTransition", Loading services/core/java/com/android/server/wm/Transition.java +5 −0 Original line number Diff line number Diff line Loading @@ -1136,6 +1136,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // client, we should finish and apply it here so the transactions aren't lost. postCleanupOnFailure(); } final AccessibilityController accessibilityController = dc.mWmService.mAccessibilityController; if (accessibilityController.hasCallbacks()) { accessibilityController.onWMTransition(dc.getDisplayId(), mType); } } else { // No player registered or it's not enabled, so just finish/apply immediately if (!mIsPlayerEnabled) { Loading Loading
services/core/java/com/android/server/wm/AccessibilityController.java +34 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,18 @@ final class AccessibilityController { // Not relevant for the window observer. } void onWMTransition(int displayId, @WindowManager.TransitionType int type) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK)) { mAccessibilityTracing.logTrace(TAG + ".onAppWindowTransition", FLAGS_MAGNIFICATION_CALLBACK, "displayId=" + displayId + "; type=" + type); } final DisplayMagnifier displayMagnifier = mDisplayMagnifiers.get(displayId); if (displayMagnifier != null) { displayMagnifier.onWMTransition(displayId, type); } // Not relevant for the window observer. } void onWindowTransition(WindowState windowState, int transition) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK | FLAGS_WINDOWS_FOR_ACCESSIBILITY_CALLBACK)) { Loading Loading @@ -708,6 +720,28 @@ final class AccessibilityController { } } void onWMTransition(int displayId, @WindowManager.TransitionType int type) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK)) { mAccessibilityTracing.logTrace(LOG_TAG + ".onWMTransition", FLAGS_MAGNIFICATION_CALLBACK, "displayId=" + displayId + "; type=" + type); } if (DEBUG_WINDOW_TRANSITIONS) { Slog.i(LOG_TAG, "Window transition: " + WindowManager.transitTypeToString(type) + " displayId: " + displayId); } final boolean magnifying = mMagnifedViewport.isMagnifying(); if (magnifying) { // All opening/closing situations. switch (type) { case WindowManager.TRANSIT_OPEN: case WindowManager.TRANSIT_TO_FRONT: case WindowManager.TRANSIT_CLOSE: case WindowManager.TRANSIT_TO_BACK: mHandler.sendEmptyMessage(MyHandler.MESSAGE_NOTIFY_USER_CONTEXT_CHANGED); } } } void onWindowTransition(WindowState windowState, int transition) { if (mAccessibilityTracing.isTracingEnabled(FLAGS_MAGNIFICATION_CALLBACK)) { mAccessibilityTracing.logTrace(LOG_TAG + ".onWindowTransition", Loading
services/core/java/com/android/server/wm/Transition.java +5 −0 Original line number Diff line number Diff line Loading @@ -1136,6 +1136,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // client, we should finish and apply it here so the transactions aren't lost. postCleanupOnFailure(); } final AccessibilityController accessibilityController = dc.mWmService.mAccessibilityController; if (accessibilityController.hasCallbacks()) { accessibilityController.onWMTransition(dc.getDisplayId(), mType); } } else { // No player registered or it's not enabled, so just finish/apply immediately if (!mIsPlayerEnabled) { Loading