Suppress focusability of normal launcher descendants when a popup opens.
Bug: 22563223
Change-Id: Iebee7c0c858a4d48524b3d5415e4f6d39861c49a
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index c5e49e6..6be6103 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3363,6 +3363,18 @@
return anim;
}
+ public void onLauncherClingShown() {
+ // When a launcher cling appears, it should cover the underlying layers, so their focus
+ // should be blocked.
+ if (mDragLayer.getDescendantFocusability() != ViewGroup.FOCUS_BLOCK_DESCENDANTS) {
+ mDragLayer.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
+ }
+ }
+
+ public void onLauncherClingDismissed() {
+ mDragLayer.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
+ }
+
public void enterSpringLoadedDragMode() {
if (LOGD) Log.d(TAG, String.format("enterSpringLoadedDragMode [mState=%s", mState.name()));
if (mState == State.WORKSPACE || mState == State.APPS_SPRING_LOADED ||