diff options
| author | 2022-07-01 21:34:04 +0000 | |
|---|---|---|
| committer | 2022-08-23 15:36:35 +0000 | |
| commit | 9d77288dcd6bc4beb0718b852ab183e9e553e826 (patch) | |
| tree | 2ffaac77904ac57048fab4df2a2348a69a134db9 /libs/androidfw/ResourceUtils.cpp | |
| parent | 28930b91d8328f5d4a47ce0f856f9abc1730b4d6 (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: 243457763
Test: Run CHQTS and verify it now passes on a device previously seeing
null package names
Merged-In: Ia706a503f9ca068fc997c0acdcd74ca62a1424be
Change-Id: Ia706a503f9ca068fc997c0acdcd74ca62a1424be
(cherry picked from commit 2b69e2cf52177eb6300496bbb03731bc434a14a9)
Diffstat (limited to 'libs/androidfw/ResourceUtils.cpp')
0 files changed, 0 insertions, 0 deletions