[core] Get pm binder everytime checking its status (#1010)

This commit is contained in:
LoveSy 2021-08-26 03:17:35 +08:00 committed by GitHub
parent 2c0de99a36
commit 48c642e778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,8 @@ public class PackageService {
private static IBinder binder = null;
static boolean isAlive() {
return binder != null && binder.isBinderAlive();
var pm = getPackageManager();
return pm != null && pm.asBinder().isBinderAlive();
}
private static final IBinder.DeathRecipient recipient = new IBinder.DeathRecipient() {