Merge "Clean up left over prototype code in Navigation Bar" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6db82f8965
@@ -178,7 +178,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
|
||||
// Send the assistant availability upon connection
|
||||
if (isConnected) {
|
||||
mNavigationBarView.setAssistantAvailable(mAssistantAvailable);
|
||||
sendAssistantAvailability(mAssistantAvailable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
boolean available = mAssistManager
|
||||
.getAssistInfoForUser(UserHandle.USER_CURRENT) != null;
|
||||
if (mAssistantAvailable != available) {
|
||||
mNavigationBarView.setAssistantAvailable(available);
|
||||
sendAssistantAvailability(available);
|
||||
mAssistantAvailable = available;
|
||||
}
|
||||
}
|
||||
@@ -903,6 +903,17 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
mNavigationBarView.setAccessibilityButtonState(showAccessibilityButton, targetSelection);
|
||||
}
|
||||
|
||||
private void sendAssistantAvailability(boolean available) {
|
||||
if (mOverviewProxyService.getProxy() != null) {
|
||||
try {
|
||||
mOverviewProxyService.getProxy().onAssistantAvailable(available
|
||||
&& QuickStepContract.isGesturalMode(getContext()));
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Unable to send assistant availability data to launcher");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----- Methods that DisplayNavigationBarController talks to -----
|
||||
|
||||
/** Applies auto dimming animation on navigation bar when touched. */
|
||||
|
||||
@@ -145,7 +145,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
|
||||
private NotificationPanelView mPanelView;
|
||||
|
||||
private NavBarTintController mTintController;
|
||||
private boolean mAssistantAvailable;
|
||||
|
||||
/**
|
||||
* Helper that is responsible for showing the right toast when a disallowed activity operation
|
||||
@@ -759,23 +758,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
|
||||
mEdgeBackGestureHandler.onOverlaysChanged();
|
||||
}
|
||||
|
||||
public void setAssistantAvailable(boolean available) {
|
||||
mAssistantAvailable = available;
|
||||
updateAssistantAvailability();
|
||||
}
|
||||
|
||||
// TODO(b/112934365): move this back to NavigationBarFragment when prototype is removed
|
||||
private void updateAssistantAvailability() {
|
||||
boolean available = mAssistantAvailable && QuickStepContract.isGesturalMode(getContext());
|
||||
if (mOverviewProxyService.getProxy() != null) {
|
||||
try {
|
||||
mOverviewProxyService.getProxy().onAssistantAvailable(available);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Unable to send assistant availability data to launcher");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setMenuVisibility(final boolean show) {
|
||||
mContextualButtonGroup.setButtonVisiblity(R.id.menu, show);
|
||||
}
|
||||
@@ -898,10 +880,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
|
||||
public void showPinningEnterExitToast(boolean entering) {
|
||||
if (entering) {
|
||||
mScreenPinningNotify.showPinningStartToast();
|
||||
|
||||
// TODO(b/112934365): remove after prototype finished, only needed to escape from pin
|
||||
getBackButton().setVisibility(VISIBLE);
|
||||
getHomeButton().setVisibility(VISIBLE);
|
||||
} else {
|
||||
mScreenPinningNotify.showPinningExitToast();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user