diff options
| author | 2025-02-26 17:35:39 -0800 | |
|---|---|---|
| committer | 2025-03-04 17:51:45 -0800 | |
| commit | 6497645a78ada8328dfdab16810d61c3ae4383e6 (patch) | |
| tree | d431d67dabfb50379da167e0d078051b012d40c2 /libs/androidfw/StringPool.cpp | |
| parent | 48012db107f4ae85d6f9f54639adc4ef7c66c96b (diff) | |
[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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions