Loading libs/WindowManager/Shell/src/com/android/wm/shell/apptoweb/OpenByDefaultDialog.kt +1 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ import kotlinx.coroutines.withContext */ internal class OpenByDefaultDialog( private val context: Context, private val userContext: Context, private val taskInfo: RunningTaskInfo, private val taskSurface: SurfaceControl, private val displayController: DisplayController, Loading @@ -76,7 +75,7 @@ internal class OpenByDefaultDialog( private lateinit var openInBrowserButton: RadioButton private val domainVerificationManager = userContext.getSystemService(DomainVerificationManager::class.java)!! context.getSystemService(DomainVerificationManager::class.java)!! private val packageName = taskInfo.baseActivity?.packageName!! private var loadAppInfoJob: Job? = null Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +2 −3 Original line number Diff line number Diff line Loading @@ -1234,8 +1234,7 @@ public abstract class WMShellModule { Optional<CompatUIHandler> compatUI, DesksOrganizer desksOrganizer, ShellDesktopState shelldesktopState, DesktopConfig desktopConfig, UserProfileContexts userProfileContexts DesktopConfig desktopConfig ) { if (!shelldesktopState.canEnterDesktopModeOrShowAppHandle()) { return Optional.empty(); Loading @@ -1254,7 +1253,7 @@ public abstract class WMShellModule { desktopModeUiEventLogger, taskResourceLoader, recentsTransitionHandler, desktopModeCompatPolicy, desktopTilingDecorViewModel, multiDisplayDragMoveIndicatorController, compatUI.orElse(null), desksOrganizer, shelldesktopState, desktopConfig, userProfileContexts)); desksOrganizer, shelldesktopState, desktopConfig)); } @WMSingleton Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +4 −10 Original line number Diff line number Diff line Loading @@ -107,7 +107,6 @@ import com.android.wm.shell.common.MultiDisplayDragMoveIndicatorController; import com.android.wm.shell.common.MultiInstanceHelper; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.common.UserProfileContexts; import com.android.wm.shell.compatui.CompatUIController; import com.android.wm.shell.compatui.api.CompatUIHandler; import com.android.wm.shell.compatui.impl.CompatUIRequests; Loading Loading @@ -263,7 +262,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, private final MultiDisplayDragMoveIndicatorController mMultiDisplayDragMoveIndicatorController; private final LatencyTracker mLatencyTracker; private final CompatUIHandler mCompatUI; private final UserProfileContexts mUserProfileContexts; public DesktopModeWindowDecorViewModel( Context context, Loading Loading @@ -308,8 +306,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, ShellDesktopState shellDesktopState, DesktopConfig desktopConfig, UserProfileContexts userProfileContexts) { DesktopConfig desktopConfig) { this( context, shellExecutor, Loading Loading @@ -360,8 +357,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, compatUI, desksOrganizer, shellDesktopState, desktopConfig, userProfileContexts); desktopConfig); } @VisibleForTesting Loading Loading @@ -415,8 +411,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, ShellDesktopState shellDesktopState, DesktopConfig desktopConfig, UserProfileContexts userProfileContexts) { DesktopConfig desktopConfig) { mContext = context; mMainExecutor = shellExecutor; mMainHandler = mainHandler; Loading Loading @@ -458,7 +453,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, mAssistContentRequester = assistContentRequester; mWindowDecorViewHostSupplier = windowDecorViewHostSupplier; mCompatUI = compatUI; mUserProfileContexts = userProfileContexts; mOnDisplayChangingListener = (displayId, fromRotation, toRotation, displayAreaInfo, t) -> { DesktopModeWindowDecoration decoration; RunningTaskInfo taskInfo; Loading Loading @@ -1917,7 +1911,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, DesktopExperienceFlags.ENABLE_BUG_FIXES_FOR_SECONDARY_DISPLAY.isTrue() ? mDisplayController.getDisplayContext(taskInfo.displayId) : mContext, mUserProfileContexts.getOrCreate(taskInfo.userId), mContext.createContextAsUser(UserHandle.of(taskInfo.userId), 0 /* flags */), mDisplayController, mTaskResourceLoader, mSplitScreenController, Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +0 −1 Original line number Diff line number Diff line Loading @@ -1272,7 +1272,6 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin if (isOpenByDefaultDialogActive()) return; mOpenByDefaultDialog = new OpenByDefaultDialog( mContext, mUserContext, mTaskInfo, mTaskSurface, mDisplayController, Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt +0 −5 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ import com.android.wm.shell.common.DisplayInsetsController import com.android.wm.shell.common.DisplayLayout import com.android.wm.shell.common.MultiDisplayDragMoveIndicatorController import com.android.wm.shell.common.MultiInstanceHelper import com.android.wm.shell.common.UserProfileContexts import com.android.wm.shell.common.SyncTransactionQueue import com.android.wm.shell.compatui.api.CompatUIHandler import com.android.wm.shell.desktopmode.DesktopActivityOrientationChangeHandler Loading Loading @@ -178,7 +177,6 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { protected lateinit var desktopState: FakeDesktopState protected lateinit var shellDesktopState: FakeShellDesktopState protected lateinit var desktopConfig: FakeDesktopConfig private val mockUserProfileContexts = mock<UserProfileContexts>() private val transactionFactory = Supplier<SurfaceControl.Transaction> { SurfaceControl.Transaction() Loading Loading @@ -217,8 +215,6 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { whenever(display.type).thenReturn(Display.TYPE_INTERNAL) whenever(mockDesktopUserRepositories.getProfile(anyInt())) .thenReturn(mockDesktopRepository) whenever(mockUserProfileContexts[anyInt()]).thenReturn(spyContext) whenever(mockUserProfileContexts.getOrCreate(anyInt())).thenReturn(spyContext) desktopModeCompatPolicy = DesktopModeCompatPolicy(spyContext) appHandleAndHeaderVisibilityHelper = AppHandleAndHeaderVisibilityHelper( displayController = mockDisplayController, Loading Loading @@ -277,7 +273,6 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { mockDesksOrganizer, shellDesktopState, desktopConfig, mockUserProfileContexts, ) desktopModeWindowDecorViewModel.setSplitScreenController(mockSplitScreenController) whenever(mockDisplayController.getDisplayLayout(any())).thenReturn(mockDisplayLayout) Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/apptoweb/OpenByDefaultDialog.kt +1 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ import kotlinx.coroutines.withContext */ internal class OpenByDefaultDialog( private val context: Context, private val userContext: Context, private val taskInfo: RunningTaskInfo, private val taskSurface: SurfaceControl, private val displayController: DisplayController, Loading @@ -76,7 +75,7 @@ internal class OpenByDefaultDialog( private lateinit var openInBrowserButton: RadioButton private val domainVerificationManager = userContext.getSystemService(DomainVerificationManager::class.java)!! context.getSystemService(DomainVerificationManager::class.java)!! private val packageName = taskInfo.baseActivity?.packageName!! private var loadAppInfoJob: Job? = null Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +2 −3 Original line number Diff line number Diff line Loading @@ -1234,8 +1234,7 @@ public abstract class WMShellModule { Optional<CompatUIHandler> compatUI, DesksOrganizer desksOrganizer, ShellDesktopState shelldesktopState, DesktopConfig desktopConfig, UserProfileContexts userProfileContexts DesktopConfig desktopConfig ) { if (!shelldesktopState.canEnterDesktopModeOrShowAppHandle()) { return Optional.empty(); Loading @@ -1254,7 +1253,7 @@ public abstract class WMShellModule { desktopModeUiEventLogger, taskResourceLoader, recentsTransitionHandler, desktopModeCompatPolicy, desktopTilingDecorViewModel, multiDisplayDragMoveIndicatorController, compatUI.orElse(null), desksOrganizer, shelldesktopState, desktopConfig, userProfileContexts)); desksOrganizer, shelldesktopState, desktopConfig)); } @WMSingleton Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +4 −10 Original line number Diff line number Diff line Loading @@ -107,7 +107,6 @@ import com.android.wm.shell.common.MultiDisplayDragMoveIndicatorController; import com.android.wm.shell.common.MultiInstanceHelper; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.common.UserProfileContexts; import com.android.wm.shell.compatui.CompatUIController; import com.android.wm.shell.compatui.api.CompatUIHandler; import com.android.wm.shell.compatui.impl.CompatUIRequests; Loading Loading @@ -263,7 +262,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, private final MultiDisplayDragMoveIndicatorController mMultiDisplayDragMoveIndicatorController; private final LatencyTracker mLatencyTracker; private final CompatUIHandler mCompatUI; private final UserProfileContexts mUserProfileContexts; public DesktopModeWindowDecorViewModel( Context context, Loading Loading @@ -308,8 +306,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, ShellDesktopState shellDesktopState, DesktopConfig desktopConfig, UserProfileContexts userProfileContexts) { DesktopConfig desktopConfig) { this( context, shellExecutor, Loading Loading @@ -360,8 +357,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, compatUI, desksOrganizer, shellDesktopState, desktopConfig, userProfileContexts); desktopConfig); } @VisibleForTesting Loading Loading @@ -415,8 +411,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, ShellDesktopState shellDesktopState, DesktopConfig desktopConfig, UserProfileContexts userProfileContexts) { DesktopConfig desktopConfig) { mContext = context; mMainExecutor = shellExecutor; mMainHandler = mainHandler; Loading Loading @@ -458,7 +453,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, mAssistContentRequester = assistContentRequester; mWindowDecorViewHostSupplier = windowDecorViewHostSupplier; mCompatUI = compatUI; mUserProfileContexts = userProfileContexts; mOnDisplayChangingListener = (displayId, fromRotation, toRotation, displayAreaInfo, t) -> { DesktopModeWindowDecoration decoration; RunningTaskInfo taskInfo; Loading Loading @@ -1917,7 +1911,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, DesktopExperienceFlags.ENABLE_BUG_FIXES_FOR_SECONDARY_DISPLAY.isTrue() ? mDisplayController.getDisplayContext(taskInfo.displayId) : mContext, mUserProfileContexts.getOrCreate(taskInfo.userId), mContext.createContextAsUser(UserHandle.of(taskInfo.userId), 0 /* flags */), mDisplayController, mTaskResourceLoader, mSplitScreenController, Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +0 −1 Original line number Diff line number Diff line Loading @@ -1272,7 +1272,6 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin if (isOpenByDefaultDialogActive()) return; mOpenByDefaultDialog = new OpenByDefaultDialog( mContext, mUserContext, mTaskInfo, mTaskSurface, mDisplayController, Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt +0 −5 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ import com.android.wm.shell.common.DisplayInsetsController import com.android.wm.shell.common.DisplayLayout import com.android.wm.shell.common.MultiDisplayDragMoveIndicatorController import com.android.wm.shell.common.MultiInstanceHelper import com.android.wm.shell.common.UserProfileContexts import com.android.wm.shell.common.SyncTransactionQueue import com.android.wm.shell.compatui.api.CompatUIHandler import com.android.wm.shell.desktopmode.DesktopActivityOrientationChangeHandler Loading Loading @@ -178,7 +177,6 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { protected lateinit var desktopState: FakeDesktopState protected lateinit var shellDesktopState: FakeShellDesktopState protected lateinit var desktopConfig: FakeDesktopConfig private val mockUserProfileContexts = mock<UserProfileContexts>() private val transactionFactory = Supplier<SurfaceControl.Transaction> { SurfaceControl.Transaction() Loading Loading @@ -217,8 +215,6 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { whenever(display.type).thenReturn(Display.TYPE_INTERNAL) whenever(mockDesktopUserRepositories.getProfile(anyInt())) .thenReturn(mockDesktopRepository) whenever(mockUserProfileContexts[anyInt()]).thenReturn(spyContext) whenever(mockUserProfileContexts.getOrCreate(anyInt())).thenReturn(spyContext) desktopModeCompatPolicy = DesktopModeCompatPolicy(spyContext) appHandleAndHeaderVisibilityHelper = AppHandleAndHeaderVisibilityHelper( displayController = mockDisplayController, Loading Loading @@ -277,7 +273,6 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { mockDesksOrganizer, shellDesktopState, desktopConfig, mockUserProfileContexts, ) desktopModeWindowDecorViewModel.setSplitScreenController(mockSplitScreenController) whenever(mockDisplayController.getDisplayLayout(any())).thenReturn(mockDisplayLayout) Loading