From 933915289a0a023937dff88f49c82122f8e59f51 Mon Sep 17 00:00:00 2001 From: Fyodor Kupolov Date: Mon, 18 Apr 2016 16:45:27 -0700 Subject: Fix misleading uninstall message for managed profiles The message now depends on the state of mAllUsers flag in UninstallAppProgress activity: - This app is required for some users or profiles and was uninstalled for others (if mAllUsers==true) - This app is needed for your work profile and can't be uninstalled (if mAllUsers==false) Bug: 28240714 Change-Id: Ia060aebd112d3e4c5fcaee02a777140f085abf87 --- res/values/strings.xml | 11 ++++++++--- src/com/android/packageinstaller/UninstallAppProgress.java | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index ace1295b..a58c5e59 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -118,10 +118,15 @@ is a current device administrator for some user [CHAR LIMIT=100] --> Can\'t uninstall because this package is an active device administrator for the user %1$s. + + This app is required for some users or + profiles and was uninstalled for others - This app is required for some users or profiles - and was uninstalled for others + has marked the target package as not able to be uninstalled [CHAR LIMIT=120] --> + This app is needed for + your profile and can\'t be uninstalled. This app is required diff --git a/src/com/android/packageinstaller/UninstallAppProgress.java b/src/com/android/packageinstaller/UninstallAppProgress.java index 3a178273..07276334 100755 --- a/src/com/android/packageinstaller/UninstallAppProgress.java +++ b/src/com/android/packageinstaller/UninstallAppProgress.java @@ -211,7 +211,9 @@ public class UninstallAppProgress extends Activity implements OnClickListener { + msg.arg1 + " no blocking user"); statusText = getString(R.string.uninstall_failed); } else { - statusText = getString(R.string.uninstall_blocked_profile_owner); + statusText = mAllUsers + ? getString(R.string.uninstall_all_blocked_profile_owner) : + getString(R.string.uninstall_blocked_profile_owner); } break; } -- cgit v1.2.3