Make settings a little aware of multi-user install.
Change-Id: Id04f137dbc80dfee7b6c436efc2225ceccb88faa
This commit is contained in:
@@ -322,6 +322,9 @@ public class InstalledAppDetails extends Fragment
|
||||
Log.w(TAG, "Unable to get package info", e);
|
||||
}
|
||||
}
|
||||
} else if ((mPackageInfo.applicationInfo.flags
|
||||
& ApplicationInfo.FLAG_INSTALLED) == 0) {
|
||||
mUninstallButton.setText(R.string.install_text);
|
||||
} else {
|
||||
mUninstallButton.setText(R.string.uninstall_text);
|
||||
}
|
||||
@@ -1042,6 +1045,12 @@ public class InstalledAppDetails extends Fragment
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DEFAULT)
|
||||
.execute((Object)null);
|
||||
}
|
||||
} else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_INSTALLED) == 0) {
|
||||
try {
|
||||
mPm.installExistingPackage(packageName);
|
||||
refreshUi();
|
||||
} catch (NameNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
uninstallPkg(packageName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user