Skip to content
Commit 2b69e2cf authored by Anthony Stange's avatar Anthony Stange
Browse files

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
parent 79b80c34
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment