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

Commit 24ddc4ec authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11206181 from e73146de to 24Q1-release

Change-Id: I56ffa4bae13d92091ab13d93988b860f39c9a9fd
parents 41ae4774 e73146de
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -18,12 +18,15 @@ package com.android.launcher3.taskbar;
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_NOTIFICATIONS;
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_QUICK_SETTINGS;

import android.content.Context;
import android.content.pm.ActivityInfo.Config;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import androidx.annotation.Nullable;

import com.android.launcher3.R;

/**
@@ -40,8 +43,8 @@ public class DesktopNavbarButtonsViewController extends NavbarButtonsViewControl
    private TaskbarControllers mControllers;

    public DesktopNavbarButtonsViewController(TaskbarActivityContext context,
            FrameLayout navButtonsView) {
        super(context, navButtonsView);
            @Nullable Context navigationBarPanelContext, FrameLayout navButtonsView) {
        super(context, navigationBarPanelContext, navButtonsView);
        mContext = context;
        mNavButtonsView = navButtonsView;
        mNavButtonContainer = mNavButtonsView.findViewById(R.id.end_nav_buttons);
+9 −2
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.animation.ObjectAnimator;
import android.annotation.DrawableRes;
import android.annotation.IdRes;
import android.annotation.LayoutRes;
import android.content.Context;
import android.content.pm.ActivityInfo.Config;
import android.content.res.ColorStateList;
import android.content.res.Resources;
@@ -80,6 +81,8 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;

import androidx.annotation.Nullable;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.R;
@@ -146,6 +149,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
    private int mState;

    private final TaskbarActivityContext mContext;
    private final @Nullable Context mNavigationBarPanelContext;
    private final WindowManagerProxy mWindowManagerProxy;
    private final FrameLayout mNavButtonsView;
    private final LinearLayout mNavButtonContainer;
@@ -203,8 +207,10 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
    private final RecentsHitboxExtender mHitboxExtender = new RecentsHitboxExtender();
    private ImageView mRecentsButton;

    public NavbarButtonsViewController(TaskbarActivityContext context, FrameLayout navButtonsView) {
    public NavbarButtonsViewController(TaskbarActivityContext context,
            @Nullable Context navigationBarPanelContext, FrameLayout navButtonsView) {
        mContext = context;
        mNavigationBarPanelContext = navigationBarPanelContext;
        mWindowManagerProxy = WindowManagerProxy.INSTANCE.get(mContext);
        mNavButtonsView = navButtonsView;
        mNavButtonContainer = mNavButtonsView.findViewById(R.id.end_nav_buttons);
@@ -312,7 +318,8 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
            rotationButton.hide();
            mControllers.rotationButtonController.setRotationButton(rotationButton, null);
        } else {
            mFloatingRotationButton = new FloatingRotationButton(mContext,
            mFloatingRotationButton = new FloatingRotationButton(
                    ENABLE_TASKBAR_NAVBAR_UNIFICATION ? mNavigationBarPanelContext : mContext,
                    R.string.accessibility_rotate_button,
                    R.layout.rotate_suggestion,
                    R.id.rotate_suggestion,
+16 −9
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.apppairs.AppPairIcon;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dot.DotInfo;
import com.android.launcher3.folder.Folder;
@@ -145,6 +146,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

    private static final String WINDOW_TITLE = "Taskbar";

    private final @Nullable Context mNavigationBarPanelContext;

    private final TaskbarDragLayer mDragLayer;
    private final TaskbarControllers mControllers;

@@ -180,11 +183,13 @@ public class TaskbarActivityContext extends BaseTaskbarContext {

    private DeviceProfile mPersistentTaskbarDeviceProfile;

    public TaskbarActivityContext(Context windowContext, DeviceProfile launcherDp,
    public TaskbarActivityContext(Context windowContext,
            @Nullable Context navigationBarPanelContext, DeviceProfile launcherDp,
            TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider
            unfoldTransitionProgressProvider) {
        super(windowContext);

        mNavigationBarPanelContext = navigationBarPanelContext;
        applyDeviceProfile(launcherDp);
        final Resources resources = getResources();

@@ -258,8 +263,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                new TaskbarDragController(this),
                buttonController,
                isDesktopMode
                        ? new DesktopNavbarButtonsViewController(this, navButtonsView)
                        : new NavbarButtonsViewController(this, navButtonsView),
                        ? new DesktopNavbarButtonsViewController(this, mNavigationBarPanelContext,
                                navButtonsView)
                        : new NavbarButtonsViewController(this, mNavigationBarPanelContext,
                                navButtonsView),
                rotationButtonController,
                new TaskbarDragLayerController(this, mDragLayer),
                new TaskbarViewController(this, taskbarView),
@@ -998,7 +1005,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                        Toast.LENGTH_SHORT).show();
            } else {
                // Else launch the selected app pair
                launchFromTaskbarPreservingSplitIfVisible(recents, fi.contents);
                launchFromTaskbarPreservingSplitIfVisible(recents, view, fi.contents);
                mControllers.uiController.onTaskbarIconLaunched(fi);
                mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(true);
            }
@@ -1034,7 +1041,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                                    .startShortcut(packageName, id, null, null, info.user);
                        } else {
                            launchFromTaskbarPreservingSplitIfVisible(
                                    recents, Collections.singletonList(info));
                                    recents, view, Collections.singletonList(info));
                        }

                    } catch (NullPointerException
@@ -1072,7 +1079,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                // If we are selecting a second app for split, launch the split tasks
                taskbarUIController.triggerSecondAppForSplit(info, info.intent, view);
            } else {
                launchFromTaskbarPreservingSplitIfVisible(recents, Collections.singletonList(info));
                launchFromTaskbarPreservingSplitIfVisible(
                        recents, view, Collections.singletonList(info));
            }
            mControllers.uiController.onTaskbarIconLaunched(info);
            mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(true);
@@ -1094,7 +1102,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
     * (potentially breaking a split pair).
     */
    private void launchFromTaskbarPreservingSplitIfVisible(@Nullable RecentsView recents,
            List<? extends ItemInfo> itemInfos) {
            @Nullable View launchingIconView, List<? extends ItemInfo> itemInfos) {
        if (recents == null) {
            return;
        }
@@ -1122,8 +1130,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                    if (findExactPairMatch) {
                        // We did not find the app pair we were looking for, so launch one.
                        recents.getSplitSelectController().getAppPairsController().launchAppPair(
                                (WorkspaceItemInfo) itemInfos.get(0),
                                (WorkspaceItemInfo) itemInfos.get(1));
                                (AppPairIcon) launchingIconView);
                    } else {
                        startItemInfoActivity(itemInfos.get(0));
                    }
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import static android.view.accessibility.AccessibilityNodeInfo.ACTION_ACCESSIBIL
import static android.view.accessibility.AccessibilityNodeInfo.ACTION_CLICK;

