diff --git a/protos/launcher_log.proto b/protos/launcher_log.proto index 06e6a923d4..41dd0bda4f 100644 --- a/protos/launcher_log.proto +++ b/protos/launcher_log.proto @@ -184,8 +184,8 @@ message LauncherEvent { optional int64 elapsed_container_millis = 5; optional int64 elapsed_session_millis = 6; - optional bool is_in_multi_window_mode = 7; - optional bool is_in_landscape_mode = 8; + optional bool is_in_multi_window_mode = 7 [deprecated = true]; + optional bool is_in_landscape_mode = 8 [deprecated = true]; optional LauncherEventExtension extension = 9; } diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java index 5d4d2c8f3d..7c6eb32591 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java @@ -49,7 +49,6 @@ import android.view.ViewConfiguration; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BaseDraggingActivity; -import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.logging.UserEventDispatcher; @@ -198,9 +197,7 @@ public class OverviewCommandHelper { public void onTip(int actionType, int viewType) { mMainThreadExecutor.execute(() -> - UserEventDispatcher.newInstance(mContext, - InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext)) - .logActionTip(actionType, viewType)); + UserEventDispatcher.newInstance(mContext).logActionTip(actionType, viewType)); } public ActivityControlHelper getActivityControlHelper() { diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java index 793def99f8..f5202d096c 100644 --- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java @@ -754,7 +754,7 @@ public class WindowTransformSwipeHandler { } int dstContainerType = toLauncher ? ContainerType.TASKSWITCHER : ContainerType.APP; - UserEventDispatcher.newInstance(mContext, dp).logStateChangeAction( + UserEventDispatcher.newInstance(mContext).logStateChangeAction( mLogAction, direction, ContainerType.NAVBAR, ContainerType.APP, dstContainerType, diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java index a4b6f5b056..fd69377b61 100644 --- a/src/com/android/launcher3/BaseActivity.java +++ b/src/com/android/launcher3/BaseActivity.java @@ -107,7 +107,7 @@ public abstract class BaseActivity extends Activity implements UserEventDelegate public final UserEventDispatcher getUserEventDispatcher() { if (mUserEventDispatcher == null) { - mUserEventDispatcher = UserEventDispatcher.newInstance(this, mDeviceProfile, this); + mUserEventDispatcher = UserEventDispatcher.newInstance(this, this); } return mUserEventDispatcher; } diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java index d9d3f6821d..7087fdb786 100644 --- a/src/com/android/launcher3/logging/UserEventDispatcher.java +++ b/src/com/android/launcher3/logging/UserEventDispatcher.java @@ -37,7 +37,6 @@ import android.util.Log; import android.view.View; import android.view.ViewParent; -import com.android.launcher3.DeviceProfile; import com.android.launcher3.DropTarget; import com.android.launcher3.ItemInfo; import com.android.launcher3.R; @@ -71,7 +70,7 @@ public class UserEventDispatcher implements ResourceBasedOverride { FeatureFlags.IS_DOGFOOD_BUILD && Utilities.isPropertyEnabled(LogConfig.USEREVENT); private static final String UUID_STORAGE = "uuid"; - public static UserEventDispatcher newInstance(Context context, DeviceProfile dp, + public static UserEventDispatcher newInstance(Context context, UserEventDelegate delegate) { SharedPreferences sharedPrefs = Utilities.getDevicePrefs(context); String uuidStr = sharedPrefs.getString(UUID_STORAGE, null); @@ -82,15 +81,13 @@ public class UserEventDispatcher implements ResourceBasedOverride { UserEventDispatcher ued = Overrides.getObject(UserEventDispatcher.class, context.getApplicationContext(), R.string.user_event_dispatcher_class); ued.mDelegate = delegate; - ued.mIsInLandscapeMode = dp.isVerticalBarLayout(); - ued.mIsInMultiWindowMode = dp.isMultiWindowMode; ued.mUuidStr = uuidStr; ued.mInstantAppResolver = InstantAppResolver.newInstance(context); return ued; } - public static UserEventDispatcher newInstance(Context context, DeviceProfile dp) { - return newInstance(context, dp, null); + public static UserEventDispatcher newInstance(Context context) { + return newInstance(context, null); } public interface UserEventDelegate { @@ -140,8 +137,6 @@ public class UserEventDispatcher implements ResourceBasedOverride { private long mElapsedContainerMillis; private long mElapsedSessionMillis; private long mActionDurationMillis; - private boolean mIsInMultiWindowMode; - private boolean mIsInLandscapeMode; private String mUuidStr; protected InstantAppResolver mInstantAppResolver; private boolean mAppOrTaskLaunch; @@ -435,8 +430,6 @@ public class UserEventDispatcher implements ResourceBasedOverride { public void dispatchUserEvent(LauncherEvent ev, Intent intent) { mAppOrTaskLaunch = false; - ev.isInLandscapeMode = mIsInLandscapeMode; - ev.isInMultiWindowMode = mIsInMultiWindowMode; ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis; ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis; @@ -456,8 +449,6 @@ public class UserEventDispatcher implements ResourceBasedOverride { ev.elapsedContainerMillis, ev.elapsedSessionMillis, ev.actionDurationMillis); - log += "\n isInLandscapeMode " + ev.isInLandscapeMode; - log += "\n isInMultiWindowMode " + ev.isInMultiWindowMode; log += "\n\n"; Log.d(TAG, log); }