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

Commit 545a6e1b authored by Winson Chung's avatar Winson Chung
Browse files

Remove unused recents fast-toggle/paging code.

- Also remove some unused assets

Bug: 67510855
Test: Code removal
Change-Id: I770cd430af01deb64f14e3ce30c12497c194dfa2
parent a7963492
Loading
Loading
Loading
Loading
+0 −54
Original line number Diff line number Diff line
<!--
Copyright (C) 2016 The Android Open Source Project

   Licensed under the Apache License, Version 2 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:height="16dp"
    android:width="28dp"
    android:viewportHeight="48"
    android:viewportWidth="72" >
    <group
        android:name="dismiss_all"
        android:translateX="48"
        android:translateY="6" >
        <group
            android:name="3"
            android:translateX="-24"
            android:translateY="36" >
            <path
                android:name="rectangle_path_1_2"
                android:pathData="M -24.0,-6.0 l 48.0,0 l 0,12.0 l -48.0,0 Z"
                android:fillColor="#FFFFFFFF"
                android:fillAlpha="1" />
        </group>
        <group
            android:name="2"
            android:translateX="-12"
            android:translateY="18" >
            <path
                android:name="rectangle_path_1_1"
                android:pathData="M -24.0,-6.0 l 48.0,0 l 0,12.0 l -48.0,0 Z"
                android:fillColor="#FFFFFFFF"
                android:fillAlpha="1" />
        </group>
        <group
            android:name="1" >
            <path
                android:name="rectangle_path_1"
                android:pathData="M -24.0,-6.0 l 48.0,0 l 0,12.0 l -48.0,0 Z"
                android:fillColor="#FFFFFFFF"
                android:fillAlpha="1" />
        </group>
    </group>
</vector>
+0 −8
Original line number Diff line number Diff line
@@ -66,14 +66,6 @@
        android:alpha="0"
        android:visibility="gone" />

    <!-- The progress indicator shows if auto-paging is enabled -->
    <ViewStub android:id="@+id/focus_timer_indicator_stub"
               android:inflatedId="@+id/focus_timer_indicator"
               android:layout="@layout/recents_task_view_header_progress_bar"
               android:layout_width="match_parent"
               android:layout_height="5dp"
               android:layout_gravity="bottom" />

    <!-- The app overlay shows as the user long-presses on the app icon -->
    <ViewStub android:id="@+id/app_overlay_stub"
               android:inflatedId="@+id/app_overlay"
+0 −6
Original line number Diff line number Diff line
@@ -167,12 +167,6 @@
    <!-- The animation duration for scrolling the stack to a particular item. -->
    <integer name="recents_animate_task_stack_scroll_duration">200</integer>

    <!-- The animation duration for scrolling the stack to a particular item. -->
    <integer name="recents_auto_advance_duration">750</integer>

    <!-- The animation duration for subsequent scrolling the stack to a particular item. -->
    <integer name="recents_subsequent_auto_advance_duration">1000</integer>

    <!-- The delay to enforce between each alt-tab key press. -->
    <integer name="recents_alt_tab_key_delay">200</integer>

+1 −47
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.CancelEnterRecentsWindowAnimationEvent;
import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
import com.android.systemui.recents.events.activity.DebugFlagsChangedEvent;
import com.android.systemui.recents.events.activity.DismissRecentsToHomeAnimationStarted;
import com.android.systemui.recents.events.activity.DockedFirstAnimationFrameEvent;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
@@ -61,7 +60,6 @@ import com.android.systemui.recents.events.activity.EnterRecentsWindowAnimationC
import com.android.systemui.recents.events.activity.EnterRecentsWindowLastAnimationFrameEvent;
import com.android.systemui.recents.events.activity.ExitRecentsWindowFirstAnimationFrameEvent;
import com.android.systemui.recents.events.activity.HideRecentsEvent;
import com.android.systemui.recents.events.activity.IterateRecentsEvent;
import com.android.systemui.recents.events.activity.LaunchTaskFailedEvent;
import com.android.systemui.recents.events.activity.LaunchTaskSucceededEvent;
import com.android.systemui.recents.events.activity.MultiWindowStateChangedEvent;
@@ -85,7 +83,6 @@ import com.android.systemui.recents.events.ui.focus.FocusNextTaskViewEvent;
import com.android.systemui.recents.events.ui.focus.FocusPreviousTaskViewEvent;
import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent;
import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent.Direction;
import com.android.systemui.recents.misc.DozeTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.misc.Utilities;
import com.android.systemui.recents.model.RecentsPackageMonitor;
@@ -132,7 +129,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD

    // The trigger to automatically launch the current task
    private int mFocusTimerDuration;
    private DozeTrigger mIterateTrigger;
    private final UserInteractionEvent mUserInteractionEvent = new UserInteractionEvent();

    // Theme and colors
