Revert "Generating fake “to Recents” events for overview NOT from task"
This reverts commit d46e428706.
Reason for revert: Temporary revert for NL build
Change-Id: I0bb46d0fc56a12c642a0ea8610e7a86002a21ada
This commit is contained in:
@@ -24,7 +24,6 @@ import static com.android.launcher3.touch.SwipeDetector.VERTICAL;
|
||||
import static com.android.quickstep.TouchInteractionService.EDGE_NAV_BAR;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.metrics.LogMaker;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
@@ -35,40 +34,6 @@ import com.android.launcher3.dragndrop.DragLayer;
|
||||
import com.android.launcher3.util.VerticalSwipeController;
|
||||
import com.android.quickstep.RecentsView;
|
||||
|
||||
class EventLogTags {
|
||||
private EventLogTags() {
|
||||
} // don't instantiate
|
||||
|
||||
/** 524292 sysui_multi_action (content|4) */
|
||||
public static final int SYSUI_MULTI_ACTION = 524292;
|
||||
|
||||
public static void writeSysuiMultiAction(Object[] content) {
|
||||
android.util.EventLog.writeEvent(SYSUI_MULTI_ACTION, content);
|
||||
}
|
||||
}
|
||||
|
||||
class MetricsLogger {
|
||||
private static MetricsLogger sMetricsLogger;
|
||||
|
||||
private static MetricsLogger getLogger() {
|
||||
if (sMetricsLogger == null) {
|
||||
sMetricsLogger = new MetricsLogger();
|
||||
}
|
||||
return sMetricsLogger;
|
||||
}
|
||||
|
||||
protected void saveLog(Object[] rep) {
|
||||
EventLogTags.writeSysuiMultiAction(rep);
|
||||
}
|
||||
|
||||
public void write(LogMaker content) {
|
||||
if (content.getType() == 0/*MetricsEvent.TYPE_UNKNOWN*/) {
|
||||
content.setType(4/*MetricsEvent.TYPE_ACTION*/);
|
||||
}
|
||||
saveLog(content.serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extension of {@link VerticalSwipeController} to go from NORMAL to OVERVIEW.
|
||||
*/
|
||||
@@ -77,8 +42,6 @@ public class EdgeSwipeController extends VerticalSwipeController implements
|
||||
|
||||
private static final Rect sTempRect = new Rect();
|
||||
|
||||
private final MetricsLogger mMetricsLogger = new MetricsLogger();
|
||||
|
||||
public EdgeSwipeController(Launcher l) {
|
||||
super(l, NORMAL, OVERVIEW, l.getDeviceProfile().isVerticalBarLayout()
|
||||
? HORIZONTAL : VERTICAL);
|
||||
@@ -107,17 +70,6 @@ public class EdgeSwipeController extends VerticalSwipeController implements
|
||||
|
||||
@Override
|
||||
protected void onTransitionComplete(boolean wasFling, boolean stateChanged) {
|
||||
if (stateChanged && mToState instanceof OverviewState) {
|
||||
// Mimic ActivityMetricsLogger.logAppTransitionMultiEvents() logging for
|
||||
// "Recents" activity for app transition tests.
|
||||
final LogMaker builder = new LogMaker(761/*APP_TRANSITION*/);
|
||||
builder.setPackageName("com.android.systemui");
|
||||
builder.addTaggedData(871/*FIELD_CLASS_NAME*/,
|
||||
"com.android.systemui.recents.RecentsActivity");
|
||||
builder.addTaggedData(319/*APP_TRANSITION_DELAY_MS*/,
|
||||
0/* zero time */);
|
||||
mMetricsLogger.write(builder);
|
||||
}
|
||||
// TODO: Log something
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public abstract class VerticalSwipeController extends AnimatorListenerAdapter
|
||||
private boolean mNoIntercept;
|
||||
|
||||
private AnimatorPlaybackController mCurrentAnimation;
|
||||
protected LauncherState mToState;
|
||||
private LauncherState mToState;
|
||||
|
||||
private float mStartProgress;
|
||||
// Ratio of transition process [0, 1] to drag displacement (px)
|
||||
|
||||
Reference in New Issue
Block a user