Make settings a little aware of multi-user install.
Change-Id: Id04f137dbc80dfee7b6c436efc2225ceccb88faa
This commit is contained in:
@@ -2426,6 +2426,8 @@
|
||||
<string name="external_data_size_label" product="default">SD card</string>
|
||||
<!-- Manage applications, individual application info screen, button label under Storage heading. Button to remove the application from the system. -->
|
||||
<string name="uninstall_text">Uninstall</string>
|
||||
<!-- [CHAR LIMIT=NONE] Manage applications, individual application info screen, button label under Storage heading. Button to install an application for the user. -->
|
||||
<string name="install_text">Install</string>
|
||||
<!-- [CHAR LIMIT=25] Manage applications, individual application info screen, button label under Storage heading. Button to disable an existing application. -->
|
||||
<string name="disable_text">Disable</string>
|
||||
<!-- [CHAR LIMIT=25] Manage applications, individual application info screen, button label under Storage heading. Button to re-enable an existing application. -->
|
||||
|
@@ -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