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

Commit 012ef36a authored by Winson Chung's avatar Winson Chung Committed by Winson Chung
Browse files

Updating the stack layout to use a parameterized curve.

- Fixing issue with search box not being layered on top of the task stack view (Bug 16643875)
- Fixing issue with there being no animation when dismissing recents while the stack is scrolling.

Change-Id: I990f3c527de655d62fbf8a4539dcbaed3ed422c8
parent 7c3a9563
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -201,8 +201,8 @@
    <!-- The min translation in the Z index for the last task. -->
    <dimen name="recents_task_view_z_min">5dp</dimen>

    <!-- The translation in the Z index for each task above the last task. -->
    <dimen name="recents_task_view_z_increment">10dp</dimen>
    <!-- The max translation in the Z index for the last task. -->
    <dimen name="recents_task_view_z_max">65dp</dimen>

    <!-- The amount to translate when animating the removal of a task. -->
    <dimen name="recents_task_view_remove_anim_translation_x">100dp</dimen>
+4 −3
Original line number Diff line number Diff line
@@ -105,7 +105,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
    }

    public void onStart() {
        // Do nothing
        // Initialize some static datastructures
        TaskStackViewLayoutAlgorithm.initializeCurve();
    }

    public void onBootCompleted() {
@@ -322,7 +323,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
        Rect taskStackBounds = new Rect(mTaskStackBounds);
        taskStackBounds.bottom -= mSystemInsets.bottom;
        tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds);
        tsv.setStackScrollToInitialState();
        tsv.getScroller().setStackScrollToInitialState();

        // Find the running task in the TaskStack
        Task task = null;
@@ -344,7 +345,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
        }

        // Get the transform for the running task
        mTmpTransform = algo.getStackTransform(task, tsv.getStackScroll(), mTmpTransform);
        mTmpTransform = algo.getStackTransform(task, tsv.getScroller().getStackScroll(), mTmpTransform, null);
        return new Rect(mTmpTransform.rect);
    }

+7 −5
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ public class Constants {
        public static final boolean Verbose = false;

        public static class App {
            // Enables the simulated task affiliations
            public static final boolean EnableSimulatedTaskGroups = false;
            // Enables the screenshot app->Recents transition
            public static final boolean EnableScreenshotAppTransition = false;
            // Enables the filtering of tasks according to their grouping
@@ -43,11 +41,15 @@ public class Constants {
            public static final boolean EnableShadows = true;
            // This disables the bitmap and icon caches
            public static final boolean DisableBackgroundCache = false;
            // For debugging, this enables us to create mock recents tasks
            // Enables the simulated task affiliations
            public static final boolean EnableSimulatedTaskGroups = false;
            // Defines the number of mock task affiliations per group
            public static final int TaskAffiliationsGroupCount = 12;
            // Enables us to create mock recents tasks
            public static final boolean EnableSystemServicesProxy = false;
            // For debugging, this defines the number of mock recents packages to create
            // Defines the number of mock recents packages to create
            public static final int SystemServicesProxyMockPackageCount = 3;
            // For debugging, this defines the number of mock recents tasks to create
            // Defines the number of mock recents tasks to create
            public static final int SystemServicesProxyMockTaskCount = 100;
        }
    }
+2 −3
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ public class RecentsConfiguration {
    public int taskViewRemoveAnimDuration;
    public int taskViewRemoveAnimTranslationXPx;
    public int taskViewTranslationZMinPx;
    public int taskViewTranslationZIncrementPx;
    public int taskViewTranslationZMaxPx;
    public int taskViewRoundedCornerRadiusPx;
    public int taskViewHighlightPx;
    public int taskViewAffiliateGroupEnterOffsetPx;
@@ -208,8 +208,7 @@ public class RecentsConfiguration {
                res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
        taskViewHighlightPx = res.getDimensionPixelSize(R.dimen.recents_task_view_highlight);
        taskViewTranslationZMinPx = res.getDimensionPixelSize(R.dimen.recents_task_view_z_min);
        taskViewTranslationZIncrementPx =
                res.getDimensionPixelSize(R.dimen.recents_task_view_z_increment);
        taskViewTranslationZMaxPx = res.getDimensionPixelSize(R.dimen.recents_task_view_z_max);
        taskViewAffiliateGroupEnterOffsetPx =
                res.getDimensionPixelSize(R.dimen.recents_task_view_affiliate_group_enter_offset);

+2 −2
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ public class TaskStack {
            String prevPackage = "";
            int prevAffiliation = -1;
            Random r = new Random();
            int groupCountDown = 5;
            int groupCountDown = Constants.DebugFlags.App.TaskAffiliationsGroupCount;
            for (int i = 0; i < taskCount; i++) {
                Task t = tasks.get(i);
                String packageName = t.key.baseIntent.getComponent().getPackageName();
@@ -352,7 +352,7 @@ public class TaskStack {
                    addGroup(group);
                    prevAffiliation = affiliation;
                    prevPackage = packageName;
                    groupCountDown = 5;
                    groupCountDown = Constants.DebugFlags.App.TaskAffiliationsGroupCount;
                }
                group.addTask(t);
                taskMap.put(t.key, t);
Loading