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

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

Merge "Fixing issue with configuration states not being reset on configuration...

Merge "Fixing issue with configuration states not being reset on configuration change." into lmp-preview-dev
parents 3d5e5c7b b01ed681
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@
    <!-- The min animation duration for animating the task bar in. -->
    <integer name="recents_animate_task_bar_enter_duration">300</integer>
    <!-- The min animation duration for animating the task bar out. -->
    <integer name="recents_animate_task_bar_exit_duration">175</integer>
    <integer name="recents_animate_task_bar_exit_duration">150</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. -->
+15 −2
Original line number Diff line number Diff line
@@ -46,7 +46,9 @@ public class RecentsConfiguration {

    public float animationPxMovementPerSecond;

    public Interpolator defaultBezierInterpolator;
    public Interpolator fastOutSlowInInterpolator;
    public Interpolator fastOutLinearInInterpolator;
    public Interpolator linearOutSlowInInterpolator;

    public int filteringCurrentViewsMinAnimDuration;
    public int filteringNewViewsMinAnimDuration;
@@ -141,8 +143,12 @@ public class RecentsConfiguration {
        taskBarViewDarkTextColor =
                res.getColor(R.color.recents_task_bar_dark_text_color);

        defaultBezierInterpolator = AnimationUtils.loadInterpolator(context,
        fastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
                        com.android.internal.R.interpolator.fast_out_slow_in);
        fastOutLinearInInterpolator = AnimationUtils.loadInterpolator(context,
                com.android.internal.R.interpolator.fast_out_linear_in);
        linearOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
                com.android.internal.R.interpolator.linear_out_slow_in);

        // Check if the developer options are enabled
        ContentResolver cr = context.getContentResolver();
@@ -167,6 +173,13 @@ public class RecentsConfiguration {
                appWidgetId).apply();
    }

    /** Called when the configuration has changed, and we want to reset any configuration specific
     * members. */
    public void updateOnConfigurationChange() {
        launchedFromAltTab = false;
        launchedWithThumbnailAnimation = false;
    }

    /** Returns whether the search bar app widget exists */
    public boolean hasSearchBarAppWidget() {
        return searchBarAppWidgetId >= 0;
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,8 @@ class SystemUIMessageHandler extends Handler {

        if (msg.what == AlternateRecentsComponent.MSG_UPDATE_FOR_CONFIGURATION) {
            RecentsTaskLoader.initialize(context);
            RecentsConfiguration.reinitialize(context);
            RecentsConfiguration config = RecentsConfiguration.reinitialize(context);
            config.updateOnConfigurationChange();

            try {
                Bundle data = msg.getData();
@@ -73,7 +74,6 @@ class SystemUIMessageHandler extends Handler {

                // Get the task stack and search bar bounds
                Rect taskStackBounds = new Rect();
                RecentsConfiguration config = RecentsConfiguration.getInstance();
                config.getTaskStackBounds(windowRect.width(), windowRect.height(), taskStackBounds);

                // Calculate the target task rect for when there is one task.
+1 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.systemui.recents.views;

import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@@ -81,7 +80,7 @@ class TaskBarView extends FrameLayout {
                    .alpha(toTransform.dismissAlpha)
                    .setStartDelay(0)
                    .setDuration(duration)
                    .setInterpolator(config.defaultBezierInterpolator)
                    .setInterpolator(config.fastOutSlowInInterpolator)
                    .withLayer()
                    .start();
        } else {
+1 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.animation.ValueAnimator;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.Region;
@@ -345,7 +344,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
        mScrollAnimator = ObjectAnimator.ofInt(this, "stackScroll", curScroll, newScroll);
        mScrollAnimator.setDuration(Utilities.calculateTranslationAnimationDuration(newScroll -
                curScroll, 250));
        mScrollAnimator.setInterpolator(RecentsConfiguration.getInstance().defaultBezierInterpolator);
        mScrollAnimator.setInterpolator(RecentsConfiguration.getInstance().fastOutSlowInInterpolator);
        mScrollAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
Loading