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

Commit 0608497d authored by George Chan's avatar George Chan
Browse files

Updated UsbDataProtectionHook to account for feature disablement without...

Updated UsbDataProtectionHook to account for feature disablement without immediate reboot as well as adding fallback default for canSetUsbDataSignal.

Since the feature is init during boot time. Querying APM immediately after disabling the feature before next reboot would cause feature to query the disabled feature anyways. So we need return false when that occurs.

Also there can be APM availability queries by callers that do not have sufficient permission. So instead, we are now caching the value on boot time so no further MANAGE_USB permission is require for future queries.

Test: atest
Bug: 395965739
Flag: android.security.aapm_feature_usb_data_protection
Change-Id: I2f7ec08fb2349d32f185c43efacc8983fbb309f2
parent c1e8d636
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment