Make Taskbar focusable when a popup is open.

- Added ArrowPopup#OnPopupClosedCallback to automatically remove Taskbar focus when the popup closes.

Fixes: 209917078
Test: opened popup in taskbar and closed it with switch access, touching anywhere on the screen and using the back gesture. went home to check if focus was removed.
Change-Id: Ie7aafc9cf0f03fadaa44e77818508e9e1d8db610
This commit is contained in:
Schneider Victor-tulias
2022-01-12 14:33:43 -08:00
parent 66971f87e1
commit 291d88460b
4 changed files with 34 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ import android.animation.ObjectAnimator;
import androidx.annotation.NonNull;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseQuickstepLauncher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.statemanager.StateManager;
@@ -256,6 +257,10 @@ import java.util.function.Supplier;
if (hasAnyFlag(changedFlags, FLAG_RESUMED | FLAG_RECENTS_ANIMATION_RUNNING)) {
boolean goingToLauncher = hasAnyFlag(FLAG_RESUMED | FLAG_RECENTS_ANIMATION_RUNNING);
if (goingToLauncher) {
// Handle closing open popups when going home/overview
AbstractFloatingView.closeAllOpenViews(mControllers.taskbarActivityContext);
}
animatorSet.play(mTaskbarBackgroundAlpha.animateToValue(goingToLauncher ? 0 : 1)
.setDuration(duration));
}