Merge "Small tweak to floating search on phone." into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4c4f9b67a7
@@ -102,6 +102,12 @@ public class LauncherAllAppsContainerView extends ActivityAllAppsContainerView<L
|
||||
|
||||
StateManager<LauncherState> stateManager = mActivityContext.getStateManager();
|
||||
|
||||
// Special case to not expand the search bar when exiting All Apps on phones.
|
||||
if (stateManager.getCurrentStableState() == LauncherState.ALL_APPS
|
||||
&& mActivityContext.getDeviceProfile().isPhone) {
|
||||
return LauncherState.ALL_APPS.getFloatingSearchBarRestingMarginStart(mActivityContext);
|
||||
}
|
||||
|
||||
if (stateManager.isInTransition() && stateManager.getTargetState() != null) {
|
||||
return stateManager.getTargetState()
|
||||
.getFloatingSearchBarRestingMarginStart(mActivityContext);
|
||||
@@ -118,6 +124,12 @@ public class LauncherAllAppsContainerView extends ActivityAllAppsContainerView<L
|
||||
|
||||
StateManager<LauncherState> stateManager = mActivityContext.getStateManager();
|
||||
|
||||
// Special case to not expand the search bar when exiting All Apps on phones.
|
||||
if (stateManager.getCurrentStableState() == LauncherState.ALL_APPS
|
||||
&& mActivityContext.getDeviceProfile().isPhone) {
|
||||
return LauncherState.ALL_APPS.getFloatingSearchBarRestingMarginEnd(mActivityContext);
|
||||
}
|
||||
|
||||
if (stateManager.isInTransition() && stateManager.getTargetState() != null) {
|
||||
return stateManager.getTargetState()
|
||||
.getFloatingSearchBarRestingMarginEnd(mActivityContext);
|
||||
|
||||
Reference in New Issue
Block a user