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

Commit 7f0c7a24 authored by Joel Galenson's avatar Joel Galenson
Browse files

Show non-work apps before work apps.

Fixes: 131907428
Test: View PermissionAppsFragment with work profile.
Change-Id: I153a077232b28a23acc48b9d1e0b5539e025e8e1
parent 91d9ba67
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -237,7 +237,13 @@ public final class PermissionAppsFragment extends SettingsWithLargeHeader implem
        boolean hasPermissionWithBackgroundMode = false;

        ArrayList<PermissionApp> sortedApps = new ArrayList<>(permissionApps.getApps());
        sortedApps.sort((x, y) -> mCollator.compare(x.getLabel(), y.getLabel()));
        sortedApps.sort((x, y) -> {
            int result = mCollator.compare(x.getLabel(), y.getLabel());
            if (result == 0) {
                result = x.getUid() - y.getUid();
            }
            return result;
        });

        for (int i = 0; i < sortedApps.size(); i++) {
            PermissionApp app = sortedApps.get(i);