Merge "[1/n] Move Letterbox education dialog classes" into tm-qpr-dev am: 812e329173
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21911723 Change-Id: Ie82fa96ac48632c985313c64fc2fc52821040211 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -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.
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user