Hide taskbar while VoiceInteractionWindow is visible

- Fade out icons (or stashed handle if stashed)
- Move background to APPLICATION_OVERLAY layer (behind VIW)
  - Only for gesture nav
- On home screen in 3 button mode, translate buttons down when assistant
  is invoked

Test: Invoke assistant, ensure it draws above taskbar background and
taskbar stops drawing icons or stashed handle
Bug: 225200928

Change-Id: I7807d30df8f358295b8231d89217c7413f32c6f9
Merged-In: I7807d30df8f358295b8231d89217c7413f32c6f9
This commit is contained in:
Tony Wickham
2022-04-04 14:58:30 -07:00
parent d3a7d37a57
commit 9a54d2aa43
6 changed files with 152 additions and 11 deletions

View File

@@ -27,6 +27,7 @@ import static com.android.launcher3.ResourceUtils.getBoolByName;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_FOLDER_OPEN;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
@@ -200,7 +201,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
new TaskbarPopupController(this),
new TaskbarForceVisibleImmersiveController(this),
new TaskbarAllAppsController(this, dp),
new TaskbarInsetsController(this));
new TaskbarInsetsController(this),
new VoiceInteractionWindowController(this));
}
public void init(@NonNull TaskbarSharedState sharedState) {
@@ -246,12 +248,20 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
return super.getStatsLogManager();
}
/** Creates LayoutParams for adding a view directly to WindowManager as a new window */
/** @see #createDefaultWindowLayoutParams(int) */
public WindowManager.LayoutParams createDefaultWindowLayoutParams() {
return createDefaultWindowLayoutParams(TYPE_NAVIGATION_BAR_PANEL);
}
/**
* Creates LayoutParams for adding a view directly to WindowManager as a new window.
* @param type The window type to pass to the created WindowManager.LayoutParams.
*/
public WindowManager.LayoutParams createDefaultWindowLayoutParams(int type) {
WindowManager.LayoutParams windowLayoutParams = new WindowManager.LayoutParams(
MATCH_PARENT,
mLastRequestedNonFullscreenHeight,
TYPE_NAVIGATION_BAR_PANEL,
type,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_SLIPPERY,
PixelFormat.TRANSLUCENT);
@@ -468,6 +478,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
fromInit);
mControllers.navButtonController.updateSysuiFlags(systemUiStateFlags);
mControllers.taskbarForceVisibleImmersiveController.updateSysuiFlags(systemUiStateFlags);
mControllers.voiceInteractionWindowController.setIsVoiceInteractionWindowVisible(
(systemUiStateFlags & SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING) != 0, fromInit);
}
/**
@@ -612,7 +624,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
/** Removes the given view from WindowManager. See {@link #addWindowView}. */
public void removeWindowView(View view) {
mWindowManager.removeViewImmediate(view);
if (view.isAttachedToWindow()) {
mWindowManager.removeViewImmediate(view);
}
}
protected void onTaskbarIconClicked(View view) {