Removing back-button alpha animation code
Back button is only animation in 2-button UI which is not supported anymore
Bug: 246006580
Test: Presubmit
Change-Id: I7385b07272e44c1f9f0488c158e1b4ee67060120
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 4312c3d..8e978d1 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1123,6 +1123,7 @@
.log(getAllAppsEntryEvent().get());
}
}
+ updateDisallowBack();
}
/**
@@ -3133,7 +3134,18 @@
public void useFadeOutAnimationForLauncherStart(CancellationSignal signal) { }
- public void onDragLayerHierarchyChanged() { }
+ public void onDragLayerHierarchyChanged() {
+ updateDisallowBack();
+ }
+
+ private void updateDisallowBack() {
+ LauncherRootView rv = getRootView();
+ if (rv != null) {
+ boolean disableBack = getStateManager().getState() == NORMAL
+ && AbstractFloatingView.getTopOpenView(this) == null;
+ rv.setDisallowBackGesture(disableBack);
+ }
+ }
@Override
public void returnToHomescreen() {