Installer : Put unregisterReciever() inside try-catch

This commit is contained in:
Mr. Dragon
2019-03-22 18:30:47 +05:30
parent 301ad6e368
commit f1ece7fc19

View File

@@ -131,7 +131,7 @@ public class Installer {
});
}
public void uninstall(App app){
public void uninstall(App app) {
Uri uri = Uri.fromParts("package", app.getPackageName(), null);
Intent intent = new Intent();
intent.setData(uri);
@@ -173,7 +173,9 @@ public class Installer {
}
private void unregisterReceiver(SplitPackageInstallerAbstract mInstaller) {
if (mInstaller.getBroadcastReceiver() != null)
try {
context.unregisterReceiver(mInstaller.getBroadcastReceiver());
} catch (Exception ignored) {
}
}
}