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

Commit 6043fea7 authored by Winson Chung's avatar Winson Chung
Browse files

Removing some dead code related to legacy grid recents

- ro.recents.grid sysprop is no longer used and the variables are easily
  confused with overview grid (for large screens)

Bug: 319267687
Test: Builds
Change-Id: I7b50fa74481d3db3c51a1a7d5387369c527374a0
parent 7e37a4b0
Loading
Loading
Loading
Loading
+5 −22
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ public class TransitionAnimation {
    private final int mDefaultWindowAnimationStyleResId;

    private final boolean mDebug;
    private final boolean mGridLayoutRecentsEnabled;
    private final boolean mLowRamRecentsEnabled;

    public TransitionAnimation(Context context, boolean debug, String tag) {
@@ -166,7 +165,6 @@ public class TransitionAnimation {
        mConfigShortAnimTime = context.getResources().getInteger(
                com.android.internal.R.integer.config_shortAnimTime);

        mGridLayoutRecentsEnabled = SystemProperties.getBoolean("ro.recents.grid", false);
        mLowRamRecentsEnabled = ActivityManager.isLowRamDeviceStatic();

        final TypedArray windowStyle = mContext.getTheme().obtainStyledAttributes(
@@ -768,10 +766,8 @@ public class TransitionAnimation {
                        // We scale the width and clip to the top/left square
                        float scale =
                                thumbWidth / (appWidth - contentInsets.left - contentInsets.right);
                        if (!mGridLayoutRecentsEnabled) {
                        int unscaledThumbHeight = (int) (thumbHeight / scale);
                        mTmpFromClipRect.bottom = mTmpFromClipRect.top + unscaledThumbHeight;
                        }

                        Animation scaleAnim = new ScaleAnimation(
                                scaleUp ? scale : 1, scaleUp ? 1 : scale,
@@ -887,12 +883,6 @@ public class TransitionAnimation {
            toY = appRect.height() / 2 * (1 - 1 / scaleW) + appRect.top;
            pivotX = mTmpRect.width() / 2;
            pivotY = appRect.height() / 2 / scaleW;
            if (mGridLayoutRecentsEnabled) {
                // In the grid layout, the header is displayed above the thumbnail instead of
                // overlapping it.
                fromY -= thumbHeightI;
                toY -= thumbHeightI * scaleW;
            }
        } else {
            pivotX = 0;
            pivotY = 0;
@@ -936,10 +926,7 @@ public class TransitionAnimation {
            // This AnimationSet uses the Interpolators assigned above.
            AnimationSet set = new AnimationSet(false);
            set.addAnimation(scale);
            if (!mGridLayoutRecentsEnabled) {
                // In the grid layout, the header should be shown for the whole animation.
            set.addAnimation(alpha);
            }
            set.addAnimation(translate);
            set.addAnimation(clipAnim);
            a = set;
@@ -958,10 +945,7 @@ public class TransitionAnimation {
            // This AnimationSet uses the Interpolators assigned above.
            AnimationSet set = new AnimationSet(false);
            set.addAnimation(scale);
            if (!mGridLayoutRecentsEnabled) {
                // In the grid layout, the header should be shown for the whole animation.
            set.addAnimation(alpha);
            }
            set.addAnimation(translate);
            a = set;

@@ -1081,8 +1065,7 @@ public class TransitionAnimation {
     * @return whether the transition should show the thumbnail being scaled down.
     */
    private boolean shouldScaleDownThumbnailTransition(int orientation) {
        return mGridLayoutRecentsEnabled
                || orientation == Configuration.ORIENTATION_PORTRAIT;
        return orientation == Configuration.ORIENTATION_PORTRAIT;
    }

    private static int updateToTranslucentAnimIfNeeded(int anim, @TransitionOldType int transit) {
+0 −8
Original line number Diff line number Diff line
@@ -3584,14 +3584,6 @@
    <string name="config_slicePermissionComponent" translatable="false"
            >com.android.systemui/com.android.systemui.SlicePermissionActivity</string>

    <!-- The minimum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no minimum limit. -->
    <integer name="config_minNumVisibleRecentTasks_grid">-1</integer>

    <!-- The maximum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no maximum limit. -->
    <integer name="config_maxNumVisibleRecentTasks_grid">9</integer>

    <!-- The minimum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no minimum limit. -->
    <integer name="config_minNumVisibleRecentTasks_lowRam">-1</integer>
+0 −2
Original line number Diff line number Diff line
@@ -392,8 +392,6 @@
  <java-symbol type="string" name="config_hdmiCecSetMenuLanguageActivity" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks_lowRam" />
  <java-symbol type="integer" name="config_maxNumVisibleRecentTasks_lowRam" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks_grid" />
  <java-symbol type="integer" name="config_maxNumVisibleRecentTasks_grid" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks" />
  <java-symbol type="integer" name="config_maxNumVisibleRecentTasks" />
  <java-symbol type="integer" name="config_activeTaskDurationHours" />
+0 −18
Original line number Diff line number Diff line
@@ -228,11 +228,8 @@ public class AppTransition implements Dump {
    private int mAppTransitionState = APP_STATE_IDLE;

    private final ArrayList<AppTransitionListener> mListeners = new ArrayList<>();
    private KeyguardExitAnimationStartListener mKeyguardExitAnimationStartListener;
    private final ExecutorService mDefaultExecutor = Executors.newSingleThreadExecutor();

    private final boolean mGridLayoutRecentsEnabled;

    private final int mDefaultWindowAnimationStyleResId;
    private boolean mOverrideTaskTransition;

@@ -249,8 +246,6 @@ public class AppTransition implements Dump {
        mTransitionAnimation = new TransitionAnimation(
                context, ProtoLog.isEnabled(WM_DEBUG_ANIM), TAG);

        mGridLayoutRecentsEnabled = SystemProperties.getBoolean("ro.recents.grid", false);

        final TypedArray windowStyle = mContext.getTheme().obtainStyledAttributes(
                com.android.internal.R.styleable.Window);
        mDefaultWindowAnimationStyleResId = windowStyle.getResourceId(
@@ -493,11 +488,6 @@ public class AppTransition implements Dump {
        mListeners.remove(listener);
    }

    void registerKeygaurdExitAnimationStartListener(
            KeyguardExitAnimationStartListener listener) {
        mKeyguardExitAnimationStartListener = listener;
    }

    public void notifyAppTransitionFinishedLocked(IBinder token) {
        for (int i = 0; i < mListeners.size(); i++) {
            mListeners.get(i).onAppTransitionFinishedLocked(token);
@@ -1595,14 +1585,6 @@ public class AppTransition implements Dump {
        return mNextAppTransitionRequests.contains(transit);
    }

    /**
     * @return whether the transition should show the thumbnail being scaled down.
     */
    private boolean shouldScaleDownThumbnailTransition(int uiMode, int orientation) {
        return mGridLayoutRecentsEnabled
                || orientation == Configuration.ORIENTATION_PORTRAIT;
    }

    private void handleAppTransitionTimeout() {
        synchronized (mService.mGlobalLock) {
            final DisplayContent dc = mDisplayContent;
+0 −5
Original line number Diff line number Diff line
@@ -364,11 +364,6 @@ class RecentTasks {
                    com.android.internal.R.integer.config_minNumVisibleRecentTasks_lowRam);
            mMaxNumVisibleTasks = res.getInteger(
                    com.android.internal.R.integer.config_maxNumVisibleRecentTasks_lowRam);
        } else if (SystemProperties.getBoolean("ro.recents.grid", false)) {
            mMinNumVisibleTasks = res.getInteger(
                    com.android.internal.R.integer.config_minNumVisibleRecentTasks_grid);
            mMaxNumVisibleTasks = res.getInteger(
                    com.android.internal.R.integer.config_maxNumVisibleRecentTasks_grid);
        } else {
            mMinNumVisibleTasks = res.getInteger(
                    com.android.internal.R.integer.config_minNumVisibleRecentTasks);
Loading