Skip to content

Commit 8acb04e

Browse files
Tony HuangAndroid (Google) Code Review
authored andcommitted
Merge "Only add divider when it need to show" into rvc-dev
2 parents 861273e + 91bba49 commit 8acb04e

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

core/java/android/view/WindowlessWindowManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public class WindowlessWindowManager implements IWindowSession {
4141
private final static String TAG = "WindowlessWindowManager";
4242

4343
private class State {
44-
//TODO : b/150190730 we should create it when view show and release it when view invisible.
4544
SurfaceControl mSurfaceControl;
4645
WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
4746
int mDisplayId;

packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ public void onDisplayConfigurationChanged(int displayId, Configuration newConfig
238238
mSplitLayout.mSecondary = new Rect(mRotateSplitLayout.mSecondary);
239239
mRotateSplitLayout = null;
240240
}
241-
update(newConfig);
241+
242+
if (isSplitActive()) {
243+
update(newConfig);
244+
}
242245
}
243246

244247
Handler getHandler() {
@@ -313,11 +316,6 @@ void onTaskVanished() {
313316
mHandler.post(this::removeDivider);
314317
}
315318

316-
void onTasksReady() {
317-
mHandler.post(() -> update(mDisplayController.getDisplayContext(
318-
mContext.getDisplayId()).getResources().getConfiguration()));
319-
}
320-
321319
private void updateVisibility(final boolean visible) {
322320
if (DEBUG) Slog.d(TAG, "Updating visibility " + mVisible + "->" + visible);
323321
if (mVisible != visible) {

packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ public void onTaskAppeared(RunningTaskInfo taskInfo, SurfaceControl leash) {
113113
t.setColor(mSecondaryDim, new float[]{0f, 0f, 0f});
114114
t.apply();
115115
releaseTransaction(t);
116-
117-
mDivider.onTasksReady();
118116
}
119117
}
120118
}

0 commit comments

Comments
 (0)