Improve permissions for display proxy methods
Addresses a number of issues with the two methods: - Checking for CREATE_VIRTUAL_DEVICE permission is redundant as the implementations validates that the caller owns the provided displayId in a VirtualDevice. Creating a VirtualDevice via VirtualDeviceManager is only possible if the caller holds CREATE_VIRTUAL_DEVICE. - AccessibilityManager#unregisterDisplayProxy did not verify that the caller owns the display, letting different VirtualDevice owners unregister each others A11yProxies. - Move the displayBelongsToCaller function to the AccessibilitySecurityPolicy as that seems like a better place for the function. Bug: 399840253 Test: atest AccessibilityManagerServiceTest Flag: EXEMPT refactor Change-Id: I6ac25bf0bee91a2b8da47a8eefe4797f6c1dd4fc
Loading
Please register or sign in to comment