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
부모 c8f804d0f6
커밋 3cb34aa4b0

파일 보기

@ -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);
}