Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9de10ff8 authored by Tony Wickham's avatar Tony Wickham Committed by Automerger Merge Worker
Browse files

Merge "Address a couple small followups for TaskbarInsetsController" into tm-dev am: 357c6225

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



Change-Id: I6c01f58f282234ce2e85a582a25a442ba7c7d9d2
Ignore-AOSP-First: this is an automerge
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 78194ca6 357c6225
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ public class TaskbarControllers {
        taskbarForceVisibleImmersiveController.onDestroy();
        taskbarAllAppsController.onDestroy();
        navButtonController.onDestroy();
        taskbarInsetsController.onDestroy();

        mControllersToLog = null;
    }
+5 −9
Original line number Diff line number Diff line
@@ -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
+7 −0
Original line number Diff line number Diff line
@@ -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).