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

Commit 6ac3367d authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Enabling filtering by base intent package."

parents 428ec926 c6a1623c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="top|center_horizontal"
        android:layout_gravity="top|center_horizontal"
        android:background="#88000000">
        android:background="#e6444444">
        <ImageView
        <ImageView
            android:id="@+id/activity_icon"
            android:id="@+id/activity_icon"
            android:layout_width="@dimen/recents_task_view_icon_size"
            android:layout_width="@dimen/recents_task_view_icon_size"
+6 −2
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@ public class Constants {
        public static final boolean Verbose = false;
        public static final boolean Verbose = false;


        public static class App {
        public static class App {
            public static final boolean EnableTaskFiltering = false;
            public static final boolean EnableTaskFiltering = true;
            public static final boolean EnableTaskStackClipping = false;
            public static final boolean EnableTaskStackClipping = false;
            public static final boolean EnableToggleNewRecentsActivity = false;
            public static final boolean EnableToggleNewRecentsActivity = false;
            // This disables the bitmap and icon caches to
            // This disables the bitmap and icon caches to
@@ -81,6 +81,10 @@ public class Constants {
            public static class Animation {
            public static class Animation {
                public static final int TaskRemovedReshuffleDuration = 200;
                public static final int TaskRemovedReshuffleDuration = 200;
                public static final int SnapScrollBackDuration = 650;
                public static final int SnapScrollBackDuration = 650;
                public static final int FilteredCurrentViewsDuration = 150;
                public static final int FilteredNewViewsDuration = 200;
                public static final int UnfilteredCurrentViewsDuration = 150;
                public static final int UnfilteredNewViewsDuration = 200;
            }
            }


            public static final int TaskStackOverscrollRange = 150;
            public static final int TaskStackOverscrollRange = 150;
@@ -107,7 +111,7 @@ public class Constants {
            public static final boolean AnimateFrontTaskIconOnEnterRecents = true;
            public static final boolean AnimateFrontTaskIconOnEnterRecents = true;
            public static final boolean AnimateFrontTaskIconOnLeavingRecents = true;
            public static final boolean AnimateFrontTaskIconOnLeavingRecents = true;


            public static final boolean UseRoundedCorners = true;
            public static final boolean UseRoundedCorners = false;
            public static final float RoundedCornerRadiusDps = 3;
            public static final float RoundedCornerRadiusDps = 3;
        }
        }
    }
    }
+5 −2
Original line number Original line Diff line number Diff line
@@ -54,10 +54,13 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                    finish();
                    finish();
                }
                }
            } else if (action.equals(RecentsService.ACTION_TOGGLE_RECENTS_ACTIVITY)) {
            } else if (action.equals(RecentsService.ACTION_TOGGLE_RECENTS_ACTIVITY)) {
                // Dismiss recents and launch the first task if possible
                // Try and unfilter and filtered stacks
                if (!mRecentsView.unfilterFilteredStacks()) {
                    // If there are no filtered stacks, dismiss recents and launch the first task
                    dismissRecentsIfVisible();
                    dismissRecentsIfVisible();
                }
                }
            }
            }
        }
    };
    };


    /** Updates the set of recent tasks */
    /** Updates the set of recent tasks */
+1 −1
Original line number Original line Diff line number Diff line
@@ -66,7 +66,7 @@ class SystemUIMessageHandler extends Handler {
                // in a bottom inset
                // in a bottom inset
                tsv.computeRects(windowRect.width(), windowRect.height() - systemInsets.top, 0);
                tsv.computeRects(windowRect.width(), windowRect.height() - systemInsets.top, 0);
                tsv.boundScroll();
                tsv.boundScroll();
                TaskViewTransform transform = tsv.getStackTransform(0);
                TaskViewTransform transform = tsv.getStackTransform(0, tsv.getStackScroll());
                Rect taskRect = new Rect(transform.rect);
                Rect taskRect = new Rect(transform.rect);


                data.putParcelable("taskRect", taskRect);
                data.putParcelable("taskRect", taskRect);
+2 −2
Original line number Original line Diff line number Diff line
@@ -190,7 +190,7 @@ class TaskResourceLoader implements Runnable {
                        // Load the icon
                        // Load the icon
                        if (loadIcon == null || forceLoadTask) {
                        if (loadIcon == null || forceLoadTask) {
                            PackageManager pm = mContext.getPackageManager();
                            PackageManager pm = mContext.getPackageManager();
                            ActivityInfo info = pm.getActivityInfo(t.key.intent.getComponent(),
                            ActivityInfo info = pm.getActivityInfo(t.key.baseIntent.getComponent(),
                                    PackageManager.GET_META_DATA);
                                    PackageManager.GET_META_DATA);
                            Drawable icon = info.loadIcon(pm);
                            Drawable icon = info.loadIcon(pm);
                            if (!mCancelled) {
                            if (!mCancelled) {
@@ -218,7 +218,7 @@ class TaskResourceLoader implements Runnable {
                                } else {
                                } else {
                                    Console.logError(mContext,
                                    Console.logError(mContext,
                                            "Failed to load task top thumbnail for: " +
                                            "Failed to load task top thumbnail for: " +
                                                    t.key.intent.getComponent().getPackageName());
                                                    t.key.baseIntent.getComponent().getPackageName());
                                }
                                }
                            }
                            }
                        }
                        }
Loading