summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Yeabkal Wubshit <yeabkal@google.com> 2024-07-12 10:38:57 -0700
committer Yeabkal Wubshit <yeabkal@google.com> 2024-07-12 10:44:08 -0700
commit7b806deb6594be6a72ed94c024058ec51b364795 (patch)
treeb5bf7dfa5a606d2d996b224d9c6c0f76e74de0e6 /api/api.go
parent66cb05e90d5ac8b7c72acd51db8cfd02d2513c58 (diff)
Fix checkNotNull error for missing Vpn service in Wear
The VpnManagerService does not work today on Wear devices, so we stopped starting it in ag/28141663. However, the VpnManager has a checkNotNull assertion when it tries to access the service. That means, all Wear callers of Context.getSystemService for VpnManager will experience a crash since the service is null on Wear. To fix this, we skip the checkNotNull check on Wear devices by throwing a ServiceNotFound exception from SystemServiceRegistry. That way, the registry also knows that the service is not available on the watch device and avoid retrying the fetch for the service. Flag: android.server.allow_removing_vpn_service Test: fetching VpnManager on watch returns null with no crash Bug: 352607724 Bug: 352607425 Bug: 352614765 Bug: 340928692 Change-Id: I5e554cb082ab4f687ae6755c9ee52fc8372e9bd8
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions