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

Commit bd388372 authored by Zach Johnson's avatar Zach Johnson Committed by Android Git Automerger
Browse files

am 5faa0336: Merge "Add filter for personal apps that are not disabled until...

am 5faa0336: Merge "Add filter for personal apps that are not disabled until first use" into mnc-dev

* commit '5faa0336':
  Add filter for personal apps that are not disabled until first use
parents 673fed99 5faa0336
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1239,6 +1239,21 @@ public class ApplicationsState {
        }
    };

    public static final AppFilter FILTER_PERSONAL_WITHOUT_DISABLED_UNTIL_USED = new AppFilter() {
        private int mCurrentUser;

        public void init() {
            mCurrentUser = ActivityManager.getCurrentUser();
        }

        @Override
        public boolean filterApp(AppEntry entry) {
            return UserHandle.getUserId(entry.info.uid) == mCurrentUser &&
                    entry.info.enabledSetting != PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED;
        }
    };


    public static final AppFilter FILTER_WORK = new AppFilter() {
        private int mCurrentUser;