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

Commit bb71b4d1 authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am 91488eed: Merge changes Ie674e8b2,I0b9448c8

# Via Android (Google) Code Review (1) and Svetoslav (1)
* commit '91488eed':
  AccessibilityNodeINfo cache not cleared when accessibility is disabled.
  Display magnifier does not release its surface on destroy.
parents 98401986 91488eed
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -615,6 +615,7 @@ public abstract class AccessibilityService extends Service {
                        mCallback.onServiceConnected();
                    } else {
                        AccessibilityInteractionClient.getInstance().removeConnection(connectionId);
                        AccessibilityInteractionClient.getInstance().clearCache();
                        mCallback.onSetConnectionId(AccessibilityInteractionClient.NO_ID);
                    }
                    return;
+13 −1
Original line number Diff line number Diff line
@@ -228,6 +228,10 @@ final class DisplayMagnifier {
        return spec;
    }

    public void destroyLocked() {
        mMagnifedViewport.destroyWindow();
    }

    /** NOTE: This has to be called within a surface transaction. */
    public void drawMagnifiedRegionBorderIfNeededLocked() {
        mMagnifedViewport.drawWindowIfNeededLocked();
@@ -258,7 +262,7 @@ final class DisplayMagnifier {
        private final int mBorderWidth;
        private final int mHalfBorderWidth;

        private ViewportWindow mWindow;
        private final ViewportWindow mWindow;

        private boolean mFullRedrawNeeded;

@@ -459,6 +463,10 @@ final class DisplayMagnifier {
            mWindow.drawIfNeeded();
        }

        public void destroyWindow() {
            mWindow.releaseSurface();
        }

        private final class ViewportWindow {
            private static final String SURFACE_TITLE = "Magnification Overlay";

@@ -640,6 +648,10 @@ final class DisplayMagnifier {
                    }
                }
            }

            public void releaseSurface() {
                mSurface.release();
            }
        }
    }

+4 −1
Original line number Diff line number Diff line
@@ -3039,7 +3039,10 @@ public class WindowManagerService extends IWindowManager.Stub
                mDisplayMagnifier = new DisplayMagnifier(this, callbacks);
            } else {
                if (callbacks == null) {
                    if (mDisplayMagnifier != null) {
                        mDisplayMagnifier.destroyLocked();
                        mDisplayMagnifier = null;
                    }
                } else {
                    throw new IllegalStateException("Magnification callbacks already set!");
                }