Cover screen pinning logic around task bar
Fixes: 205280231 Test: manual Change-Id: I7e34def68dae9045d967f0871729e1988e1fe149
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -3439,6 +3439,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user