import static com.android.launcher3.taskbar.NavbarButtonsViewController.ALPHA_INDEX_IMMERSIVE_MODE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IMMERSIVE_MODE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY;

import android.os.Bundle;
import android.os.Handler;
@@ -84,7 +84,7 @@ public class TaskbarForceVisibleImmersiveController implements TouchController {

    /** Update values tracked via sysui flags. */
    public void updateSysuiFlags(int sysuiFlags) {
        mIsImmersiveMode = (sysuiFlags & SYSUI_STATE_IMMERSIVE_MODE) != 0;
        mIsImmersiveMode = (sysuiFlags & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) == 0;
        if (mContext.isNavBarForceVisible()) {
            if (mIsImmersiveMode) {
                startIconDimming();
+7 −2
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ public class TaskbarManager {
            Settings.Secure.NAV_BAR_KIDS_MODE);

    private final Context mContext;
    private final @Nullable Context mNavigationBarPanelContext;
    private WindowManager mWindowManager;
    private FrameLayout mTaskbarRootLayout;
    private boolean mAddedWindow;
@@ -198,6 +199,9 @@ public class TaskbarManager {
        mContext = service.createWindowContext(display,
                ENABLE_TASKBAR_NAVBAR_UNIFICATION ? TYPE_NAVIGATION_BAR : TYPE_NAVIGATION_BAR_PANEL,
                null);
        mNavigationBarPanelContext = ENABLE_TASKBAR_NAVBAR_UNIFICATION
                ? service.createWindowContext(display, TYPE_NAVIGATION_BAR_PANEL, null)
                : null;
        if (enableTaskbarNoRecreate()) {
            mWindowManager = mContext.getSystemService(WindowManager.class);
            mTaskbarRootLayout = new FrameLayout(mContext) {
@@ -435,8 +439,9 @@ public class TaskbarManager {
            }

            if (enableTaskbarNoRecreate() || mTaskbarActivityContext == null) {
                mTaskbarActivityContext = new TaskbarActivityContext(mContext, dp,
                        mNavButtonController, mUnfoldProgressProvider);
                mTaskbarActivityContext = new TaskbarActivityContext(mContext,
                        mNavigationBarPanelContext, dp, mNavButtonController,
                        mUnfoldProgressProvider);
            } else {
                mTaskbarActivityContext.updateDeviceProfile(dp);
            }
Loading