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

Commit c3f20ed7 authored by Hai Zhang's avatar Hai Zhang
Browse files

Fix deadlock in app op listeners.

The onStateMutated() callback is called while holding our state lock,
and the listener implementation are supposed to schedule callbacks to
another thread, without grabbing any external lock.

However, the current AppOpsService listener implementation has to
either grab the AppOpsService.this lock for reading listeners (which
may be fixed by creating a granular lock), or call into package
manager for package UID.

We are already posting notifyOpChangedForAllPkgsInUid() for UID state
changes, so it should be fine to post here as well.

Also added dumping package name in new dumpsys, and dropped unknown
permission when reading from disk.

Fixes: 281919202
Test: presubmit
Change-Id: If5f1f31dfe35dad12c6f1c03108dfad827906279
parent bf667ec1
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