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

Commit c4b98636 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Cover screen pinning logic around task bar" into tm-dev

parents ab2d54ca 370d68fa
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -427,6 +427,15 @@ public class NavigationBarController implements
        }
    }

    public boolean isOverviewEnabled(int displayId) {
        final NavigationBarView navBarView = getNavigationBarView(displayId);
        if (navBarView != null) {
            return navBarView.isOverviewEnabled();
        } else {
            return mTaskbarDelegate.isOverviewEnabled();
        }
    }

    /** @return {@link NavigationBar} on the default display. */
    @Nullable
    public NavigationBar getDefaultNavigationBar() {
+4 −0
Original line number Diff line number Diff line
@@ -309,6 +309,10 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
                .commitUpdate(mDisplayId);
    }

    boolean isOverviewEnabled() {
        return (mSysUiState.getFlags() & View.STATUS_BAR_DISABLE_RECENT) == 0;
    }

    private void updateAssistantAvailability(boolean assistantAvailable) {
        if (mOverviewProxyService.getProxy() == null) {
            return;
+4 −4
Original line number Diff line number Diff line
@@ -271,10 +271,8 @@ public class ScreenPinningRequest implements View.OnClickListener,

            final Optional<CentralSurfaces> centralSurfacesOptional =
                    mCentralSurfacesOptionalLazy.get();
            NavigationBarView navigationBarView =
                    centralSurfacesOptional.map(CentralSurfaces::getNavigationBarView).orElse(null);
            final boolean recentsVisible = navigationBarView != null
                    && navigationBarView.isRecentsButtonVisible();
            boolean recentsVisible =
                    centralSurfacesOptional.map(CentralSurfaces::isOverviewEnabled).orElse(false);
            boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled();
            int descriptionStringResId;
            if (QuickStepContract.isGesturalMode(mNavBarMode)) {
@@ -295,6 +293,8 @@ public class ScreenPinningRequest implements View.OnClickListener,
                        : R.string.screen_pinning_description_recents_invisible;
            }

            NavigationBarView navigationBarView =
                    centralSurfacesOptional.map(CentralSurfaces::getNavigationBarView).orElse(null);
            if (navigationBarView != null) {
                ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon))
                        .setImageDrawable(navigationBarView.getBackDrawable());
+4 −0
Original line number Diff line number Diff line
@@ -3436,6 +3436,10 @@ public class CentralSurfaces extends CoreStartable implements
        return mNavigationBarController.getNavigationBarView(mDisplayId);
    }

    public boolean isOverviewEnabled() {
        return mNavigationBarController.isOverviewEnabled(mDisplayId);
    }

    public void showPinningEnterExitToast(boolean entering) {
        mNavigationBarController.showPinningEnterExitToast(mDisplayId, entering);
    }