Revert "Put the "floating" in ENABLE_FLOATING_SEARCH_BAR."
Revert submission 23624636-draglayer-inline-qsb Reason for revert: b/287172381 Reverted changes: /q/submissionid:23624636-draglayer-inline-qsb (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:92784b5bf646e2fd872f693839319849d08659d2) Merged-In: Ie4f9606baa724f543f034e0d5ca7ac4aa07bf747 Change-Id: Ie4f9606baa724f543f034e0d5ca7ac4aa07bf747
This commit is contained in:
1 parent
7a87d59813
commit
996bfae0b2
19 files changed
+75
-275
No files matched your search
+2
-2
@@ -47,9 +47,9 @@ public class TaskbarAllAppsContainerView extends
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View inflateSearchBar() {
|
||||
protected View inflateSearchBox() {
|
||||
if (isSearchSupported()) {
|
||||
return super.inflateSearchBar();
|
||||
return super.inflateSearchBox();
|
||||
}
|
||||
|
||||
// Remove top padding of header, since we do not have any search
|
||||
|
||||
@@ -181,13 +181,6 @@ public final class TaskbarAllAppsController {
|
||||
}
|
||||
|
||||
private void cleanUpOverlay() {
|
||||
// Floating search bar is added to the drag layer in ActivityAllAppsContainerView onAttach;
|
||||
// removed here as this is a special case that we remove the all apps panel.
|
||||
if (mAppsView != null && mOverlayContext != null
|
||||
&& mAppsView.getSearchUiDelegate().isSearchBarFloating()) {
|
||||
mOverlayContext.getDragLayer().removeView(mAppsView.getSearchView());
|
||||
mAppsView.getSearchUiDelegate().onDestroySearchBar();
|
||||
}
|
||||
if (mSearchSessionController != null) {
|
||||
mSearchSessionController.onDestroy();
|
||||
mSearchSessionController = null;
|
||||
|
||||
@@ -20,7 +20,6 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_ALLAP
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.R;
|
||||
@@ -105,23 +104,9 @@ public class AllAppsState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public int getVisibleElements(Launcher launcher) {
|
||||
int elements = ALL_APPS_CONTENT | FLOATING_SEARCH_BAR;
|
||||
// Only add HOTSEAT_ICONS for tablets in ALL_APPS state.
|
||||
if (launcher.getDeviceProfile().isTablet) {
|
||||
elements |= HOTSEAT_ICONS;
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFloatingSearchBarRestingMarginBottom(Launcher launcher) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldFloatingSearchBarUsePillWhenUnfocused(Launcher launcher) {
|
||||
DeviceProfile dp = launcher.getDeviceProfile();
|
||||
return dp.isPhone && !dp.isLandscape;
|
||||
// Don't add HOTSEAT_ICONS for non-tablets in ALL_APPS state.
|
||||
return launcher.getDeviceProfile().isTablet ? ALL_APPS_CONTENT | HOTSEAT_ICONS
|
||||
: ALL_APPS_CONTENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -107,32 +107,7 @@ public class OverviewState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public int getVisibleElements(Launcher launcher) {
|
||||
int elements = CLEAR_ALL_BUTTON | OVERVIEW_ACTIONS;
|
||||
DeviceProfile dp = launcher.getDeviceProfile();
|
||||
boolean showFloatingSearch;
|
||||
if (dp.isPhone) {
|
||||
// Only show search in phone overview in portrait mode.
|
||||
showFloatingSearch = !dp.isLandscape;
|
||||
} else {
|
||||
// Only show search in tablet overview if taskbar is not visible.
|
||||
showFloatingSearch = !dp.isTaskbarPresent || isTaskbarStashed(launcher);
|
||||
}
|
||||
if (showFloatingSearch) {
|
||||
elements |= FLOATING_SEARCH_BAR;
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFloatingSearchBarRestingMarginBottom(Launcher launcher) {
|
||||
return areElementsVisible(launcher, FLOATING_SEARCH_BAR) ? 0
|
||||
: super.getFloatingSearchBarRestingMarginBottom(launcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldFloatingSearchBarUsePillWhenUnfocused(Launcher launcher) {
|
||||
DeviceProfile dp = launcher.getDeviceProfile();
|
||||
return dp.isPhone && !dp.isLandscape;
|
||||
return CLEAR_ALL_BUTTON | OVERVIEW_ACTIONS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -811,10 +811,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
VibratorWrapper.INSTANCE.get(mContext).vibrate(OVERVIEW_HAPTIC);
|
||||
maybeUpdateRecentsAttachedState(true);
|
||||
|
||||
if (mActivity != null) {
|
||||
mActivity.getAppsView().getSearchUiManager().prepareToFocusEditText(mIsInAllAppsRegion);
|
||||
}
|
||||
|
||||
// Draw active task below Launcher so that All Apps can appear over it.
|
||||
runActionOnRemoteHandles(remoteTargetHandle ->
|
||||
remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(isInAllAppsRegion));
|
||||
|
||||
@@ -56,7 +56,7 @@ public class AnimatorControllerWithResistance {
|
||||
|
||||
private enum RecentsResistanceParams {
|
||||
FROM_APP(0.75f, 0.5f, 1f, false),
|
||||
FROM_APP_TO_ALL_APPS(1f, 0.6f, 0.8f, false),
|
||||
FROM_APP_TO_ALL_APPS(0.75f, 0.5f, 0.8f, false),
|
||||
FROM_APP_TABLET(1f, 0.7f, 1f, true),
|
||||
FROM_APP_TO_ALL_APPS_TABLET(1f, 0.5f, 0.5f, false),
|
||||
FROM_OVERVIEW(1f, 0.75f, 0.5f, false);
|
||||
|
||||
Reference in new issue
Block a user