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

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

Merge "Small perf tweaks."

parents 8a5feb79 47a3e65a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|left"
            android:layout_marginStart="@dimen/recents_task_view_application_icon_size"
            android:layout_marginEnd="8dp"
            android:layout_marginEnd="@dimen/recents_task_view_application_icon_size"
            android:textSize="22sp"
            android:textColor="#ffffffff"
            android:text="@string/recents_empty_message"
+2 −2
Original line number Diff line number Diff line
@@ -113,9 +113,9 @@
    <!-- The min animation duration for animating views that are newly visible. -->
    <integer name="recents_filter_animate_new_views_min_duration">125</integer>
    <!-- The min animation duration for animating the task bar in. -->
    <integer name="recents_animate_task_bar_enter_duration">200</integer>
    <integer name="recents_animate_task_bar_enter_duration">225</integer>
    <!-- The min animation duration for animating the task bar out. -->
    <integer name="recents_animate_task_bar_exit_duration">150</integer>
    <integer name="recents_animate_task_bar_exit_duration">175</integer>
    <!-- The animation duration for animating in the info pane. -->
    <integer name="recents_animate_task_view_info_pane_duration">150</integer>
    <!-- The animation duration for animating the removal of a task view. -->
+13 −2
Original line number Diff line number Diff line
@@ -313,7 +313,13 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                    Console.AnsiRed);
        }
        super.onStart();

        // Start listening for widget package changes if there is one bound
        RecentsConfiguration config = RecentsConfiguration.getInstance();
        if (config.searchBarAppWidgetId >= 0) {
            mAppWidgetHost.startListening();
        }

        mVisible = true;
    }

@@ -382,7 +388,12 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
        }
        super.onStop();

        // Stop listening for widget package changes if there was one bound
        RecentsConfiguration config = RecentsConfiguration.getInstance();
        if (config.searchBarAppWidgetId >= 0) {
            mAppWidgetHost.stopListening();
        }

        mVisible = false;
        mTaskLaunched = false;
    }
+9 −0
Original line number Diff line number Diff line
@@ -16,11 +16,13 @@

package com.android.systemui.recents;

import android.content.ContentResolver;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.animation.AnimationUtils;
@@ -68,6 +70,8 @@ public class RecentsConfiguration {
    public boolean launchedFromAltTab;
    public boolean launchedWithThumbnailAnimation;

    public boolean developerOptionsEnabled;

    /** Private constructor */
    private RecentsConfiguration() {}

@@ -140,6 +144,11 @@ public class RecentsConfiguration {
        defaultBezierInterpolator = AnimationUtils.loadInterpolator(context,
                        com.android.internal.R.interpolator.fast_out_slow_in);

        // Check if the developer options are enabled
        ContentResolver cr = context.getContentResolver();
        developerOptionsEnabled = Settings.Global.getInt(cr,
                Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;

        // Update the search widget id
        SharedPreferences settings = context.getSharedPreferences(context.getPackageName(), 0);
        searchBarAppWidgetId = settings.getInt(Constants.Values.App.Key_SearchAppWidgetId, -1);
+5 −0
Original line number Diff line number Diff line
@@ -1112,6 +1112,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
        }
    }

    @Override
    public void onTaskFocused(TaskView tv) {
        // Do nothing
    }

    @Override
    public void onTaskDismissed(TaskView tv) {
        Task task = tv.getTask();
Loading