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

Commit 3629b935 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Add TaskbarView as a child of Hotseat" into sc-dev

parents d8c2a7b2 9ce3b25e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -18,6 +18,4 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/taskbar_divider_thickness"
    android:layout_height="@dimen/taskbar_divider_height"
    android:layout_marginStart="@dimen/taskbar_icon_spacing"
    android:layout_marginEnd="@dimen/taskbar_icon_spacing"
    android:background="@color/taskbar_divider" />
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->

<com.android.launcher3.taskbar.TaskbarView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/taskbar_view"
    android:layout_width="match_parent"
    android:layout_height="@dimen/taskbar_size"
    android:background="@android:color/transparent"
    android:layout_gravity="bottom"
    android:gravity="center"
    android:visibility="gone" />
+3 −1
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
import com.android.launcher3.taskbar.TaskbarActivityContext;
import com.android.launcher3.taskbar.TaskbarController;
import com.android.launcher3.taskbar.TaskbarStateHandler;
import com.android.launcher3.taskbar.TaskbarView;
import com.android.launcher3.uioverrides.RecentsViewStateController;
import com.android.launcher3.util.ActivityOptionsWrapper;
import com.android.launcher3.util.DisplayController;
@@ -243,9 +244,10 @@ public abstract class BaseQuickstepLauncher extends Launcher
            mTaskbarController = null;
        }
        if (mDeviceProfile.isTaskbarPresent) {
            TaskbarView taskbarViewOnHome = (TaskbarView) mHotseat.getTaskbarView();
            TaskbarActivityContext taskbarActivityContext = new TaskbarActivityContext(this);
            mTaskbarController = new TaskbarController(this,
                    taskbarActivityContext.getTaskbarContainerView());
                    taskbarActivityContext.getTaskbarContainerView(), taskbarViewOnHome);
            mTaskbarController.init();
        }
    }
+1 −4
Original line number Diff line number Diff line
@@ -54,10 +54,7 @@ public class TaskbarActivityContext extends ContextWrapper implements ActivityCo
        return mTaskbarContainerView;
    }

    /**
     * @return A LayoutInflater to use in this Context. Views inflated with this LayoutInflater will
     * be able to access this TaskbarActivityContext via ActivityContext.lookupContext().
     */
    @Override
    public LayoutInflater getLayoutInflater() {
        return mLayoutInflater;
    }
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ public class TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>
    private ViewTreeObserverWrapper.OnComputeInsetsListener createTaskbarInsetsComputer() {
        return insetsInfo -> {
            if (getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD
                    || mTaskbarView.isDraggingItem()) {
                    || mTaskbarView.getVisibility() != VISIBLE || mTaskbarView.isDraggingItem()) {
                // We're invisible or dragging out of taskbar, let touches pass through us.
                insetsInfo.touchableRegion.setEmpty();
                insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION);
Loading