mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Remove flicker when dismissing snackbar
Bug: 191972314 Test: manual Change-Id: Icf185b89c07b363ec44c77ba3ac1bdeb34e30e59
This commit is contained in:
@@ -51,7 +51,6 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.core.os.BuildCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
@@ -260,21 +259,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
mWorkAdapterProvider.updateCurrentState(isEnabled);
|
||||
}
|
||||
|
||||
private void hideInput() {
|
||||
if (!BuildCompat.isAtLeastR() || !FeatureFlags.ENABLE_DEVICE_SEARCH.get()) return;
|
||||
|
||||
WindowInsets insets = getRootWindowInsets();
|
||||
if (insets == null) return;
|
||||
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
hideIme();
|
||||
}
|
||||
}
|
||||
|
||||
protected void hideIme() {
|
||||
getWindowInsetsController().hide(WindowInsets.Type.ime());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the view itself will handle the touch event or not.
|
||||
*/
|
||||
@@ -290,7 +274,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
}
|
||||
if (rv.getScrollbar().getThumbOffsetY() >= 0 &&
|
||||
mLauncher.getDragLayer().isEventOverView(rv.getScrollbar(), ev)) {
|
||||
hideInput();
|
||||
return false;
|
||||
}
|
||||
return rv.shouldContainerScroll(ev, mLauncher.getDragLayer());
|
||||
|
||||
Reference in New Issue
Block a user