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

Commit 279e1515 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Remove fake 319 event generation

Bug: 72967764
Test: Running perf tests
Change-Id: If012b0f8e964b9bcd5fb230e5a2232d27cea1dfd
parent 08cf36ea
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.util.SysuiEventLogger;

/**
 * Touch controller for handling edge swipes in landscape/seascape UI
@@ -75,7 +74,6 @@ public class LandscapeEdgeSwipeController extends AbstractStateChangeTouchContro
        super.onSwipeInteractionCompleted(targetState, logAction);
        if (mFromState == NORMAL && targetState == OVERVIEW) {
            RecentsModel.getInstance(mLauncher).onOverviewShown(true, TAG);
            SysuiEventLogger.writeDummyRecentsTransition(0);
        }
    }
}
+0 −2
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.TouchInteractionService;
import com.android.quickstep.util.SysuiEventLogger;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;

@@ -210,7 +209,6 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr
        super.onSwipeInteractionCompleted(targetState, logAction);
        if (mFromState == NORMAL && targetState == OVERVIEW) {
            RecentsModel.getInstance(mLauncher).onOverviewShown(true, TAG);
            SysuiEventLogger.writeDummyRecentsTransition(0);
        }
    }

+1 −5
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ import com.android.quickstep.ActivityControlHelper.FallbackActivityControllerHel
import com.android.quickstep.ActivityControlHelper.LauncherActivityControllerHelper;
import com.android.quickstep.util.ClipAnimationHelper;
import com.android.quickstep.util.RemoteAnimationTargetSet;
import com.android.quickstep.util.SysuiEventLogger;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.LatencyTrackerCompat;
@@ -229,10 +228,7 @@ public class OverviewCommandHelper {

            if (!handleCommand(elapsedTime)) {
                // Start overview
                if (mHelper.switchToRecentsIfVisible()) {
                    SysuiEventLogger.writeDummyRecentsTransition(0);
                    // Do nothing
                } else {
                if (!mHelper.switchToRecentsIfVisible()) {
                    mListener = mHelper.createActivityInitListener(this::onActivityReady);
                    mListener.registerAndStartActivity(overviewIntent, this::createWindowAnimation,
                            mContext, mMainThreadExecutor.getHandler(), RECENTS_LAUNCH_DURATION);
+0 −3
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ import com.android.quickstep.ActivityControlHelper.LayoutListener;
import com.android.quickstep.TouchConsumer.InteractionType;
import com.android.quickstep.util.ClipAnimationHelper;
import com.android.quickstep.util.RemoteAnimationTargetSet;
import com.android.quickstep.util.SysuiEventLogger;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -425,8 +424,6 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
        buildAnimationController();

        final long transitionDelay = mLauncherFrameDrawnTime - mTouchTimeMs;
        SysuiEventLogger.writeDummyRecentsTransition(transitionDelay);

        if (LatencyTrackerCompat.isEnabled(mContext)) {
            LatencyTrackerCompat.logToggleRecents((int) transitionDelay);
        }
+0 −47
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (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.
 */
package com.android.quickstep.util;

import android.metrics.LogMaker;
import android.util.EventLog;

/**
 * Utility class for writing logs on behalf of systemUI
 */
public class SysuiEventLogger {

    /** 524292 sysui_multi_action (content|4) */
    public static final int SYSUI_MULTI_ACTION = 524292;

    private static void write(LogMaker content) {
        if (content.getType() == 0/*MetricsEvent.TYPE_UNKNOWN*/) {
            content.setType(4/*MetricsEvent.TYPE_ACTION*/);
        }
        EventLog.writeEvent(SYSUI_MULTI_ACTION, content.serialize());
    }

    public static void writeDummyRecentsTransition(long transitionDelay) {
        // Mimic ActivityMetricsLogger.logAppTransitionMultiEvents() logging for
        // "Recents" activity for app transition tests for the app-to-recents case.
        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*/,
                transitionDelay);
        write(builder);
    }
}