@@ -327,13 +323,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        }

        mLastConfig = new Configuration(Utilities.getAppConfiguration(this));
        mFocusTimerDuration = getResources().getInteger(R.integer.recents_auto_advance_duration);
        mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() {
            @Override
            public void run() {
                dismissRecentsToFocusedTask(MetricsEvent.OVERVIEW_SELECT_TIMEOUT);
            }
        });

        // Set the window background
        mRecentsView.updateBackgroundScrim(getWindow(), isInMultiWindowMode());
@@ -502,7 +491,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        super.onPause();

        mIgnoreAltTabRelease = false;
        mIterateTrigger.stopDozing();
    }

    @Override
@@ -605,8 +593,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
                    if (backward) {
                        EventBus.getDefault().send(new FocusPreviousTaskViewEvent());
                    } else {
                        EventBus.getDefault().send(
                                new FocusNextTaskViewEvent(0 /* timerIndicatorDuration */));
                        EventBus.getDefault().send(new FocusNextTaskViewEvent());
                    }
                    mLastTabKeyEventTime = SystemClock.elapsedRealtime();

@@ -664,38 +651,10 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        }
    }

    public final void onBusEvent(IterateRecentsEvent event) {
        final RecentsDebugFlags debugFlags = Recents.getDebugFlags();

        // Start dozing after the recents button is clicked
        int timerIndicatorDuration = 0;
        if (debugFlags.isFastToggleRecentsEnabled()) {
            timerIndicatorDuration = getResources().getInteger(
                    R.integer.recents_subsequent_auto_advance_duration);

            mIterateTrigger.setDozeDuration(timerIndicatorDuration);
            if (!mIterateTrigger.isDozing()) {
                mIterateTrigger.startDozing();
            } else {
                mIterateTrigger.poke();
            }
        }

        // Focus the next task
        EventBus.getDefault().send(new FocusNextTaskViewEvent(timerIndicatorDuration));

        MetricsLogger.action(this, MetricsEvent.ACTION_OVERVIEW_PAGE);
    }

    public final void onBusEvent(RecentsActivityStartingEvent event) {
        mRecentsStartRequested = true;
    }

    public final void onBusEvent(UserInteractionEvent event) {
        // Stop the fast-toggle dozer
        mIterateTrigger.stopDozing();
    }

    public final void onBusEvent(HideRecentsEvent event) {
        if (event.triggeredFromAltTab) {
            // If we are hiding from releasing Alt-Tab, dismiss Recents to the focused app
@@ -817,11 +776,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        MetricsLogger.count(this, "overview_screen_pinned", 1);
    }

    public final void onBusEvent(DebugFlagsChangedEvent event) {
        // Just finish recents so that we can reload the flags anew on the next instantiation
        finish();
    }

    public final void onBusEvent(StackViewScrolledEvent event) {
        // Once the user has scrolled while holding alt-tab, then we should ignore the release of
        // the key
+0 −12
Original line number Diff line number Diff line
@@ -60,12 +60,6 @@ public class RecentsActivityLaunchState {
        RecentsDebugFlags debugFlags = Recents.getDebugFlags();
        RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
        if (launchedFromApp) {
            if (!launchState.launchedWithAltTab && debugFlags.isFastToggleRecentsEnabled()) {
                // If fast toggling, focus the front most task so that the next tap will launch the
                // task
                return numTasks - 1;
            }

            if (launchState.launchedFromBlacklistedApp) {
                // If we are launching from a blacklisted app, focus the front most task so that the
                // next tap will launch the task
@@ -80,12 +74,6 @@ public class RecentsActivityLaunchState {
            // If coming from another app, focus the next task
            return Math.max(0, numTasks - 2);
        } else {
            if (!launchState.launchedWithAltTab && debugFlags.isFastToggleRecentsEnabled()) {
                // If fast toggling, defer focusing until the next tap (which will automatically
                // focus the front most task)
                return -1;
            }

            // If coming from home, focus the front most task
            return numTasks - 1;
        }
Loading