Skip to content
Commit e9f4b5af authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

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
parent 82150f3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment