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

Commit 94424fe8 authored by Winson Chung's avatar Winson Chung Committed by Android Git Automerger
Browse files

am 4de668bc: Merge "Additional changes to improve performance when loading...

am 4de668bc: Merge "Additional changes to improve performance when loading Recents. (Bug 16987565)" into lmp-dev

* commit '4de668bcb1a03e505e585d43b080029aa2780e5d':
  Additional changes to improve performance when loading Recents. (Bug 16987565)
parents 39698e77 3e97f9d4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -123,10 +123,10 @@
    <!-- The min animation duration for animating views that are newly visible. -->
    <integer name="recents_filter_animate_new_views_duration">250</integer>
    <!-- The min animation duration for animating the task bar in. -->
    <integer name="recents_animate_task_bar_enter_duration">275</integer>
    <integer name="recents_animate_task_bar_enter_duration">225</integer>
    <!-- The animation delay for animating the first task in. This should roughly be the animation
     duration of the transition in to recents. -->
    <integer name="recents_animate_task_bar_enter_delay">300</integer>
    <integer name="recents_animate_task_bar_enter_delay">275</integer>
    <!-- The min animation duration for animating the task bar out. -->
    <integer name="recents_animate_task_exit_to_home_duration">225</integer>
    <!-- The min animation duration for animating the task bar out. -->
@@ -143,6 +143,8 @@
    <integer name="recents_nav_bar_scrim_enter_duration">400</integer>
    <!-- The animation duration for animating the removal of a task view. -->
    <integer name="recents_animate_task_view_remove_duration">250</integer>
    <!-- The animation duration for scrolling the stack to a particular item. -->
    <integer name="recents_animate_task_stack_scroll_duration">225</integer>
    <!-- The minimum alpha for the dim applied to cards that go deeper into the stack. -->
    <integer name="recents_max_task_stack_view_dim">96</integer>
    <!-- The delay to enforce between each alt-tab key press. -->
+5 −5
Original line number Diff line number Diff line
@@ -195,17 +195,14 @@
    <!-- The size of the application icon in the recents task view. -->
    <dimen name="recents_task_view_application_icon_size">48dp</dimen>

    <!-- The size of the activity icon in the recents task view. -->
    <dimen name="recents_task_view_activity_icon_size">60dp</dimen>

    <!-- The radius of the rounded corners on a task view. -->
    <dimen name="recents_task_view_rounded_corners_radius">2dp</dimen>

    <!-- The min translation in the Z index for the last task. -->
    <dimen name="recents_task_view_z_min">25dp</dimen>
    <dimen name="recents_task_view_z_min">20dp</dimen>

    <!-- The max translation in the Z index for the last task. -->
    <dimen name="recents_task_view_z_max">100dp</dimen>
    <dimen name="recents_task_view_z_max">80dp</dimen>

    <!-- The amount to translate when animating the removal of a task. -->
    <dimen name="recents_task_view_remove_anim_translation_x">100dp</dimen>
@@ -231,6 +228,9 @@
    <!-- The side padding for the task stack as a percentage of the width. -->
    <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.04444</item>

    <!-- The overscroll percentage allowed on the stack. -->
    <item name="recents_stack_overscroll_percentage" format="float" type="dimen">0.0875</item>

    <!-- The top offset for the task stack. -->
    <dimen name="recents_stack_top_padding">16dp</dimen>

+1 −2
Original line number Diff line number Diff line
@@ -33,8 +33,7 @@
        <item name="android:navigationBarColor">@android:color/transparent</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>

        <item name="android:ambientShadowAlpha">0.30</item>
        <item name="android:ambientShadowAlpha">0.35</item>
    </style>

    <!-- Animations for a non-full-screen window or activity. -->
+8 −15
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
@@ -36,7 +35,6 @@ import com.android.systemui.R;
import com.android.systemui.RecentsComponent;
import com.android.systemui.recents.misc.Console;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.misc.Utilities;
import com.android.systemui.recents.model.RecentsTaskLoader;
import com.android.systemui.recents.model.Task;
import com.android.systemui.recents.model.TaskGrouping;
@@ -99,6 +97,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
    long mLastToggleTime;

    public AlternateRecentsComponent(Context context) {
        RecentsTaskLoader.initialize(context);
        Resources res = context.getResources();
        mContext = context;
        mSystemServicesProxy = new SystemServicesProxy(context);
@@ -176,8 +175,9 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
    }

    void showRelativeAffiliatedTask(boolean showNextTask) {
        TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy,
                Integer.MAX_VALUE, mContext.getResources());
        RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
        TaskStack stack = loader.getTaskStack(mSystemServicesProxy, mContext.getResources(),
                -1, -1, false, null, null);
        // Return early if there are no tasks
        if (stack.getTaskCount() == 0) return;

@@ -385,16 +385,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
                toTask);
        if (toTransform != null && toTask.key != null) {
            Rect toTaskRect = toTransform.rect;
            ActivityInfo info = mSystemServicesProxy.getActivityInfo(
                    toTask.key.baseIntent.getComponent(), toTask.key.userId);
            if (toTask.activityIcon == null) {
                toTask.activityIcon = mSystemServicesProxy.getActivityIcon(info,
                        toTask.key.userId);
            }
            if (toTask.activityLabel == null) {
                toTask.activityLabel = mSystemServicesProxy.getActivityLabel(info);
            }

            // XXX: Reduce the memory usage the to the task bar height
            Bitmap thumbnail = Bitmap.createBitmap(toTaskRect.width(), toTaskRect.height(),
                    Bitmap.Config.ARGB_8888);
            if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
@@ -420,8 +412,9 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
    TaskViewTransform getThumbnailTransitionTransform(int runningTaskId, boolean isTopTaskHome,
                                                      Task runningTaskOut) {
        // Get the stack of tasks that we are animating into
        TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy, -1,
                mContext.getResources());
        RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
        TaskStack stack = loader.getTaskStack(mSystemServicesProxy, mContext.getResources(),
                runningTaskId, -1, false, null, null);
        if (stack.getTaskCount() == 0) {
            return null;
        }
+0 −1
Original line number Diff line number Diff line
@@ -343,7 +343,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
        super.onCreate(savedInstanceState);

        // Initialize the loader and the configuration
        RecentsTaskLoader.initialize(this);
        mConfig = RecentsConfiguration.reinitialize(this,
                RecentsTaskLoader.getInstance().getSystemServicesProxy());

Loading