mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
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:
@@ -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 :
|
||||
|
||||
Reference in New Issue
Block a user