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

Commit bbeb3848 authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge changes I1eda3134,Ia7ad36a3 into nyc-dev

am: e65db9b9

* commit 'e65db9b9':
  Updating paging animation to spec.
  Adding logging for timeout and other features.
parents 6eae39d1 e65db9b9
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -240,11 +240,11 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
    /**
     * Dismisses recents if we are already visible and the intent is to toggle the recents view.
     */
    boolean dismissRecentsToFocusedTask() {
    boolean dismissRecentsToFocusedTask(int logCategory) {
        SystemServicesProxy ssp = Recents.getSystemServices();
        if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) {
            // If we have a focused Task, launch that Task now
            if (mRecentsView.launchFocusedTask()) return true;
            if (mRecentsView.launchFocusedTask(logCategory)) return true;
        }
        return false;
    }
@@ -270,7 +270,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        SystemServicesProxy ssp = Recents.getSystemServices();
        if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) {
            // If we have a focused Task, launch that Task now
            if (mRecentsView.launchFocusedTask()) return true;
            if (mRecentsView.launchFocusedTask(0 /* logCategory */)) return true;
            // If none of the other cases apply, then just go Home
            dismissRecentsToHome(true /* animateTaskViews */);
            return true;
@@ -360,7 +360,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() {
            @Override
            public void run() {
                dismissRecentsToFocusedTask();
                dismissRecentsToFocusedTask(MetricsEvent.OVERVIEW_SELECT_TIMEOUT);
            }
        });

@@ -634,7 +634,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
            // Focus the next task
            EventBus.getDefault().send(new FocusNextTaskViewEvent(timerIndicatorDuration));

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

+3 −2
Original line number Diff line number Diff line
@@ -66,8 +66,9 @@ public class RecentsActivityLaunchState {
     */
    public int getInitialFocusTaskIndex(int numTasks) {
        RecentsDebugFlags debugFlags = Recents.getDebugFlags();
        RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
        if (launchedFromAppWithThumbnail) {
            if (debugFlags.isFastToggleRecentsEnabled()) {
            if (!launchState.launchedWithAltTab && debugFlags.isFastToggleRecentsEnabled()) {
                // If fast toggling, focus the front most task so that the next tap will focus the
                // N-1 task
                return numTasks - 1;
@@ -76,7 +77,7 @@ public class RecentsActivityLaunchState {
            // If coming from another app, focus the next task
            return numTasks - 2;
        } else {
            if (debugFlags.isFastToggleRecentsEnabled()) {
            if (!launchState.launchedWithAltTab && debugFlags.isFastToggleRecentsEnabled()) {
                // If fast toggling, defer focusing until the next tap (which will automatically
                // focus the front most task)
                return -1;
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ public class RecentsHistoryAdapter extends RecyclerView.Adapter<RecentsHistoryAd
            ssp.startActivityFromRecents(v.getContext(), task.key.id, task.title,
                    ActivityOptions.makeBasic());

            MetricsLogger.action(v.getContext(), MetricsEvent.ACTION_OVERVIEW_SELECT,
            MetricsLogger.action(v.getContext(), MetricsEvent.OVERVIEW_SELECT,
                    task.key.getComponent().toString());
        }

+3 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;

import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.ui.DeleteTaskDataEvent;
@@ -72,6 +73,8 @@ public class RecentsHistoryItemTouchCallbacks extends ItemTouchHelper.SimpleCall
            // Keep track of deletions by swiping within history
            MetricsLogger.histogram(mContext, "overview_task_dismissed_source",
                    Constants.Metrics.DismissSourceHistorySwipeGesture);
            MetricsLogger.action(mContext, MetricsEvent.OVERVIEW_DISMISS,
                    taskRow.task.key.getComponent().toString());
        }
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ public class Utilities {
                }
            };

    public static final RectFEvaluator RECTF_EVALUATOR = new RectFEvaluator();

    /**
     * @return the first parent walking up the view hierarchy that has the given class type.
     *
Loading