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

Commit 037a7fb0 authored by Sally Yuen's avatar Sally Yuen Committed by Android (Google) Code Review
Browse files

Merge "Clear caches when an A11yDisplayProxy is registered."

parents 4815d345 f3f01c73
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1760,6 +1760,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
            AccessibilityServiceConnection service = state.mBoundServices.get(i);
            service.notifyClearAccessibilityNodeInfoCache();
        }

        mProxyManager.clearCacheLocked();
    }

    private void notifyMagnificationChangedLocked(int displayId, @NonNull Region region,
@@ -3714,6 +3716,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
        mProxyManager.registerProxy(client, displayId, mContext,
                sIdCounter++, mMainHandler, mSecurityPolicy, this, getTraceManager(),
                mWindowManagerService, mA11yWindowManager);

        synchronized (mLock) {
            notifyClearAccessibilityCacheLocked();
        }
        return true;
    }

+11 −0
Original line number Diff line number Diff line
@@ -235,4 +235,15 @@ public class ProxyManager {
            }
        }
    }

    /**
     * Clears all proxy caches.
     */
    public void clearCacheLocked() {
        for (int i = 0; i < mProxyA11yServiceConnections.size(); i++) {
            final ProxyAccessibilityServiceConnection proxy =
                    mProxyA11yServiceConnections.valueAt(i);
            proxy.notifyClearAccessibilityNodeInfoCache();
        }
    }
}
 No newline at end of file