diff options
| author | 2023-03-20 08:29:59 +0000 | |
|---|---|---|
| committer | 2023-03-20 08:29:59 +0000 | |
| commit | 812e3291736586d43270b3f862620c84ee9e0bcd (patch) | |
| tree | 0e135d16b8a2ee01df69dc46febdd13ced9ec4b4 | |
| parent | 63a708db35dd6fad2db6980e42110fee1670408f (diff) | |
| parent | e85ddcdcb3e9f412c90f7d9fa52662e4cb184ab4 (diff) | |
Merge "[1/n] Move Letterbox education dialog classes" into tm-qpr-dev
9 files changed, 23 insertions, 30 deletions
diff --git a/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml b/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml index 413cfd78fd91..a993469aaccf 100644 --- a/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml +++ b/libs/WindowManager/Shell/res/layout/letterbox_education_dialog_layout.xml @@ -1,5 +1,5 @@ <!-- - ~ Copyright (C) 2022 The Android Open Source Project + ~ 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. @@ -13,7 +13,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<com.android.wm.shell.compatui.letterboxedu.LetterboxEduDialogLayout +<com.android.wm.shell.compatui.LetterboxEduDialogLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" style="@style/LetterboxDialog"> @@ -78,13 +78,13 @@ android:orientation="horizontal" android:paddingTop="48dp"> - <com.android.wm.shell.compatui.letterboxedu.LetterboxEduDialogActionLayout + <com.android.wm.shell.compatui.LetterboxEduDialogActionLayout android:layout_width="wrap_content" android:layout_height="wrap_content" app:icon="@drawable/letterbox_education_ic_reposition" app:text="@string/letterbox_education_reposition_text"/> - <com.android.wm.shell.compatui.letterboxedu.LetterboxEduDialogActionLayout + <com.android.wm.shell.compatui.LetterboxEduDialogActionLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart= @@ -118,4 +118,4 @@ </FrameLayout> -</com.android.wm.shell.compatui.letterboxedu.LetterboxEduDialogLayout> +</com.android.wm.shell.compatui.LetterboxEduDialogLayout> diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIController.java index 76d9152fdfbc..6950f24512b1 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIController.java @@ -42,7 +42,6 @@ import com.android.wm.shell.common.DockStateReader; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.compatui.CompatUIWindowManager.CompatUIHintsState; -import com.android.wm.shell.compatui.letterboxedu.LetterboxEduWindowManager; import com.android.wm.shell.sysui.KeyguardChangeListener; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellInit; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java index fe95d04bad3c..170c0ee91b40 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/CompatUIWindowManager.java @@ -38,7 +38,6 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.compatui.CompatUIController.CompatUICallback; -import com.android.wm.shell.compatui.letterboxedu.LetterboxEduWindowManager; import java.util.function.Consumer; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduDialogActionLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/LetterboxEduDialogActionLayout.java index 02197f644a39..9974295123b7 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduDialogActionLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/LetterboxEduDialogActionLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 The Android Open Source Project + * 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.wm.shell.compatui.letterboxedu; +package com.android.wm.shell.compatui; import android.content.Context; import android.content.res.TypedArray; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduDialogLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/LetterboxEduDialogLayout.java index 9232f36cf939..df2f6ce24ebc 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduDialogLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/LetterboxEduDialogLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 The Android Open Source Project + * 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.wm.shell.compatui.letterboxedu; +package com.android.wm.shell.compatui; import android.annotation.Nullable; import android.content.Context; @@ -26,7 +26,6 @@ import android.widget.TextView; import androidx.constraintlayout.widget.ConstraintLayout; import com.android.wm.shell.R; -import com.android.wm.shell.compatui.DialogContainerSupplier; /** * Container for Letterbox Education Dialog and background dim. diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/LetterboxEduWindowManager.java index c14c009721a1..bfdbfe3d6ea0 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduWindowManager.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/LetterboxEduWindowManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 The Android Open Source Project + * 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.wm.shell.compatui.letterboxedu; +package com.android.wm.shell.compatui; import static android.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING; @@ -36,8 +36,6 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.DockStateReader; import com.android.wm.shell.common.SyncTransactionQueue; -import com.android.wm.shell.compatui.CompatUIWindowManagerAbstract; -import com.android.wm.shell.compatui.DialogAnimationController; import com.android.wm.shell.transition.Transitions; /** diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIControllerTest.java index 98de58404e80..4cf9e6acaec6 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIControllerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/CompatUIControllerTest.java @@ -54,7 +54,6 @@ import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.DockStateReader; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SyncTransactionQueue; -import com.android.wm.shell.compatui.letterboxedu.LetterboxEduWindowManager; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduDialogLayoutTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/LetterboxEduDialogLayoutTest.java index a58620dfc6dc..172c263ab0f6 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduDialogLayoutTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/LetterboxEduDialogLayoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 The Android Open Source Project + * 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.wm.shell.compatui.letterboxedu; +package com.android.wm.shell.compatui; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -58,9 +58,8 @@ public class LetterboxEduDialogLayoutTest extends ShellTestCase { public void setUp() { MockitoAnnotations.initMocks(this); - mLayout = (LetterboxEduDialogLayout) - LayoutInflater.from(mContext).inflate(R.layout.letterbox_education_dialog_layout, - null); + mLayout = (LetterboxEduDialogLayout) LayoutInflater.from(mContext) + .inflate(R.layout.letterbox_education_dialog_layout, null); mDismissButton = mLayout.findViewById(R.id.letterbox_education_dialog_dismiss_button); mDialogContainer = mLayout.findViewById(R.id.letterbox_education_dialog_container); mLayout.setDismissOnClickListener(mDismissCallback); diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduWindowManagerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/LetterboxEduWindowManagerTest.java index 14190f18929c..47c9e06e8681 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterboxedu/LetterboxEduWindowManagerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/LetterboxEduWindowManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 The Android Open Source Project + * 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.wm.shell.compatui.letterboxedu; +package com.android.wm.shell.compatui; import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; @@ -56,7 +56,6 @@ import com.android.wm.shell.ShellTestCase; import com.android.wm.shell.common.DisplayLayout; import com.android.wm.shell.common.DockStateReader; import com.android.wm.shell.common.SyncTransactionQueue; -import com.android.wm.shell.compatui.DialogAnimationController; import com.android.wm.shell.transition.Transitions; import org.junit.After; @@ -400,15 +399,16 @@ public class LetterboxEduWindowManagerTest extends ShellTestCase { false, isDocked); } - private LetterboxEduWindowManager createWindowManager(boolean eligible, - int userId, boolean isTaskbarEduShowing) { + private LetterboxEduWindowManager createWindowManager(boolean eligible, int userId, + boolean isTaskbarEduShowing) { return createWindowManager(eligible, userId, isTaskbarEduShowing, /* isDocked */false); } - private LetterboxEduWindowManager createWindowManager(boolean eligible, - int userId, boolean isTaskbarEduShowing, boolean isDocked) { + private LetterboxEduWindowManager createWindowManager(boolean eligible, int userId, + boolean isTaskbarEduShowing, boolean isDocked) { doReturn(isDocked).when(mDockStateReader).isDocked(); - LetterboxEduWindowManager windowManager = new LetterboxEduWindowManager(mContext, + LetterboxEduWindowManager + windowManager = new LetterboxEduWindowManager(mContext, createTaskInfo(eligible, userId), mSyncTransactionQueue, mTaskListener, createDisplayLayout(), mTransitions, mOnDismissCallback, mAnimationController, mDockStateReader); |