Merge the 2018-09-05 SPL branch from AOSP-Partner
* security-aosp-nyc-mr2-release:
RESTRICT AUTOMERGE: Always use safe labels
Change-Id: Ic730e65400dd1e9dbaacdacd86c35d2889582c55
diff --git a/src/com/android/packageinstaller/UninstallerActivity.java b/src/com/android/packageinstaller/UninstallerActivity.java
index ae1659f..1fb84e1 100755
--- a/src/com/android/packageinstaller/UninstallerActivity.java
+++ b/src/com/android/packageinstaller/UninstallerActivity.java
@@ -56,7 +56,7 @@
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 @@
// 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));