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

Commit 252030b7 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Fix priority constants in RecentTasksLoader

These constants should be priority values, not scheduling group values,
for use with this API.

Change-Id: If2ba1feffd20fff2f93295816fa8a724196d978e
parent ddc421d1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ public class RecentTasksLoader {
                // We load in two stages: first, we update progress with just the first screenful
                // of items. Then, we update with the rest of the items
                final int origPri = Process.getThreadPriority(Process.myTid());
                Process.setThreadPriority(Process.THREAD_GROUP_BG_NONINTERACTIVE);
                Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
                final PackageManager pm = mContext.getPackageManager();
                final ActivityManager am = (ActivityManager)
                mContext.getSystemService(Context.ACTIVITY_SERVICE);
@@ -326,7 +326,7 @@ public class RecentTasksLoader {
            @Override
            protected Void doInBackground(Void... params) {
                final int origPri = Process.getThreadPriority(Process.myTid());
                Process.setThreadPriority(Process.THREAD_GROUP_BG_NONINTERACTIVE);
                Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);

                while (true) {
                    if (isCancelled()) {