fixup! Rewrite trust USB restriction handling
While using USB HAL v1.2 or earlier, one could call UsbManager's enableUsbDataSignal(true) and it will return back true due to the USB data status always being reported as DATA_STATUS_UNKNOWN. This ends up breaking the logic to fallback to UsbRestrictor, since it was previously assumed that enableUsbDataSignal() should always return false if on an unsupported HAL version. Instead, we should check the USB HAL version separately so that we can use enableUsbDataSignal() only if we're on a supported HAL version. If not, then we attempt to use UsbRestrictor instead. Change-Id: Iddb4685d8d640d7ce223bb0ec44b0e1d5abf610b
Loading
Please register or sign in to comment