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
Loading
Please register or sign in to comment