summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Kennedy <toddke@google.com>2018-05-03 09:44:55 +0100
committerKevin F. Haggerty <haggertk@lineageos.org>2018-08-07 19:36:33 -0600
commit2fc57e23bc18935bbfa443cc3bfe30d2cfc55b4e (patch)
tree26a3b57d7ca98c5df677d7796ad04a2d4dfb70ba
parent960768e3624c4fa88386ceab828dddb1fff88398 (diff)
downloadandroid_packages_apps_PackageInstaller-2fc57e23bc18935bbfa443cc3bfe30d2cfc55b4e.tar.gz
android_packages_apps_PackageInstaller-2fc57e23bc18935bbfa443cc3bfe30d2cfc55b4e.tar.bz2
android_packages_apps_PackageInstaller-2fc57e23bc18935bbfa443cc3bfe30d2cfc55b4e.zip
RESTRICT AUTOMERGE: Always use safe labels
For display purposes, we should always be using safe labels. This prevents excessively long labels from preventing app uninstallation. Bug: 62537081 Test: Manual. Install APK from bug and see that it can be uninstalled Change-Id: Ic0e0d47f5ff76e4a73b30988d0a024fb3ee651ae (cherry picked from commit 25e686d3cf555b99993e8a5c7edb2375171e5392)
-rwxr-xr-xsrc/com/android/packageinstaller/UninstallerActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/packageinstaller/UninstallerActivity.java b/src/com/android/packageinstaller/UninstallerActivity.java
index ae1659f4..1fb84e17 100755
--- a/src/com/android/packageinstaller/UninstallerActivity.java
+++ b/src/com/android/packageinstaller/UninstallerActivity.java
@@ -56,7 +56,7 @@ public class UninstallerActivity extends Activity {
public Dialog onCreateDialog(Bundle savedInstanceState) {
final PackageManager pm = getActivity().getPackageManager();
final DialogInfo dialogInfo = ((UninstallerActivity) getActivity()).mDialogInfo;
- final CharSequence appLabel = dialogInfo.appInfo.loadLabel(pm);
+ final CharSequence appLabel = dialogInfo.appInfo.loadSafeLabel(pm);
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());
StringBuilder messageBuilder = new StringBuilder();
@@ -64,7 +64,7 @@ public class UninstallerActivity extends Activity {
// If the Activity label differs from the App label, then make sure the user
// knows the Activity belongs to the App being uninstalled.
if (dialogInfo.activityInfo != null) {
- final CharSequence activityLabel = dialogInfo.activityInfo.loadLabel(pm);
+ final CharSequence activityLabel = dialogInfo.activityInfo.loadSafeLabel(pm);
if (!activityLabel.equals(appLabel)) {
messageBuilder.append(
getString(R.string.uninstall_activity_text, activityLabel));