Throw an exception when trying to install unverified downloads
Don't silently ignore the request. This will allow to display some useful message to the user.
This commit is contained in:
@@ -126,6 +126,8 @@ public class Utils {
|
||||
public static void triggerUpdate(Context context, UpdateDownload update) throws IOException {
|
||||
if (update.getStatus() == UpdateStatus.VERIFIED) {
|
||||
android.os.RecoverySystem.installPackage(context, update.getFile());
|
||||
} else {
|
||||
throw new IllegalStateException("Update must be verified");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user