Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -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. * 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(); SystemServicesProxy ssp = Recents.getSystemServices(); if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { // If we have a focused Task, launch that Task now // If we have a focused Task, launch that Task now if (mRecentsView.launchFocusedTask()) return true; if (mRecentsView.launchFocusedTask(logCategory)) return true; } } return false; return false; } } Loading @@ -270,7 +270,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD SystemServicesProxy ssp = Recents.getSystemServices(); SystemServicesProxy ssp = Recents.getSystemServices(); if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { // If we have a focused Task, launch that Task now // 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 // If none of the other cases apply, then just go Home dismissRecentsToHome(true /* animateTaskViews */); dismissRecentsToHome(true /* animateTaskViews */); return true; return true; Loading Loading @@ -360,7 +360,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { @Override @Override public void run() { public void run() { dismissRecentsToFocusedTask(); dismissRecentsToFocusedTask(MetricsEvent.OVERVIEW_SELECT_TIMEOUT); } } }); }); Loading Loading @@ -634,7 +634,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD // Focus the next task // Focus the next task EventBus.getDefault().send(new FocusNextTaskViewEvent(timerIndicatorDuration)); EventBus.getDefault().send(new FocusNextTaskViewEvent(timerIndicatorDuration)); MetricsLogger.action(this, MetricsEvent.ACTION_OVERVIEW_PAGE); MetricsLogger.action(this, MetricsEvent.OVERVIEW_PAGE); } } } } Loading packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class RecentsHistoryAdapter extends RecyclerView.Adapter<RecentsHistoryAd ssp.startActivityFromRecents(v.getContext(), task.key.id, task.title, ssp.startActivityFromRecents(v.getContext(), task.key.id, task.title, ActivityOptions.makeBasic()); ActivityOptions.makeBasic()); MetricsLogger.action(v.getContext(), MetricsEvent.ACTION_OVERVIEW_SELECT, MetricsLogger.action(v.getContext(), MetricsEvent.OVERVIEW_SELECT, task.key.getComponent().toString()); task.key.getComponent().toString()); } } Loading packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryItemTouchCallbacks.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.support.v7.widget.RecyclerView; import android.support.v7.widget.helper.ItemTouchHelper; import android.support.v7.widget.helper.ItemTouchHelper; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.systemui.recents.Constants; import com.android.systemui.recents.Constants; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.ui.DeleteTaskDataEvent; import com.android.systemui.recents.events.ui.DeleteTaskDataEvent; Loading Loading @@ -72,6 +73,8 @@ public class RecentsHistoryItemTouchCallbacks extends ItemTouchHelper.SimpleCall // Keep track of deletions by swiping within history // Keep track of deletions by swiping within history MetricsLogger.histogram(mContext, "overview_task_dismissed_source", MetricsLogger.histogram(mContext, "overview_task_dismissed_source", Constants.Metrics.DismissSourceHistorySwipeGesture); Constants.Metrics.DismissSourceHistorySwipeGesture); MetricsLogger.action(mContext, MetricsEvent.OVERVIEW_DISMISS, taskRow.task.key.getComponent().toString()); } } } } } } packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -248,13 +248,18 @@ public class RecentsView extends FrameLayout { } } /** Launches the focused task from the first stack if possible */ /** Launches the focused task from the first stack if possible */ public boolean launchFocusedTask() { public boolean launchFocusedTask(int logEvent) { if (mTaskStackView != null) { if (mTaskStackView != null) { Task task = mTaskStackView.getFocusedTask(); Task task = mTaskStackView.getFocusedTask(); if (task != null) { if (task != null) { TaskView taskView = mTaskStackView.getChildViewForTask(task); TaskView taskView = mTaskStackView.getChildViewForTask(task); EventBus.getDefault().send(new LaunchTaskEvent(taskView, task, null, EventBus.getDefault().send(new LaunchTaskEvent(taskView, task, null, INVALID_STACK_ID, false)); INVALID_STACK_ID, false)); if (logEvent != 0) { MetricsLogger.action(getContext(), logEvent, task.key.getComponent().toString()); } return true; return true; } } } } Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.FrameLayout; import android.widget.FrameLayout; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.systemui.Interpolators; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.R; import com.android.systemui.recents.Recents; import com.android.systemui.recents.Recents; Loading Loading @@ -1601,6 +1603,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal public final void onBusEvent(TaskViewDismissedEvent event) { public final void onBusEvent(TaskViewDismissedEvent event) { removeTaskViewFromStack(event.taskView, event.task); removeTaskViewFromStack(event.taskView, event.task); EventBus.getDefault().send(new DeleteTaskDataEvent(event.task)); EventBus.getDefault().send(new DeleteTaskDataEvent(event.task)); MetricsLogger.action(getContext(), MetricsEvent.OVERVIEW_DISMISS, event.task.key.getComponent().toString()); } } public final void onBusEvent(FocusNextTaskViewEvent event) { public final void onBusEvent(FocusNextTaskViewEvent event) { Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -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. * 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(); SystemServicesProxy ssp = Recents.getSystemServices(); if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { // If we have a focused Task, launch that Task now // If we have a focused Task, launch that Task now if (mRecentsView.launchFocusedTask()) return true; if (mRecentsView.launchFocusedTask(logCategory)) return true; } } return false; return false; } } Loading @@ -270,7 +270,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD SystemServicesProxy ssp = Recents.getSystemServices(); SystemServicesProxy ssp = Recents.getSystemServices(); if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { if (ssp.isRecentsTopMost(ssp.getTopMostTask(), null)) { // If we have a focused Task, launch that Task now // 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 // If none of the other cases apply, then just go Home dismissRecentsToHome(true /* animateTaskViews */); dismissRecentsToHome(true /* animateTaskViews */); return true; return true; Loading Loading @@ -360,7 +360,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { @Override @Override public void run() { public void run() { dismissRecentsToFocusedTask(); dismissRecentsToFocusedTask(MetricsEvent.OVERVIEW_SELECT_TIMEOUT); } } }); }); Loading Loading @@ -634,7 +634,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD // Focus the next task // Focus the next task EventBus.getDefault().send(new FocusNextTaskViewEvent(timerIndicatorDuration)); EventBus.getDefault().send(new FocusNextTaskViewEvent(timerIndicatorDuration)); MetricsLogger.action(this, MetricsEvent.ACTION_OVERVIEW_PAGE); MetricsLogger.action(this, MetricsEvent.OVERVIEW_PAGE); } } } } Loading
packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class RecentsHistoryAdapter extends RecyclerView.Adapter<RecentsHistoryAd ssp.startActivityFromRecents(v.getContext(), task.key.id, task.title, ssp.startActivityFromRecents(v.getContext(), task.key.id, task.title, ActivityOptions.makeBasic()); ActivityOptions.makeBasic()); MetricsLogger.action(v.getContext(), MetricsEvent.ACTION_OVERVIEW_SELECT, MetricsLogger.action(v.getContext(), MetricsEvent.OVERVIEW_SELECT, task.key.getComponent().toString()); task.key.getComponent().toString()); } } Loading
packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryItemTouchCallbacks.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.support.v7.widget.RecyclerView; import android.support.v7.widget.helper.ItemTouchHelper; import android.support.v7.widget.helper.ItemTouchHelper; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.systemui.recents.Constants; import com.android.systemui.recents.Constants; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.ui.DeleteTaskDataEvent; import com.android.systemui.recents.events.ui.DeleteTaskDataEvent; Loading Loading @@ -72,6 +73,8 @@ public class RecentsHistoryItemTouchCallbacks extends ItemTouchHelper.SimpleCall // Keep track of deletions by swiping within history // Keep track of deletions by swiping within history MetricsLogger.histogram(mContext, "overview_task_dismissed_source", MetricsLogger.histogram(mContext, "overview_task_dismissed_source", Constants.Metrics.DismissSourceHistorySwipeGesture); Constants.Metrics.DismissSourceHistorySwipeGesture); MetricsLogger.action(mContext, MetricsEvent.OVERVIEW_DISMISS, taskRow.task.key.getComponent().toString()); } } } } } }
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -248,13 +248,18 @@ public class RecentsView extends FrameLayout { } } /** Launches the focused task from the first stack if possible */ /** Launches the focused task from the first stack if possible */ public boolean launchFocusedTask() { public boolean launchFocusedTask(int logEvent) { if (mTaskStackView != null) { if (mTaskStackView != null) { Task task = mTaskStackView.getFocusedTask(); Task task = mTaskStackView.getFocusedTask(); if (task != null) { if (task != null) { TaskView taskView = mTaskStackView.getChildViewForTask(task); TaskView taskView = mTaskStackView.getChildViewForTask(task); EventBus.getDefault().send(new LaunchTaskEvent(taskView, task, null, EventBus.getDefault().send(new LaunchTaskEvent(taskView, task, null, INVALID_STACK_ID, false)); INVALID_STACK_ID, false)); if (logEvent != 0) { MetricsLogger.action(getContext(), logEvent, task.key.getComponent().toString()); } return true; return true; } } } } Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.FrameLayout; import android.widget.FrameLayout; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.systemui.Interpolators; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.R; import com.android.systemui.recents.Recents; import com.android.systemui.recents.Recents; Loading Loading @@ -1601,6 +1603,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal public final void onBusEvent(TaskViewDismissedEvent event) { public final void onBusEvent(TaskViewDismissedEvent event) { removeTaskViewFromStack(event.taskView, event.task); removeTaskViewFromStack(event.taskView, event.task); EventBus.getDefault().send(new DeleteTaskDataEvent(event.task)); EventBus.getDefault().send(new DeleteTaskDataEvent(event.task)); MetricsLogger.action(getContext(), MetricsEvent.OVERVIEW_DISMISS, event.task.key.getComponent().toString()); } } public final void onBusEvent(FocusNextTaskViewEvent event) { public final void onBusEvent(FocusNextTaskViewEvent event) { Loading