Fixes to VoiceInteractionWindowController

- Make temporary taskbar background behind assistant non-touchable
  (fail-safe in case the window isn't removed for some reason)
- Give temporary taskbar background a different window title and
  add a couple more dump statements to help debugging
- Only show the taskbar background for persistent taskbar; transient
  taskbar can skip most of the special casing and just hide it
- Fix bug where we weren't drawing the separate taskbar background in 3
  button mode
- Fix bug where we weren't actually synchronizing
  separateWindowForTaskbarBackground with TaskbarDragLayer, since the
  former wasn't attached to the window yet; now we wait until it is
  attached before calling synchronizeNextDraw()
- Also added dump logs for TaskbarDragLayerController alpha channels

Test: manual in 3 button and gesture nav (with and without
FORCE_PERSISTENT_TASKBAR enabled)
Fixes: 243652789
Bug: 262664266

Change-Id: I865871e57dd4cb255a916317a7e5d35cfde97df5
This commit is contained in:
Tony Wickham
2023-01-21 00:47:08 +00:00
parent b9ecff07e4
commit c3963a7ff4
5 changed files with 139 additions and 30 deletions

View File

@@ -49,6 +49,8 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
private final AnimatedFloat mNotificationShadeBgTaskbar = new AnimatedFloat(
this::updateBackgroundAlpha);
private final AnimatedFloat mImeBgTaskbar = new AnimatedFloat(this::updateBackgroundAlpha);
private final AnimatedFloat mAssistantBgTaskbar = new AnimatedFloat(
this::updateBackgroundAlpha);
// Used to hide our background color when someone else (e.g. ScrimView) is handling it.
private final AnimatedFloat mBgOverride = new AnimatedFloat(this::updateBackgroundAlpha);
@@ -82,6 +84,7 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
mKeyguardBgTaskbar.value = 1;
mNotificationShadeBgTaskbar.value = 1;
mImeBgTaskbar.value = 1;
mAssistantBgTaskbar.value = 1;
mBgOverride.value = 1;
updateBackgroundAlpha();
}
@@ -120,6 +123,10 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
return mImeBgTaskbar;
}
public AnimatedFloat getAssistantBgTaskbar() {
return mAssistantBgTaskbar;
}
public AnimatedFloat getOverrideBackgroundAlpha() {
return mBgOverride;
}
@@ -144,7 +151,8 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
private void updateBackgroundAlpha() {
final float bgNavbar = mBgNavbar.value;
final float bgTaskbar = mBgTaskbar.value * mKeyguardBgTaskbar.value
* mNotificationShadeBgTaskbar.value * mImeBgTaskbar.value;
* mNotificationShadeBgTaskbar.value * mImeBgTaskbar.value
* mAssistantBgTaskbar.value;
mLastSetBackgroundAlpha = mBgOverride.value * Math.max(bgNavbar, bgTaskbar);
mTaskbarDragLayer.setTaskbarBackgroundAlpha(mLastSetBackgroundAlpha);
@@ -196,6 +204,13 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
pw.println(prefix + "\tmBgOffset=" + mBgOffset.value);
pw.println(prefix + "\tmFolderMargin=" + mFolderMargin);
pw.println(prefix + "\tmLastSetBackgroundAlpha=" + mLastSetBackgroundAlpha);
pw.println(prefix + "\t\tmBgOverride=" + mBgOverride.value);
pw.println(prefix + "\t\tmBgNavbar=" + mBgNavbar.value);
pw.println(prefix + "\t\tmBgTaskbar=" + mBgTaskbar.value);
pw.println(prefix + "\t\tmKeyguardBgTaskbar=" + mKeyguardBgTaskbar.value);
pw.println(prefix + "\t\tmNotificationShadeBgTaskbar=" + mNotificationShadeBgTaskbar.value);
pw.println(prefix + "\t\tmImeBgTaskbar=" + mImeBgTaskbar.value);
pw.println(prefix + "\t\tmAssistantBgTaskbar=" + mAssistantBgTaskbar.value);
}
/**