diff options
author | Philip P. Moltmann <moltmann@google.com> | 2019-06-20 14:51:52 -0700 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2019-06-20 16:32:53 -0700 |
commit | e9f4b5af7d0dbf1d76993b23a94365d3ec0554b8 (patch) | |
tree | cdcb82a6015a862eabd1030df55d639627432c8b /startop/scripts/lib/cmd_utils.py | |
parent | 82150f3f7bff0e80b3a3705aee2f37cde9a5e146 (diff) |
Prevent loop in PermissionPolicyService
The AppOpsModeChangeWatchers call back even if the mode was set to
already set mode. PermissionPolicyService listens to the same app-ops it
changes. I.e. it used to change the mode to default, which then causes a
call-back which made set it to default again, etc...
This exhausts a thread until the app-op is finally set to non-default.
The fix is to prevent the loop by checking if the app-op is already the
correct mode before setting it.
Fixes: 135674928
Test: atest IncidentReportListenerTest CollectorHostsideLibTest on
cuttlefish and crosshatch
Change-Id: Ic65945e814957ac59495b3da221fabb0f3d42b66
Diffstat (limited to 'startop/scripts/lib/cmd_utils.py')
0 files changed, 0 insertions, 0 deletions