Make taskbar focusable when folder is open to get IME input

- Remove ActivityContext#supportsIme(), as it's always true now
- Add OnFolderStateChangedListener, which we register when clicking on a taskbar folder icon to set the window focusable/not.
- Also remove Folder.STATE_NONE and instead default to STATE_CLOSED (renamed from STATE_SMALL).

TODO: make sure back button is visible above IME (followup CL)

Test: Open a folder from taskbar while in an app, no animation jump and can change folder name
Bug: 180051157
Change-Id: I7c7847657d462c16677d66b9ffa8b6fe5f164084
This commit is contained in:
Tony Wickham
2021-12-16 17:40:38 +00:00
committed by Schneider Victor-tulias
parent 1af0e4d22e
commit c07fb08a1e
4 changed files with 69 additions and 41 deletions

View File

@@ -28,7 +28,6 @@ import android.os.Message;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import com.android.launcher3.BaseActivity;
import com.android.launcher3.views.ActivityContext;
/**
@@ -56,7 +55,7 @@ public class UiThreadHelper {
STATS_LOGGER_KEY,
Message.obtain(
HANDLER.get(root.getContext()),
() -> BaseActivity.fromContext(root.getContext())
() -> ActivityContext.lookupContext(root.getContext())
.getStatsLogManager()
.logger()
.log(LAUNCHER_ALLAPPS_KEYBOARD_CLOSED)