Merge "When adding overlay to a task, emit an immediate inset update" into tm-dev am: 11000cfd99 am: 455c2816d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607621 Change-Id: If09bf3c5472af62f2b22f37c05f4b8a0d09c4b37 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3427,6 +3427,12 @@
|
||||
"group": "WM_DEBUG_FOCUS_LIGHT",
|
||||
"at": "com\/android\/server\/wm\/WindowState.java"
|
||||
},
|
||||
"1288920916": {
|
||||
"message": "Error sending initial insets change to WindowContainer overlay",
|
||||
"level": "ERROR",
|
||||
"group": "WM_DEBUG_ANIM",
|
||||
"at": "com\/android\/server\/wm\/WindowContainer.java"
|
||||
},
|
||||
"1305412562": {
|
||||
"message": "Report configuration: %s %s",
|
||||
"level": "VERBOSE",
|
||||
|
||||
@@ -1225,12 +1225,6 @@ public class BubbleController {
|
||||
mOverflowListener.applyUpdate(update);
|
||||
}
|
||||
|
||||
// Collapsing? Do this first before remaining steps.
|
||||
if (update.expandedChanged && !update.expanded) {
|
||||
mStackView.setExpanded(false);
|
||||
mSysuiProxy.requestNotificationShadeTopUi(false, TAG);
|
||||
}
|
||||
|
||||
// Do removals, if any.
|
||||
ArrayList<Pair<Bubble, Integer>> removedBubbles =
|
||||
new ArrayList<>(update.removedBubbles);
|
||||
@@ -1307,6 +1301,11 @@ public class BubbleController {
|
||||
mStackView.updateBubbleOrder(update.bubbles);
|
||||
}
|
||||
|
||||
if (update.expandedChanged && !update.expanded) {
|
||||
mStackView.setExpanded(false);
|
||||
mSysuiProxy.requestNotificationShadeTopUi(false, TAG);
|
||||
}
|
||||
|
||||
if (update.selectionChanged && mStackView != null) {
|
||||
mStackView.setSelectedBubble(update.selectedBubble);
|
||||
if (update.selectedBubble != null) {
|
||||
|
||||
@@ -3863,7 +3863,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
@AnimationType int type, @Nullable AnimationAdapter snapshotAnim);
|
||||
}
|
||||
|
||||
void addTrustedOverlay(SurfaceControlViewHost.SurfacePackage overlay) {
|
||||
void addTrustedOverlay(SurfaceControlViewHost.SurfacePackage overlay,
|
||||
@Nullable WindowState initialWindowState) {
|
||||
if (mOverlayHost == null) {
|
||||
mOverlayHost = new TrustedOverlayHost(mWmService);
|
||||
}
|
||||
@@ -3879,6 +3880,20 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
"Error sending initial configuration change to WindowContainer overlay");
|
||||
removeTrustedOverlay(overlay);
|
||||
}
|
||||
|
||||
// Emit an initial WindowState so that proper insets are available to overlay views
|
||||
// shortly after the overlay is added.
|
||||
if (initialWindowState != null) {
|
||||
final InsetsState insetsState = initialWindowState.getInsetsState();
|
||||
final Rect dispBounds = getBounds();
|
||||
try {
|
||||
overlay.getRemoteInterface().onInsetsChanged(insetsState, dispBounds);
|
||||
} catch (Exception e) {
|
||||
ProtoLog.e(WM_DEBUG_ANIM,
|
||||
"Error sending initial insets change to WindowContainer overlay");
|
||||
removeTrustedOverlay(overlay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void removeTrustedOverlay(SurfaceControlViewHost.SurfacePackage overlay) {
|
||||
|
||||
@@ -8135,7 +8135,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
if (task == null) {
|
||||
throw new IllegalArgumentException("no task with taskId" + taskId);
|
||||
}
|
||||
task.addTrustedOverlay(overlay);
|
||||
task.addTrustedOverlay(overlay, task.getTopVisibleAppMainWindow());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user