prevent crash if push uninstall request is app not in any repo

This commit is contained in:
Hans-Christoph Steiner 2018-06-06 18:02:08 +02:00
parent c8f804d0f6
commit 3cb34aa4b0

View File

@ -487,7 +487,11 @@ public class RepoUpdater {
|| repoPushRequest.versionCode == packageInfo.versionCode) {
Apk apk = ApkProvider.Helper.findApkFromAnyRepo(context, repoPushRequest.packageName,
packageInfo.versionCode);
InstallerService.uninstall(context, apk);
if (apk == null) {
Log.i(TAG, "Push " + repoPushRequest.packageName + " request not found in any repo!");
} else {
InstallerService.uninstall(context, apk);
}
} else {
Utils.debugLog(TAG, "ignoring request based on versionCode:" + repoPushRequest);
}