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

Skip to content
Commit 6497645a authored by Atneya Nair's avatar Atneya Nair
Browse files

[appops] Fix opChanged null String

The AIDL interface is not nullable, so we should not pass null strings
here. We do pass a null package when the op change involves a
restriction which is not associated with a package.

Substitute empty string instead which emulates the old manual parceling
handling on the native side. Assert on persistentDeviceId since that
should not be null.

Also do some callsite cleanup: this callback fired with a combo of a
negative UID and null when appops change due to restrictions. Most users
don't handle this case, since there is limited usage of restrictions.
Ideally, the behavior on restrictions would be a flag, but for now, for
the callers which don't care about the appop changing due to a
restriction state, simply drop events with a negative UID (the null
package check was doing this for some callsites previously).

Test: manual audioserver callback handling in response to sensor toggle
Flag: EXEMPT bugfix
Fixes: 397859987
Bug: 322692565
Change-Id: I14d337b695374d257fbdc638b8daa7799f72d53a
parent 48012db1
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