Merge changes I865871e5,Ie655de7a into tm-qpr-dev am: 6e21d310c1 am: 21c3aab5b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21074655

Change-Id: I5485085b18ffb98354d05ead2f3c9fc802ac4d1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-01-31 19:29:11 +00:00
committed by Automerger Merge Worker
8 changed files with 163 additions and 43 deletions

View File

@@ -242,7 +242,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
public void init(@NonNull TaskbarSharedState sharedState) {
mLastRequestedNonFullscreenHeight = getDefaultTaskbarWindowHeight();
mWindowLayoutParams = createDefaultWindowLayoutParams();
mWindowLayoutParams =
createDefaultWindowLayoutParams(TYPE_NAVIGATION_BAR_PANEL, WINDOW_TITLE);
// Initialize controllers after all are constructed.
mControllers.init(sharedState);
@@ -318,16 +319,12 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
return super.getStatsLogManager();
}
/** @see #createDefaultWindowLayoutParams(int) */
public WindowManager.LayoutParams createDefaultWindowLayoutParams() {
return createDefaultWindowLayoutParams(TYPE_NAVIGATION_BAR_PANEL);
}
/**
* Creates LayoutParams for adding a view directly to WindowManager as a new window.
* @param type The window type to pass to the created WindowManager.LayoutParams.
* @param title The window title to pass to the created WindowManager.LayoutParams.
*/
public WindowManager.LayoutParams createDefaultWindowLayoutParams(int type) {
public WindowManager.LayoutParams createDefaultWindowLayoutParams(int type, String title) {
DeviceProfile deviceProfile = getDeviceProfile();
// Taskbar is on the logical bottom of the screen
boolean isVerticalBarLayout = TaskbarManager.isPhoneMode(deviceProfile) &&
@@ -347,7 +344,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
type,
windowFlags,
PixelFormat.TRANSLUCENT);
windowLayoutParams.setTitle(WINDOW_TITLE);
windowLayoutParams.setTitle(title);
windowLayoutParams.packageName = getPackageName();
windowLayoutParams.gravity = !isVerticalBarLayout ?
Gravity.BOTTOM :