diff options
| author | 2022-07-01 21:34:04 +0000 | |
|---|---|---|
| committer | 2022-07-01 21:34:04 +0000 | |
| commit | 2b69e2cf52177eb6300496bbb03731bc434a14a9 (patch) | |
| tree | 5dc4d79fd640abc42f7f74d621748076df1b1545 /libs/androidfw/StringPool.cpp | |
| parent | 79b80c34cfe34d0d3b5def59b7da994b03c035a6 (diff) | |
Fix potential null package name
If a client doesn't pass a context, ActivityThread.currentPackageName()
may return null if the client is part of the Android framework. To
ensure logic doesn't break due to a null package name, use
PackageManager.getPackagesForUid() to get a valid package name for the
caller.
Bug: 237725362
Test: Run CHQTS and verify it now passes on a device previously seeing
null package names
Change-Id: Ia706a503f9ca068fc997c0acdcd74ca62a1424be
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions