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

Commit 9b521f85 authored by Zoltan Szatmary-Ban's avatar Zoltan Szatmary-Ban
Browse files

Make Force Stop button work for packages of managed profile

Call force stop of a package for the correct profile.

Bug: 17580914
Change-Id: I7c601618f7819d6775cf422dca70a929ee1089d9
parent 6e1d8277
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -644,8 +644,9 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener
        if (mPackages == null) return;
        ActivityManager am = (ActivityManager)getActivity().getSystemService(
                Context.ACTIVITY_SERVICE);
        final int userId = UserHandle.getUserId(mUid);
        for (int i = 0; i < mPackages.length; i++) {
            am.forceStopPackage(mPackages[i]);
            am.forceStopPackageAsUser(mPackages[i], userId);
        }
        checkForceStop();
    }