SystemInstaller: don't try to remove system apps without updates
This commit is contained in:
parent
8d5c7abe89
commit
ba54e8b798
@ -193,7 +193,16 @@ public class SystemInstaller extends Installer {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean isSystem = ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0);
|
||||
final boolean isUpdate = ((appInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0);
|
||||
|
||||
if (isSystem && !isUpdate) {
|
||||
// Cannot remove system apps unless we're uninstalling updates
|
||||
mCallback.onError(InstallerCallback.OPERATION_DELETE,
|
||||
InstallerCallback.ERROR_CODE_OTHER);
|
||||
return;
|
||||
}
|
||||
|
||||
int messageId;
|
||||
if (isUpdate) {
|
||||
messageId = R.string.uninstall_update_confirm;
|
||||
|
Loading…
x
Reference in New Issue
Block a user