mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well. - Delay the unstash when IME is closing, to align with the end of the IME exit transition - Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons - Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two). Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed Bug: 202511986 Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
68 lines
2.0 KiB
Java
68 lines
2.0 KiB
Java
/*
|
|
* Copyright (C) 2021 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
package com.android.launcher3.taskbar;
|
|
|
|
import android.graphics.Rect;
|
|
import android.view.View;
|
|
|
|
import com.android.launcher3.model.data.ItemInfoWithIcon;
|
|
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
/**
|
|
* Base class for providing different taskbar UI
|
|
*/
|
|
public class TaskbarUIController {
|
|
|
|
public static final TaskbarUIController DEFAULT = new TaskbarUIController();
|
|
|
|
// Initialized in init.
|
|
protected TaskbarControllers mControllers;
|
|
|
|
protected void init(TaskbarControllers taskbarControllers) {
|
|
mControllers = taskbarControllers;
|
|
}
|
|
|
|
protected void onDestroy() { }
|
|
|
|
protected boolean isTaskbarTouchable() {
|
|
return true;
|
|
}
|
|
|
|
protected void updateContentInsets(Rect outContentInsets) { }
|
|
|
|
protected void onStashedInAppChanged() { }
|
|
|
|
public Stream<ItemInfoWithIcon> getAppIconsForEdu() {
|
|
return Stream.empty();
|
|
}
|
|
|
|
public void onTaskbarIconLaunched(WorkspaceItemInfo item) { }
|
|
|
|
public View getRootView() {
|
|
return mControllers.taskbarActivityContext.getDragLayer();
|
|
}
|
|
|
|
/**
|
|
* Called when swiping from the bottom nav region in fully gestural mode.
|
|
* @param inProgress True if the animation started, false if we just settled on an end target.
|
|
*/
|
|
public void setSystemGestureInProgress(boolean inProgress) {
|
|
mControllers.taskbarStashController.setSystemGestureInProgress(inProgress);
|
|
}
|
|
}
|