mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Merge "Address a couple small followups for TaskbarInsetsController" into tm-dev
This commit is contained in:
@@ -160,6 +160,7 @@ public class TaskbarControllers {
|
||||
taskbarForceVisibleImmersiveController.onDestroy();
|
||||
taskbarAllAppsController.onDestroy();
|
||||
navButtonController.onDestroy();
|
||||
taskbarInsetsController.onDestroy();
|
||||
|
||||
mControllersToLog = null;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.android.launcher3.taskbar
|
||||
import android.graphics.Insets
|
||||
import android.view.WindowManager
|
||||
import com.android.launcher3.AbstractFloatingView
|
||||
import com.android.launcher3.AbstractFloatingView.TYPE_TASKBAR_ALL_APPS
|
||||
import com.android.launcher3.R
|
||||
import com.android.launcher3.anim.AlphaUpdateListener
|
||||
import com.android.launcher3.taskbar.TaskbarControllers.LoggableTaskbarController
|
||||
@@ -61,6 +62,8 @@ class TaskbarInsetsController(val context: TaskbarActivityContext): LoggableTask
|
||||
windowLayoutParams.insetsRoundedCornerFrame = true
|
||||
}
|
||||
|
||||
fun onDestroy() {}
|
||||
|
||||
fun onTaskbarWindowHeightOrInsetsChanged() {
|
||||
var reducingSize = getReducingInsetsForTaskbarInsetsHeight(
|
||||
controllers.taskbarStashController.contentHeightToReportToApps)
|
||||
@@ -106,18 +109,11 @@ class TaskbarInsetsController(val context: TaskbarActivityContext): LoggableTask
|
||||
} else if (controllers.taskbarDragController.isSystemDragInProgress) {
|
||||
// Let touches pass through us.
|
||||
insetsInfo.setTouchableInsets(InsetsInfo.TOUCHABLE_INSETS_REGION)
|
||||
} else if (AbstractFloatingView.getOpenView<AbstractFloatingView?>(
|
||||
context,
|
||||
AbstractFloatingView.TYPE_TASKBAR_ALL_APPS
|
||||
) != null
|
||||
) {
|
||||
} else if (AbstractFloatingView.hasOpenView(context, TYPE_TASKBAR_ALL_APPS)) {
|
||||
// Let touches pass through us.
|
||||
insetsInfo.setTouchableInsets(InsetsInfo.TOUCHABLE_INSETS_REGION)
|
||||
} else if (controllers.taskbarViewController.areIconsVisible()
|
||||
|| AbstractFloatingView.getOpenView<AbstractFloatingView?>(
|
||||
context,
|
||||
AbstractFloatingView.TYPE_ALL
|
||||
) != null
|
||||
|| AbstractFloatingView.hasOpenView(context, AbstractFloatingView.TYPE_ALL)
|
||||
|| context.isNavBarKidsModeActive
|
||||
) {
|
||||
// Taskbar has some touchable elements, take over the full taskbar area
|
||||
|
||||
@@ -207,6 +207,13 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
return getView(activity, type, true /* mustBeOpen */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether there is at least one view of the given type where {@link #isOpen()} == true.
|
||||
*/
|
||||
public static boolean hasOpenView(ActivityContext activity, @FloatingViewType int type) {
|
||||
return getOpenView(activity, type) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view matching FloatingViewType, and {@link #isOpen()} may be false (if animating
|
||||
* closed).
|
||||
|
||||
Reference in New Issue
Block a user