[DO NOT MERGE] Make a11y overlays trusted.
Fix: 271488755 Test: atest accessibilityOverlayTest Change-Id: I1e273f22b0bae240027bfdb7e860e227096de00c
This commit is contained in:
@@ -2551,6 +2551,9 @@ abstract class AbstractAccessibilityServiceConnection extends IAccessibilityServ
|
|||||||
@Override
|
@Override
|
||||||
public void attachAccessibilityOverlayToWindow(int accessibilityWindowId, SurfaceControl sc)
|
public void attachAccessibilityOverlayToWindow(int accessibilityWindowId, SurfaceControl sc)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
|
SurfaceControl.Transaction t = new SurfaceControl.Transaction();
|
||||||
|
t.setTrustedOverlay(sc, true).apply();
|
||||||
|
t.close();
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
RemoteAccessibilityConnection connection =
|
RemoteAccessibilityConnection connection =
|
||||||
mA11yWindowManager.getConnectionLocked(
|
mA11yWindowManager.getConnectionLocked(
|
||||||
|
|||||||
@@ -5329,9 +5329,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
|
|||||||
mA11yOverlayLayers.remove(displayId);
|
mA11yOverlayLayers.remove(displayId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SurfaceControl.Transaction transaction = new SurfaceControl.Transaction();
|
SurfaceControl.Transaction t = new SurfaceControl.Transaction();
|
||||||
transaction.reparent(sc, parent);
|
t.reparent(sc, parent).setTrustedOverlay(sc, true).apply();
|
||||||
transaction.apply();
|
t.close();
|
||||||
transaction.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user