Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93391528 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

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
parent 0fa9b50b
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -118,10 +118,15 @@
        is a current device administrator for some user [CHAR LIMIT=100] -->
    <string name="uninstall_failed_device_policy_manager_of_user">Can\'t uninstall because this package is an
        active device administrator for the user <xliff:g id="username">%1$s</xliff:g>.</string>
    <!-- String presented to the admin user when uninstalling a package for all users failed
    because a profile owner has marked the target package as not able to be uninstalled
    [CHAR LIMIT=120] -->
    <string name="uninstall_all_blocked_profile_owner">This app is required for some users or
        profiles and was uninstalled for others</string>
    <!-- String presented to the user when uninstalling a package failed because a profile owner
         has marked the the target package as not able to be uninstalled [CHAR LIMIT=120] -->
    <string name="uninstall_blocked_profile_owner">This app is required for some users or profiles
        and was uninstalled for others</string>
         has marked the target package as not able to be uninstalled [CHAR LIMIT=120] -->
    <string name="uninstall_blocked_profile_owner">This app is needed for
        your profile and can\'t be uninstalled.</string>
    <!-- String presented to the user when uninstalling a package failed because a device owner
         has marked the the target package as not able to be uninstalled [CHAR LIMIT=80] -->
    <string name="uninstall_blocked_device_owner">This app is required
+3 −1
Original line number Diff line number Diff line
@@ -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;
                        }