2021-06-08 20:03:43 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2021 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.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
package com.android.launcher3.taskbar;
|
|
|
|
|
|
2023-10-05 15:06:42 -07:00
|
|
|
import static com.android.launcher3.taskbar.TaskbarPinningController.PINNING_PERSISTENT;
|
|
|
|
|
import static com.android.launcher3.taskbar.TaskbarPinningController.PINNING_TRANSIENT;
|
|
|
|
|
|
2021-06-08 20:03:43 -07:00
|
|
|
import android.content.res.Resources;
|
2022-08-11 17:33:35 -07:00
|
|
|
import android.graphics.Point;
|
2021-06-08 20:03:43 -07:00
|
|
|
import android.graphics.Rect;
|
2022-09-09 23:23:35 +00:00
|
|
|
import android.view.ViewTreeObserver;
|
2021-06-08 20:03:43 -07:00
|
|
|
|
2022-08-05 10:43:29 -07:00
|
|
|
import com.android.launcher3.DeviceProfile;
|
2021-06-08 20:03:43 -07:00
|
|
|
import com.android.launcher3.R;
|
2022-12-08 13:00:21 -08:00
|
|
|
import com.android.launcher3.anim.AnimatedFloat;
|
2022-08-11 17:33:35 -07:00
|
|
|
import com.android.launcher3.util.DimensionUtils;
|
2023-10-05 15:06:42 -07:00
|
|
|
import com.android.launcher3.util.DisplayController;
|
2023-06-14 11:36:58 -07:00
|
|
|
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
|
2021-12-01 14:51:51 +00:00
|
|
|
import com.android.launcher3.util.TouchController;
|
2021-06-08 20:03:43 -07:00
|
|
|
|
2021-12-15 13:09:39 -08:00
|
|
|
import java.io.PrintWriter;
|
|
|
|
|
|
2021-06-08 20:03:43 -07:00
|
|
|
/**
|
|
|
|
|
* Handles properties/data collection, then passes the results to TaskbarDragLayer to render.
|
|
|
|
|
*/
|
2022-10-31 18:17:03 +00:00
|
|
|
public class TaskbarDragLayerController implements TaskbarControllers.LoggableTaskbarController,
|
|
|
|
|
TaskbarControllers.BackgroundRendererController {
|
2021-06-08 20:03:43 -07:00
|
|
|
|
|
|
|
|
private final TaskbarActivityContext mActivity;
|
|
|
|
|
private final TaskbarDragLayer mTaskbarDragLayer;
|
|
|
|
|
private final int mFolderMargin;
|
2021-07-22 14:28:04 -10:00
|
|
|
|
2021-06-08 20:03:43 -07:00
|
|
|
// Alpha properties for taskbar background.
|
|
|
|
|
private final AnimatedFloat mBgTaskbar = new AnimatedFloat(this::updateBackgroundAlpha);
|
|
|
|
|
private final AnimatedFloat mBgNavbar = new AnimatedFloat(this::updateBackgroundAlpha);
|
2021-07-12 14:33:54 -07:00
|
|
|
private final AnimatedFloat mKeyguardBgTaskbar = new AnimatedFloat(this::updateBackgroundAlpha);
|
2021-10-21 10:45:20 -07:00
|
|
|
private final AnimatedFloat mNotificationShadeBgTaskbar = new AnimatedFloat(
|
|
|
|
|
this::updateBackgroundAlpha);
|
Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).
Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-16 17:38:36 -08:00
|
|
|
private final AnimatedFloat mImeBgTaskbar = new AnimatedFloat(this::updateBackgroundAlpha);
|
2023-01-21 00:47:08 +00:00
|
|
|
private final AnimatedFloat mAssistantBgTaskbar = new AnimatedFloat(
|
|
|
|
|
this::updateBackgroundAlpha);
|
2021-07-22 14:28:04 -10:00
|
|
|
// Used to hide our background color when someone else (e.g. ScrimView) is handling it.
|
|
|
|
|
private final AnimatedFloat mBgOverride = new AnimatedFloat(this::updateBackgroundAlpha);
|
|
|
|
|
|
2021-06-01 16:54:07 -07:00
|
|
|
// Translation property for taskbar background.
|
|
|
|
|
private final AnimatedFloat mBgOffset = new AnimatedFloat(this::updateBackgroundOffset);
|
2021-06-08 20:03:43 -07:00
|
|
|
|
2023-03-31 13:13:59 +02:00
|
|
|
// Used to fade in/out the entirety of the taskbar, for a smooth transition before/after sysui
|
|
|
|
|
// changes the inset visibility.
|
|
|
|
|
private final AnimatedFloat mTaskbarAlpha = new AnimatedFloat(this::updateTaskbarAlpha);
|
|
|
|
|
|
2023-10-05 15:06:42 -07:00
|
|
|
private final AnimatedFloat mTaskbarBackgroundProgress = new AnimatedFloat(
|
|
|
|
|
this::updateTaskbarBackgroundProgress);
|
|
|
|
|
|
2021-06-08 20:03:43 -07:00
|
|
|
// Initialized in init.
|
|
|
|
|
private TaskbarControllers mControllers;
|
2023-03-17 23:49:09 +00:00
|
|
|
private TaskbarStashViaTouchController mTaskbarStashViaTouchController;
|
2023-02-24 23:43:05 +00:00
|
|
|
private AnimatedFloat mOnBackgroundNavButtonColorIntensity;
|
2021-11-04 16:53:59 -07:00
|
|
|
|
2023-06-14 11:36:58 -07:00
|
|
|
private MultiProperty mBackgroundRendererAlpha;
|
2021-11-04 16:53:59 -07:00
|
|
|
private float mLastSetBackgroundAlpha;
|
2021-06-08 20:03:43 -07:00
|
|
|
|
|
|
|
|
public TaskbarDragLayerController(TaskbarActivityContext activity,
|
|
|
|
|
TaskbarDragLayer taskbarDragLayer) {
|
|
|
|
|
mActivity = activity;
|
|
|
|
|
mTaskbarDragLayer = taskbarDragLayer;
|
2023-06-14 11:36:58 -07:00
|
|
|
mBackgroundRendererAlpha = mTaskbarDragLayer.getBackgroundRendererAlpha();
|
2021-06-08 20:03:43 -07:00
|
|
|
final Resources resources = mTaskbarDragLayer.getResources();
|
|
|
|
|
mFolderMargin = resources.getDimensionPixelSize(R.dimen.taskbar_folder_margin);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void init(TaskbarControllers controllers) {
|
|
|
|
|
mControllers = controllers;
|
2023-03-17 23:49:09 +00:00
|
|
|
mTaskbarStashViaTouchController = new TaskbarStashViaTouchController(mControllers);
|
2021-06-08 20:03:43 -07:00
|
|
|
mTaskbarDragLayer.init(new TaskbarDragLayerCallbacks());
|
2021-10-19 14:48:09 -07:00
|
|
|
|
2023-02-24 23:43:05 +00:00
|
|
|
mOnBackgroundNavButtonColorIntensity = mControllers.navbarButtonsViewController
|
|
|
|
|
.getOnTaskbarBackgroundNavButtonColorOverride();
|
2021-11-04 16:53:59 -07:00
|
|
|
|
2023-10-05 15:06:42 -07:00
|
|
|
mTaskbarBackgroundProgress.updateValue(DisplayController.isTransientTaskbar(mActivity)
|
|
|
|
|
? PINNING_TRANSIENT
|
|
|
|
|
: PINNING_PERSISTENT);
|
|
|
|
|
|
2021-10-19 14:48:09 -07:00
|
|
|
mBgTaskbar.value = 1;
|
2021-07-12 14:33:54 -07:00
|
|
|
mKeyguardBgTaskbar.value = 1;
|
2021-10-21 10:45:20 -07:00
|
|
|
mNotificationShadeBgTaskbar.value = 1;
|
Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).
Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-16 17:38:36 -08:00
|
|
|
mImeBgTaskbar.value = 1;
|
2023-01-21 00:47:08 +00:00
|
|
|
mAssistantBgTaskbar.value = 1;
|
2021-07-22 14:28:04 -10:00
|
|
|
mBgOverride.value = 1;
|
2021-10-19 14:48:09 -07:00
|
|
|
updateBackgroundAlpha();
|
2023-03-31 13:13:59 +02:00
|
|
|
|
|
|
|
|
mTaskbarAlpha.value = 1;
|
|
|
|
|
updateTaskbarAlpha();
|
2021-06-08 20:03:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void onDestroy() {
|
|
|
|
|
mTaskbarDragLayer.onDestroy();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return Bounds (in TaskbarDragLayer coordinates) where an opened Folder can display.
|
|
|
|
|
*/
|
|
|
|
|
public Rect getFolderBoundingBox() {
|
|
|
|
|
Rect boundingBox = new Rect(0, 0, mTaskbarDragLayer.getWidth(),
|
2023-05-16 14:04:14 -07:00
|
|
|
mTaskbarDragLayer.getHeight() - mActivity.getDeviceProfile().taskbarHeight
|
|
|
|
|
- mActivity.getDeviceProfile().taskbarBottomMargin);
|
2021-06-08 20:03:43 -07:00
|
|
|
boundingBox.inset(mFolderMargin, mFolderMargin);
|
|
|
|
|
return boundingBox;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AnimatedFloat getTaskbarBackgroundAlpha() {
|
|
|
|
|
return mBgTaskbar;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AnimatedFloat getNavbarBackgroundAlpha() {
|
|
|
|
|
return mBgNavbar;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-12 14:33:54 -07:00
|
|
|
public AnimatedFloat getKeyguardBgTaskbar() {
|
|
|
|
|
return mKeyguardBgTaskbar;
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-21 10:45:20 -07:00
|
|
|
public AnimatedFloat getNotificationShadeBgTaskbar() {
|
|
|
|
|
return mNotificationShadeBgTaskbar;
|
|
|
|
|
}
|
|
|
|
|
|
Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).
Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-16 17:38:36 -08:00
|
|
|
public AnimatedFloat getImeBgTaskbar() {
|
|
|
|
|
return mImeBgTaskbar;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-21 00:47:08 +00:00
|
|
|
public AnimatedFloat getAssistantBgTaskbar() {
|
|
|
|
|
return mAssistantBgTaskbar;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-01 16:54:07 -07:00
|
|
|
public AnimatedFloat getTaskbarBackgroundOffset() {
|
|
|
|
|
return mBgOffset;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-05 15:06:42 -07:00
|
|
|
// AnimatedFloat is for animating between pinned and transient taskbar
|
|
|
|
|
public AnimatedFloat getTaskbarBackgroundProgress() {
|
|
|
|
|
return mTaskbarBackgroundProgress;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-31 13:13:59 +02:00
|
|
|
public AnimatedFloat getTaskbarAlpha() {
|
|
|
|
|
return mTaskbarAlpha;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-04 14:36:36 -07:00
|
|
|
/**
|
|
|
|
|
* Make updates when configuration changes.
|
|
|
|
|
*/
|
|
|
|
|
public void onConfigurationChanged() {
|
2023-03-17 23:49:09 +00:00
|
|
|
mTaskbarStashViaTouchController.updateGestureHeight();
|
2022-11-04 14:36:36 -07:00
|
|
|
}
|
|
|
|
|
|
2021-06-08 20:03:43 -07:00
|
|
|
private void updateBackgroundAlpha() {
|
2021-07-22 14:28:04 -10:00
|
|
|
final float bgNavbar = mBgNavbar.value;
|
2021-10-21 10:45:20 -07:00
|
|
|
final float bgTaskbar = mBgTaskbar.value * mKeyguardBgTaskbar.value
|
2023-01-21 00:47:08 +00:00
|
|
|
* mNotificationShadeBgTaskbar.value * mImeBgTaskbar.value
|
|
|
|
|
* mAssistantBgTaskbar.value;
|
2021-11-04 16:53:59 -07:00
|
|
|
mLastSetBackgroundAlpha = mBgOverride.value * Math.max(bgNavbar, bgTaskbar);
|
2023-06-14 11:36:58 -07:00
|
|
|
mBackgroundRendererAlpha.setValue(mLastSetBackgroundAlpha);
|
2021-11-04 16:53:59 -07:00
|
|
|
|
2023-02-24 23:43:05 +00:00
|
|
|
updateOnBackgroundNavButtonColorIntensity();
|
2021-06-08 20:03:43 -07:00
|
|
|
}
|
|
|
|
|
|
2023-06-14 11:36:58 -07:00
|
|
|
public MultiProperty getBackgroundRendererAlphaForStash() {
|
|
|
|
|
return mTaskbarDragLayer.getBackgroundRendererAlphaForStash();
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-07 13:50:49 -08:00
|
|
|
/**
|
|
|
|
|
* Sets the translation of the background during the swipe up gesture.
|
|
|
|
|
*/
|
|
|
|
|
public void setTranslationYForSwipe(float transY) {
|
|
|
|
|
mTaskbarDragLayer.setBackgroundTranslationYForSwipe(transY);
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-21 07:07:46 -07:00
|
|
|
/**
|
|
|
|
|
* Sets the translation of the background during the spring on stash animation.
|
|
|
|
|
*/
|
|
|
|
|
public void setTranslationYForStash(float transY) {
|
|
|
|
|
mTaskbarDragLayer.setBackgroundTranslationYForStash(transY);
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-01 16:54:07 -07:00
|
|
|
private void updateBackgroundOffset() {
|
|
|
|
|
mTaskbarDragLayer.setTaskbarBackgroundOffset(mBgOffset.value);
|
2023-02-24 23:43:05 +00:00
|
|
|
updateOnBackgroundNavButtonColorIntensity();
|
2021-11-04 16:53:59 -07:00
|
|
|
}
|
|
|
|
|
|
2023-10-05 15:06:42 -07:00
|
|
|
private void updateTaskbarBackgroundProgress() {
|
|
|
|
|
mTaskbarDragLayer.setTaskbarBackgroundProgress(mTaskbarBackgroundProgress.value);
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-31 13:13:59 +02:00
|
|
|
private void updateTaskbarAlpha() {
|
|
|
|
|
mTaskbarDragLayer.setAlpha(mTaskbarAlpha.value);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-31 18:17:03 +00:00
|
|
|
@Override
|
|
|
|
|
public void setCornerRoundness(float cornerRoundness) {
|
|
|
|
|
mTaskbarDragLayer.setCornerRoundness(cornerRoundness);
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-25 19:00:53 +00:00
|
|
|
/**
|
2023-02-24 23:43:05 +00:00
|
|
|
* Set if another controller is temporarily handling background drawing. In this case we
|
|
|
|
|
* override our background alpha to be {@code 0}.
|
2023-01-25 19:00:53 +00:00
|
|
|
*/
|
|
|
|
|
public void setIsBackgroundDrawnElsewhere(boolean isBackgroundDrawnElsewhere) {
|
2023-02-24 23:43:05 +00:00
|
|
|
mBgOverride.updateValue(isBackgroundDrawnElsewhere ? 0 : 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void updateOnBackgroundNavButtonColorIntensity() {
|
|
|
|
|
mOnBackgroundNavButtonColorIntensity.updateValue(
|
|
|
|
|
mLastSetBackgroundAlpha * (1 - mBgOffset.value));
|
2021-06-01 16:54:07 -07:00
|
|
|
}
|
|
|
|
|
|
2023-03-22 18:26:12 +00:00
|
|
|
/**
|
|
|
|
|
* Sets the width percentage to inset the transient taskbar's background from the left and from
|
|
|
|
|
* the right.
|
|
|
|
|
*/
|
|
|
|
|
public void setBackgroundHorizontalInsets(float insetPercentage) {
|
|
|
|
|
mTaskbarDragLayer.setBackgroundHorizontalInsets(insetPercentage);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-15 13:09:39 -08:00
|
|
|
@Override
|
|
|
|
|
public void dumpLogs(String prefix, PrintWriter pw) {
|
|
|
|
|
pw.println(prefix + "TaskbarDragLayerController:");
|
|
|
|
|
|
2022-06-23 11:25:10 -07:00
|
|
|
pw.println(prefix + "\tmBgOffset=" + mBgOffset.value);
|
2023-03-31 13:13:59 +02:00
|
|
|
pw.println(prefix + "\tmTaskbarAlpha=" + mTaskbarAlpha.value);
|
2022-06-23 11:25:10 -07:00
|
|
|
pw.println(prefix + "\tmFolderMargin=" + mFolderMargin);
|
|
|
|
|
pw.println(prefix + "\tmLastSetBackgroundAlpha=" + mLastSetBackgroundAlpha);
|
2023-01-21 00:47:08 +00:00
|
|
|
pw.println(prefix + "\t\tmBgOverride=" + mBgOverride.value);
|
|
|
|
|
pw.println(prefix + "\t\tmBgNavbar=" + mBgNavbar.value);
|
|
|
|
|
pw.println(prefix + "\t\tmBgTaskbar=" + mBgTaskbar.value);
|
|
|
|
|
pw.println(prefix + "\t\tmKeyguardBgTaskbar=" + mKeyguardBgTaskbar.value);
|
|
|
|
|
pw.println(prefix + "\t\tmNotificationShadeBgTaskbar=" + mNotificationShadeBgTaskbar.value);
|
|
|
|
|
pw.println(prefix + "\t\tmImeBgTaskbar=" + mImeBgTaskbar.value);
|
|
|
|
|
pw.println(prefix + "\t\tmAssistantBgTaskbar=" + mAssistantBgTaskbar.value);
|
2021-12-15 13:09:39 -08:00
|
|
|
}
|
|
|
|
|
|
2021-06-08 20:03:43 -07:00
|
|
|
/**
|
|
|
|
|
* Callbacks for {@link TaskbarDragLayer} to interact with its controller.
|
|
|
|
|
*/
|
|
|
|
|
public class TaskbarDragLayerCallbacks {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called to update the touchable insets.
|
2022-09-09 23:23:35 +00:00
|
|
|
* @see ViewTreeObserver.InternalInsetsInfo#setTouchableInsets(int)
|
2021-06-08 20:03:43 -07:00
|
|
|
*/
|
2022-09-09 23:23:35 +00:00
|
|
|
public void updateInsetsTouchability(ViewTreeObserver.InternalInsetsInfo insetsInfo) {
|
2022-04-14 16:15:58 -07:00
|
|
|
mControllers.taskbarInsetsController.updateInsetsTouchability(insetsInfo);
|
2021-06-08 20:03:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called when a child is removed from TaskbarDragLayer.
|
|
|
|
|
*/
|
|
|
|
|
public void onDragLayerViewRemoved() {
|
2022-11-02 14:54:31 +00:00
|
|
|
mActivity.onDragEndOrViewRemoved();
|
2021-06-08 20:03:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns how tall the background should be drawn at the bottom of the screen.
|
|
|
|
|
*/
|
|
|
|
|
public int getTaskbarBackgroundHeight() {
|
2022-08-05 10:43:29 -07:00
|
|
|
DeviceProfile deviceProfile = mActivity.getDeviceProfile();
|
|
|
|
|
if (TaskbarManager.isPhoneMode(deviceProfile)) {
|
|
|
|
|
Resources resources = mActivity.getResources();
|
2022-08-11 17:33:35 -07:00
|
|
|
Point taskbarDimensions =
|
|
|
|
|
DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, resources,
|
|
|
|
|
TaskbarManager.isPhoneMode(deviceProfile));
|
|
|
|
|
return taskbarDimensions.y == -1 ?
|
|
|
|
|
deviceProfile.getDisplayInfo().currentSize.y :
|
|
|
|
|
taskbarDimensions.y;
|
2022-08-05 10:43:29 -07:00
|
|
|
} else {
|
2023-03-23 21:38:49 -07:00
|
|
|
return deviceProfile.taskbarHeight;
|
2022-08-05 10:43:29 -07:00
|
|
|
}
|
2021-06-08 20:03:43 -07:00
|
|
|
}
|
2021-12-01 14:51:51 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns touch controllers.
|
|
|
|
|
*/
|
|
|
|
|
public TouchController[] getTouchControllers() {
|
2023-03-17 23:49:09 +00:00
|
|
|
return new TouchController[] {
|
|
|
|
|
mActivity.getDragController(),
|
2022-05-02 11:51:01 -07:00
|
|
|
mControllers.taskbarForceVisibleImmersiveController,
|
2023-03-17 23:49:09 +00:00
|
|
|
mControllers.navbarButtonsViewController.getTouchController(),
|
|
|
|
|
mTaskbarStashViaTouchController,
|
|
|
|
|
};
|
2021-12-01 14:51:51 +00:00
|
|
|
}
|
2021-06-08 20:03:43 -07:00
|
|
|
}
|
|
|
|
|
}
|