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

Commit 1505d2f2 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Revert "Use UiEvent for constants inside StatsLogManager"

This reverts commit 6b99a7d3.

Reason for revert: Launcher3 AOSP cannot link to uieventloggerlib because it's private API

Change-Id: Id652b8a4cba54b97d1d8b8644c2939903cc0e88a
parent 6b99a7d3
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -32,8 +32,7 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \

LOCAL_STATIC_JAVA_LIBRARIES := \
    LauncherPluginLib \
    launcher_log_protos_lite \
    uieventloggerlib
    launcher_log_protos_lite

LOCAL_SRC_FILES := \
    $(call all-proto-files-under, protos) \
@@ -131,10 +130,8 @@ LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUISharedLib \
    SystemUI-statsd \
    launcherprotosnano \
    launcher_log_protos_lite

ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
@@ -205,10 +202,8 @@ LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUISharedLib \
    SystemUI-statsd \
    launcherprotosnano \
    launcher_log_protos_lite

ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
+4 −6
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_DISMISS_SWIPE_UP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_SWIPE_DOWN;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.TASK_DISMISS_SWIPE_UP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.TASK_LAUNCH_SWIPE_DOWN;
import static com.android.launcher3.statehandlers.DepthController.DEPTH;
import static com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController.SUCCESS_TRANSITION_PROGRESS;
import static com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch.TAP;
@@ -1279,8 +1279,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
            ComponentKey compKey = TaskUtils.getLaunchComponentKeyForTask(taskView.getTask().key);
            mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
                    endState.logAction, Direction.UP, index, compKey);
            mActivity.getStatsLogManager().log(LAUNCHER_TASK_DISMISS_SWIPE_UP,
                    taskView.buildProto());
            mActivity.getStatsLogManager().log(TASK_DISMISS_SWIPE_UP, taskView.buildProto());
        }
    }

@@ -1830,8 +1829,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
                    mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
                            endState.logAction, Direction.DOWN, indexOfChild(tv),
                            TaskUtils.getLaunchComponentKeyForTask(task.key));
                    mActivity.getStatsLogManager().log(LAUNCHER_TASK_LAUNCH_SWIPE_DOWN,
                            tv.buildProto()
                    mActivity.getStatsLogManager().log(TASK_LAUNCH_SWIPE_DOWN, tv.buildProto()
                    );
                }
            } else {
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.TASK_LAUNCH_TAP;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -209,7 +209,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
            mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
                    Touch.TAP, Direction.NONE, getRecentsView().indexOfChild(this),
                    TaskUtils.getLaunchComponentKeyForTask(getTask().key));
            mActivity.getStatsLogManager().log(LAUNCHER_TASK_LAUNCH_TAP, buildProto());
            mActivity.getStatsLogManager().log(TASK_LAUNCH_TAP, buildProto());
        });
        mCornerRadius = TaskCornerRadius.get(context);
        mWindowCornerRadius = QuickStepContract.getWindowCornerRadius(context.getResources());
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.launcher3;

import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.APP_LAUNCH_TAP;
import static com.android.launcher3.util.DefaultDisplay.CHANGE_ROTATION;

import android.app.ActivityOptions;
@@ -182,7 +182,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
                        sourceContainer);
            }
            getUserEventDispatcher().logAppLaunch(v, intent, user);
            getStatsLogManager().log(LAUNCHER_APP_LAUNCH_TAP, item.buildProto(null, null));
            getStatsLogManager().log(APP_LAUNCH_TAP, item.buildProto(null, null));
            return true;
        } catch (NullPointerException|ActivityNotFoundException|SecurityException e) {
            Toast.makeText(this, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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.launcher3.logging;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.SOURCE;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

@Retention(SOURCE)
@Target(FIELD)
public @interface LauncherUiEvent {
    /** An explanation, suitable for Android analysts, of the UI event that this log represents. */
    String doc();
}
Loading