Fix to support talkback function for tutorial message

1) Enable tutorial's touchable WindowManager.LayoutParams
2) Set window container transaction to align the latest windows bounds
information

Bug: 168178198

Test: manual
Test: atest SystemUITests
Change-Id: I48720bb3b344d984421b591876a503ce59d1f4c2
This commit is contained in:
Jason Chang
2020-09-23 20:18:26 +08:00
parent 8a8efbca8d
commit 736ceb0198
2 changed files with 9 additions and 5 deletions

View File

@@ -239,9 +239,14 @@ public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer {
throw new RuntimeException("Callers should call scheduleOffset() instead of this "
+ "directly");
}
final WindowContainerTransaction wct = new WindowContainerTransaction();
mDisplayAreaMap.forEach(
(key, leash) -> animateWindows(leash, fromBounds, toBounds, direction,
durationMs));
(key, leash) -> {
animateWindows(leash, fromBounds, toBounds, direction,
durationMs);
wct.setBounds(key.token, toBounds);
});
applyTransaction(wct);
}
private void resetWindowsOffset() {

View File

@@ -184,9 +184,8 @@ public class OneHandedTutorialHandler implements OneHandedTransitionCallback {
mDisplaySize.x, mTutorialAreaHeight, 0, 0,
WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT);
lp.gravity = Gravity.TOP | Gravity.LEFT;
lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
lp.setFitInsetsTypes(0 /* types */);