Merge "RESTRICT AUTOMERGE: Fix snapshot starting window stuck if the task never gain focus" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
854b04130b
@@ -123,7 +123,7 @@ public class TaskSnapshotWindow {
|
|||||||
* Ideally the delay time will be shorter when receiving
|
* Ideally the delay time will be shorter when receiving
|
||||||
* {@link StartingSurfaceDrawer#onImeDrawnOnTask(int)}.
|
* {@link StartingSurfaceDrawer#onImeDrawnOnTask(int)}.
|
||||||
*/
|
*/
|
||||||
private static final long MAX_DELAY_REMOVAL_TIME_IME_VISIBLE = 450;
|
private static final long MAX_DELAY_REMOVAL_TIME_IME_VISIBLE = 600;
|
||||||
|
|
||||||
//tmp vars for unused relayout params
|
//tmp vars for unused relayout params
|
||||||
private static final Point TMP_SURFACE_SIZE = new Point();
|
private static final Point TMP_SURFACE_SIZE = new Point();
|
||||||
|
|||||||
@@ -2253,17 +2253,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeStartingWindowIfNeeded() {
|
|
||||||
// Removing the task snapshot after the task is actually focused (see
|
|
||||||
// Task#onWindowFocusChanged). Since some of the app contents may draw in this time and
|
|
||||||
// requires more times to draw finish, in case flicking may happen when removing the task
|
|
||||||
// snapshot too early. (i.e. Showing IME.)
|
|
||||||
if ((mStartingData instanceof SnapshotStartingData) && !getTask().isFocused()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
removeStartingWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
void removeStartingWindow() {
|
void removeStartingWindow() {
|
||||||
removeStartingWindowAnimation(true /* prepareAnimation */);
|
removeStartingWindowAnimation(true /* prepareAnimation */);
|
||||||
}
|
}
|
||||||
@@ -5835,7 +5824,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
// own stuff.
|
// own stuff.
|
||||||
win.cancelAnimation();
|
win.cancelAnimation();
|
||||||
}
|
}
|
||||||
removeStartingWindowIfNeeded();
|
removeStartingWindow();
|
||||||
updateReportedVisibilityLocked();
|
updateReportedVisibilityLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5206,10 +5206,6 @@ class Task extends WindowContainer<WindowContainer> {
|
|||||||
* @param hasFocus
|
* @param hasFocus
|
||||||
*/
|
*/
|
||||||
void onWindowFocusChanged(boolean hasFocus) {
|
void onWindowFocusChanged(boolean hasFocus) {
|
||||||
final ActivityRecord topAct = getTopVisibleActivity();
|
|
||||||
if (topAct != null && (topAct.mStartingData instanceof SnapshotStartingData)) {
|
|
||||||
topAct.removeStartingWindowIfNeeded();
|
|
||||||
}
|
|
||||||
updateShadowsRadius(hasFocus, getSyncTransaction());
|
updateShadowsRadius(hasFocus, getSyncTransaction());
|
||||||
// TODO(b/180525887): Un-comment once there is resolution on the bug.
|
// TODO(b/180525887): Un-comment once there is resolution on the bug.
|
||||||
// dispatchTaskInfoChangedIfNeeded(false /* force */);
|
// dispatchTaskInfoChangedIfNeeded(false /* force */);
|
||||||
|
|||||||
Reference in New Issue
Block a user