Add handling for toggling keyboard stashing from the keyboard

Flag: ENABLE_KEYBOARD_TASKBAR_TOGGLE
Bug: 281726846
Fixes: 246660615
Test: toggled the transient taskbar with the meta+t input
Change-Id: I315f83850b11d24d8b55061d7111300effb43936
This commit is contained in:
Schneider Victor-tulias
2023-05-03 10:10:21 -07:00
parent 125e121834
commit eb8dce01ce
5 changed files with 28 additions and 12 deletions

View File

@@ -85,6 +85,7 @@ import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.provider.RestoreDbTask;
import com.android.launcher3.statehandlers.DesktopVisibilityController;
import com.android.launcher3.statemanager.StatefulActivity;
@@ -207,7 +208,15 @@ public class TouchInteractionService extends Service
@BinderThread
@Override
public void onTaskbarToggled() {
// To be implemented.
if (!FeatureFlags.ENABLE_KEYBOARD_TASKBAR_TOGGLE.get()) return;
MAIN_EXECUTOR.execute(() -> {
TaskbarActivityContext activityContext =
mTaskbarManager.getCurrentActivityContext();
if (activityContext != null) {
activityContext.toggleTaskbarStash();
}
});
}
@BinderThread