From 84ef9e89ffae830250eb2c1adb24031868042747 Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Wed, 16 Aug 2023 15:20:57 -0700 Subject: Moving shared classes to common.pip package 2/N - PipUiEventLogger is moved to common package and converted to Kotlin Bug: 293306185 Test: makepush sysuig Test: m -j ArcSystemUI Merged-In: I76760cc2d158964d1ec83ce27944e62729368daa Change-Id: I76760cc2d158964d1ec83ce27944e62729368daa --- .../wm/shell/common/pip/PipUiEventLogger.kt | 125 +++++++++++++++++++ .../android/wm/shell/dagger/WMShellBaseModule.java | 13 ++ .../android/wm/shell/dagger/pip/Pip1Module.java | 2 +- .../wm/shell/dagger/pip/Pip1SharedModule.java | 10 -- .../android/wm/shell/dagger/pip/Pip2Module.java | 5 +- .../android/wm/shell/dagger/pip/TvPipModule.java | 2 +- .../com/android/wm/shell/pip/PipTaskOrganizer.java | 1 + .../com/android/wm/shell/pip/PipUiEventLogger.java | 135 --------------------- .../wm/shell/pip/phone/PhonePipMenuController.java | 2 +- .../shell/pip/phone/PipDismissTargetHandler.java | 2 +- .../android/wm/shell/pip/phone/PipMenuView.java | 2 +- .../shell/pip/phone/PipResizeGestureHandler.java | 2 +- .../wm/shell/pip/phone/PipTouchHandler.java | 2 +- .../wm/shell/pip/tv/TvPipTaskOrganizer.java | 2 +- .../android/wm/shell/pip/PipTaskOrganizerTest.java | 1 + .../pip/phone/PipResizeGestureHandlerTest.java | 2 +- .../wm/shell/pip/phone/PipTouchHandlerTest.java | 2 +- 17 files changed, 153 insertions(+), 157 deletions(-) create mode 100644 libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipUiEventLogger.kt delete mode 100644 libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUiEventLogger.java diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipUiEventLogger.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipUiEventLogger.kt new file mode 100644 index 000000000000..642dacc425d2 --- /dev/null +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipUiEventLogger.kt @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2023 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.wm.shell.common.pip + +import android.app.TaskInfo +import android.content.pm.PackageManager +import com.android.internal.logging.UiEvent +import com.android.internal.logging.UiEventLogger + +/** + * Helper class that ends PiP log to UiEvent, see also go/uievent + */ +class PipUiEventLogger( + private val mUiEventLogger: UiEventLogger, + private val mPackageManager: PackageManager +) { + private var mPackageName: String? = null + private var mPackageUid = INVALID_PACKAGE_UID + fun setTaskInfo(taskInfo: TaskInfo?) { + if (taskInfo?.topActivity != null) { + // safe because topActivity is guaranteed non-null here + mPackageName = taskInfo.topActivity!!.packageName + mPackageUid = getUid(mPackageName!!, taskInfo.userId) + } else { + mPackageName = null + mPackageUid = INVALID_PACKAGE_UID + } + } + + /** + * Sends log via UiEvent, reference go/uievent for how to debug locally + */ + fun log(event: PipUiEventEnum?) { + if (mPackageName == null || mPackageUid == INVALID_PACKAGE_UID) { + return + } + mUiEventLogger.log(event!!, mPackageUid, mPackageName) + } + + private fun getUid(packageName: String, userId: Int): Int { + var uid = INVALID_PACKAGE_UID + try { + uid = mPackageManager.getApplicationInfoAsUser( + packageName, 0 /* ApplicationInfoFlags */, userId + ).uid + } catch (e: PackageManager.NameNotFoundException) { + // do nothing. + } + return uid + } + + /** + * Enums for logging the PiP events to UiEvent + */ + enum class PipUiEventEnum(private val mId: Int) : UiEventLogger.UiEventEnum { + @UiEvent(doc = "Activity enters picture-in-picture mode") + PICTURE_IN_PICTURE_ENTER(603), + + @UiEvent(doc = "Activity enters picture-in-picture mode with auto-enter-pip API") + PICTURE_IN_PICTURE_AUTO_ENTER(1313), + + @UiEvent(doc = "Activity enters picture-in-picture mode from content-pip API") + PICTURE_IN_PICTURE_ENTER_CONTENT_PIP(1314), + + @UiEvent(doc = "Expands from picture-in-picture to fullscreen") + PICTURE_IN_PICTURE_EXPAND_TO_FULLSCREEN(604), + + @UiEvent(doc = "Removes picture-in-picture by tap close button") + PICTURE_IN_PICTURE_TAP_TO_REMOVE(605), + + @UiEvent(doc = "Removes picture-in-picture by drag to dismiss area") + PICTURE_IN_PICTURE_DRAG_TO_REMOVE(606), + + @UiEvent(doc = "Shows picture-in-picture menu") + PICTURE_IN_PICTURE_SHOW_MENU(607), + + @UiEvent(doc = "Hides picture-in-picture menu") + PICTURE_IN_PICTURE_HIDE_MENU(608), + + @UiEvent( + doc = "Changes the aspect ratio of picture-in-picture window. This is inherited" + + " from previous Tron-based logging and currently not in use." + ) + PICTURE_IN_PICTURE_CHANGE_ASPECT_RATIO(609), + + @UiEvent(doc = "User resize of the picture-in-picture window") + PICTURE_IN_PICTURE_RESIZE(610), + + @UiEvent(doc = "User unstashed picture-in-picture") + PICTURE_IN_PICTURE_STASH_UNSTASHED(709), + + @UiEvent(doc = "User stashed picture-in-picture to the left side") + PICTURE_IN_PICTURE_STASH_LEFT(710), + + @UiEvent(doc = "User stashed picture-in-picture to the right side") + PICTURE_IN_PICTURE_STASH_RIGHT(711), + + @UiEvent(doc = "User taps on the settings button in PiP menu") + PICTURE_IN_PICTURE_SHOW_SETTINGS(933), + + @UiEvent(doc = "Closes PiP with app-provided close action") + PICTURE_IN_PICTURE_CUSTOM_CLOSE(1058); + + override fun getId(): Int { + return mId + } + } + + companion object { + private const val INVALID_PACKAGE_UID = -1 + } +} \ No newline at end of file diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java index 1a84f4b41b57..8df89bc17621 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java @@ -20,6 +20,7 @@ import static com.android.wm.shell.onehanded.OneHandedController.SUPPORT_ONE_HAN import android.app.ActivityTaskManager; import android.content.Context; +import android.content.pm.PackageManager; import android.os.Handler; import android.os.SystemProperties; import android.view.IWindowManager; @@ -56,6 +57,7 @@ import com.android.wm.shell.common.annotations.ShellAnimationThread; import com.android.wm.shell.common.annotations.ShellBackgroundThread; import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.annotations.ShellSplashscreenThread; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.compatui.CompatUIConfiguration; import com.android.wm.shell.compatui.CompatUIController; import com.android.wm.shell.compatui.CompatUIShellCommandHandler; @@ -319,6 +321,17 @@ public abstract class WMShellBaseModule { return Optional.empty(); } + // + // PiP (optional feature) + // + + @WMSingleton + @Provides + static PipUiEventLogger providePipUiEventLogger(UiEventLogger uiEventLogger, + PackageManager packageManager) { + return new PipUiEventLogger(uiEventLogger, packageManager); + } + // // Bubbles (optional feature) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java index 9bf973f523bf..5fd4f24a0f0d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java @@ -32,6 +32,7 @@ import com.android.wm.shell.common.TaskStackListenerImpl; import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.pip.PhoneSizeSpecSource; import com.android.wm.shell.common.pip.PipAppOpsListener; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.SizeSpecSource; import com.android.wm.shell.dagger.WMShellBaseModule; import com.android.wm.shell.dagger.WMSingleton; @@ -49,7 +50,6 @@ import com.android.wm.shell.pip.PipTaskOrganizer; import com.android.wm.shell.pip.PipTransition; import com.android.wm.shell.pip.PipTransitionController; import com.android.wm.shell.pip.PipTransitionState; -import com.android.wm.shell.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipUtils; import com.android.wm.shell.pip.phone.PhonePipKeepClearAlgorithm; import com.android.wm.shell.pip.phone.PhonePipMenuController; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1SharedModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1SharedModule.java index e8fae2490bc5..55a810ae5c68 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1SharedModule.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1SharedModule.java @@ -17,15 +17,12 @@ package com.android.wm.shell.dagger.pip; import android.content.Context; -import android.content.pm.PackageManager; import android.os.Handler; -import com.android.internal.logging.UiEventLogger; import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.dagger.WMSingleton; import com.android.wm.shell.pip.PipMediaController; import com.android.wm.shell.pip.PipSurfaceTransactionHelper; -import com.android.wm.shell.pip.PipUiEventLogger; import dagger.Module; import dagger.Provides; @@ -49,11 +46,4 @@ public abstract class Pip1SharedModule { static PipSurfaceTransactionHelper providePipSurfaceTransactionHelper(Context context) { return new PipSurfaceTransactionHelper(context); } - - @WMSingleton - @Provides - static PipUiEventLogger providePipUiEventLogger(UiEventLogger uiEventLogger, - PackageManager packageManager) { - return new PipUiEventLogger(uiEventLogger, packageManager); - } } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java index c7c6e8a14278..8dec4ea542a0 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java @@ -18,6 +18,7 @@ package com.android.wm.shell.dagger.pip; import android.annotation.Nullable; +import com.android.wm.shell.dagger.WMShellBaseModule; import com.android.wm.shell.dagger.WMSingleton; import com.android.wm.shell.pip2.PipTransition; @@ -26,9 +27,9 @@ import dagger.Provides; /** * Provides dependencies from {@link com.android.wm.shell.pip2}, this implementation is meant to be - * the successor of its sibling {@link Pip1SharedModule}. + * the successor of its sibling {@link Pip1Module}. */ -@Module +@Module(includes = WMShellBaseModule.class) public abstract class Pip2Module { @WMSingleton @Provides diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/TvPipModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/TvPipModule.java index 80ffbb0968f3..4e332becb2f9 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/TvPipModule.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/TvPipModule.java @@ -30,6 +30,7 @@ import com.android.wm.shell.common.TaskStackListenerImpl; import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.pip.LegacySizeSpecSource; import com.android.wm.shell.common.pip.PipAppOpsListener; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.SizeSpecSource; import com.android.wm.shell.dagger.WMShellBaseModule; import com.android.wm.shell.dagger.WMSingleton; @@ -43,7 +44,6 @@ import com.android.wm.shell.pip.PipSurfaceTransactionHelper; import com.android.wm.shell.pip.PipTaskOrganizer; import com.android.wm.shell.pip.PipTransitionController; import com.android.wm.shell.pip.PipTransitionState; -import com.android.wm.shell.pip.PipUiEventLogger; import com.android.wm.shell.pip.tv.TvPipBoundsAlgorithm; import com.android.wm.shell.pip.tv.TvPipBoundsController; import com.android.wm.shell.pip.tv.TvPipBoundsState; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java index 19c60c2a9117..296857b196cf 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java @@ -82,6 +82,7 @@ import com.android.wm.shell.common.ScreenshotUtils; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.common.annotations.ShellMainThread; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.pip.phone.PipMotionHelper; import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.splitscreen.SplitScreenController; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUiEventLogger.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUiEventLogger.java deleted file mode 100644 index 3e5a19b69a59..000000000000 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipUiEventLogger.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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.wm.shell.pip; - -import android.app.TaskInfo; -import android.content.pm.PackageManager; - -import com.android.internal.logging.UiEvent; -import com.android.internal.logging.UiEventLogger; - -/** - * Helper class that ends PiP log to UiEvent, see also go/uievent - */ -public class PipUiEventLogger { - - private static final int INVALID_PACKAGE_UID = -1; - - private final UiEventLogger mUiEventLogger; - private final PackageManager mPackageManager; - - private String mPackageName; - private int mPackageUid = INVALID_PACKAGE_UID; - - public PipUiEventLogger(UiEventLogger uiEventLogger, PackageManager packageManager) { - mUiEventLogger = uiEventLogger; - mPackageManager = packageManager; - } - - public void setTaskInfo(TaskInfo taskInfo) { - if (taskInfo != null && taskInfo.topActivity != null) { - mPackageName = taskInfo.topActivity.getPackageName(); - mPackageUid = getUid(mPackageName, taskInfo.userId); - } else { - mPackageName = null; - mPackageUid = INVALID_PACKAGE_UID; - } - } - - /** - * Sends log via UiEvent, reference go/uievent for how to debug locally - */ - public void log(PipUiEventEnum event) { - if (mPackageName == null || mPackageUid == INVALID_PACKAGE_UID) { - return; - } - mUiEventLogger.log(event, mPackageUid, mPackageName); - } - - private int getUid(String packageName, int userId) { - int uid = INVALID_PACKAGE_UID; - try { - uid = mPackageManager.getApplicationInfoAsUser( - packageName, 0 /* ApplicationInfoFlags */, userId).uid; - } catch (PackageManager.NameNotFoundException e) { - // do nothing. - } - return uid; - } - - /** - * Enums for logging the PiP events to UiEvent - */ - public enum PipUiEventEnum implements UiEventLogger.UiEventEnum { - @UiEvent(doc = "Activity enters picture-in-picture mode") - PICTURE_IN_PICTURE_ENTER(603), - - @UiEvent(doc = "Activity enters picture-in-picture mode with auto-enter-pip API") - PICTURE_IN_PICTURE_AUTO_ENTER(1313), - - @UiEvent(doc = "Activity enters picture-in-picture mode from content-pip API") - PICTURE_IN_PICTURE_ENTER_CONTENT_PIP(1314), - - @UiEvent(doc = "Expands from picture-in-picture to fullscreen") - PICTURE_IN_PICTURE_EXPAND_TO_FULLSCREEN(604), - - @UiEvent(doc = "Removes picture-in-picture by tap close button") - PICTURE_IN_PICTURE_TAP_TO_REMOVE(605), - - @UiEvent(doc = "Removes picture-in-picture by drag to dismiss area") - PICTURE_IN_PICTURE_DRAG_TO_REMOVE(606), - - @UiEvent(doc = "Shows picture-in-picture menu") - PICTURE_IN_PICTURE_SHOW_MENU(607), - - @UiEvent(doc = "Hides picture-in-picture menu") - PICTURE_IN_PICTURE_HIDE_MENU(608), - - @UiEvent(doc = "Changes the aspect ratio of picture-in-picture window. This is inherited" - + " from previous Tron-based logging and currently not in use.") - PICTURE_IN_PICTURE_CHANGE_ASPECT_RATIO(609), - - @UiEvent(doc = "User resize of the picture-in-picture window") - PICTURE_IN_PICTURE_RESIZE(610), - - @UiEvent(doc = "User unstashed picture-in-picture") - PICTURE_IN_PICTURE_STASH_UNSTASHED(709), - - @UiEvent(doc = "User stashed picture-in-picture to the left side") - PICTURE_IN_PICTURE_STASH_LEFT(710), - - @UiEvent(doc = "User stashed picture-in-picture to the right side") - PICTURE_IN_PICTURE_STASH_RIGHT(711), - - @UiEvent(doc = "User taps on the settings button in PiP menu") - PICTURE_IN_PICTURE_SHOW_SETTINGS(933), - - @UiEvent(doc = "Closes PiP with app-provided close action") - PICTURE_IN_PICTURE_CUSTOM_CLOSE(1058); - - private final int mId; - - PipUiEventEnum(int id) { - mId = id; - } - - @Override - public int getId() { - return mId; - } - } -} diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java index 5e1b6becfa45..c93d85016df6 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java @@ -38,12 +38,12 @@ import android.view.WindowManagerGlobal; import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SystemWindows; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipBoundsState; import com.android.wm.shell.pip.PipMediaController; import com.android.wm.shell.pip.PipMediaController.ActionListener; import com.android.wm.shell.pip.PipMenuController; import com.android.wm.shell.pip.PipSurfaceTransactionHelper; -import com.android.wm.shell.pip.PipUiEventLogger; import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.splitscreen.SplitScreenController; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java index da455f85d908..4e75847b6bc0 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipDismissTargetHandler.java @@ -38,7 +38,7 @@ import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.bubbles.DismissCircleView; import com.android.wm.shell.common.bubbles.DismissView; import com.android.wm.shell.common.magnetictarget.MagnetizedObject; -import com.android.wm.shell.pip.PipUiEventLogger; +import com.android.wm.shell.common.pip.PipUiEventLogger; import kotlin.Unit; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java index 779c539a2097..837426ae3aab 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java @@ -66,7 +66,7 @@ import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.R; import com.android.wm.shell.animation.Interpolators; import com.android.wm.shell.common.ShellExecutor; -import com.android.wm.shell.pip.PipUiEventLogger; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipUtils; import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.splitscreen.SplitScreenController; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java index abe2db094a5c..4e687dda4e77 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipResizeGestureHandler.java @@ -46,11 +46,11 @@ import androidx.annotation.VisibleForTesting; import com.android.internal.policy.TaskResizingAlgorithm; import com.android.wm.shell.R; import com.android.wm.shell.common.ShellExecutor; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipAnimationController; import com.android.wm.shell.pip.PipBoundsAlgorithm; import com.android.wm.shell.pip.PipBoundsState; import com.android.wm.shell.pip.PipTaskOrganizer; -import com.android.wm.shell.pip.PipUiEventLogger; import java.io.PrintWriter; import java.util.function.Consumer; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java index ab65c9ebe7e5..eda3a0cdac86 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java @@ -51,13 +51,13 @@ import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.R; import com.android.wm.shell.common.FloatingContentCoordinator; import com.android.wm.shell.common.ShellExecutor; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.SizeSpecSource; import com.android.wm.shell.pip.PipAnimationController; import com.android.wm.shell.pip.PipBoundsAlgorithm; import com.android.wm.shell.pip.PipBoundsState; import com.android.wm.shell.pip.PipTaskOrganizer; import com.android.wm.shell.pip.PipTransitionController; -import com.android.wm.shell.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipUtils; import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.sysui.ShellInit; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipTaskOrganizer.java index 4819f665d6d3..dbec607c2ae9 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipTaskOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipTaskOrganizer.java @@ -25,6 +25,7 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SyncTransactionQueue; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipAnimationController; import com.android.wm.shell.pip.PipBoundsAlgorithm; import com.android.wm.shell.pip.PipBoundsState; @@ -35,7 +36,6 @@ import com.android.wm.shell.pip.PipSurfaceTransactionHelper; import com.android.wm.shell.pip.PipTaskOrganizer; import com.android.wm.shell.pip.PipTransitionController; import com.android.wm.shell.pip.PipTransitionState; -import com.android.wm.shell.pip.PipUiEventLogger; import com.android.wm.shell.pip.PipUtils; import com.android.wm.shell.splitscreen.SplitScreenController; diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/PipTaskOrganizerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/PipTaskOrganizerTest.java index 1e3fe421140a..248d66590542 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/PipTaskOrganizerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/PipTaskOrganizerTest.java @@ -53,6 +53,7 @@ import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.common.pip.PhoneSizeSpecSource; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.SizeSpecSource; import com.android.wm.shell.pip.phone.PhonePipMenuController; import com.android.wm.shell.splitscreen.SplitScreenController; diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipResizeGestureHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipResizeGestureHandlerTest.java index 689b5c5a708c..12b4f3e50f32 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipResizeGestureHandlerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipResizeGestureHandlerTest.java @@ -37,6 +37,7 @@ import com.android.wm.shell.ShellTestCase; import com.android.wm.shell.common.FloatingContentCoordinator; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.pip.PhoneSizeSpecSource; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.SizeSpecSource; import com.android.wm.shell.pip.PipBoundsAlgorithm; import com.android.wm.shell.pip.PipBoundsState; @@ -45,7 +46,6 @@ import com.android.wm.shell.pip.PipKeepClearAlgorithmInterface; import com.android.wm.shell.pip.PipSnapAlgorithm; import com.android.wm.shell.pip.PipTaskOrganizer; import com.android.wm.shell.pip.PipTransitionController; -import com.android.wm.shell.pip.PipUiEventLogger; import org.junit.Before; import org.junit.Test; diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipTouchHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipTouchHandlerTest.java index 852183cbcbac..96b130c6bd85 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipTouchHandlerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipTouchHandlerTest.java @@ -34,6 +34,7 @@ import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.FloatingContentCoordinator; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.pip.PhoneSizeSpecSource; +import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.SizeSpecSource; import com.android.wm.shell.pip.PipBoundsAlgorithm; import com.android.wm.shell.pip.PipBoundsState; @@ -42,7 +43,6 @@ import com.android.wm.shell.pip.PipKeepClearAlgorithmInterface; import com.android.wm.shell.pip.PipSnapAlgorithm; import com.android.wm.shell.pip.PipTaskOrganizer; import com.android.wm.shell.pip.PipTransitionController; -import com.android.wm.shell.pip.PipUiEventLogger; import com.android.wm.shell.sysui.ShellInit; import org.junit.Before; -- cgit v1.2.3-59-g8ed1b