Merge "Fix to support talkback function for tutorial message"

This commit is contained in:
Jason Chang
2020-09-29 06:26:29 +00:00
committed by Android (Google) Code Review
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 */);