Merge "Only add divider when it need to show" into rvc-dev am: a73d6ecb84 am: dbe759768c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11612936 Change-Id: Iab51f9238ece0fc805ee50a9892d3c726c02fcab
This commit is contained in:
@@ -41,7 +41,6 @@ public class WindowlessWindowManager implements IWindowSession {
|
||||
private final static String TAG = "WindowlessWindowManager";
|
||||
|
||||
private class State {
|
||||
//TODO : b/150190730 we should create it when view show and release it when view invisible.
|
||||
SurfaceControl mSurfaceControl;
|
||||
WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
|
||||
int mDisplayId;
|
||||
|
||||
@@ -253,7 +253,9 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
||||
mSplitLayout.mSecondary = new Rect(mRotateSplitLayout.mSecondary);
|
||||
mRotateSplitLayout = null;
|
||||
}
|
||||
update(newConfig);
|
||||
if (isSplitActive()) {
|
||||
update(newConfig);
|
||||
}
|
||||
}
|
||||
|
||||
Handler getHandler() {
|
||||
@@ -328,11 +330,6 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
||||
mHandler.post(this::removeDivider);
|
||||
}
|
||||
|
||||
void onTasksReady() {
|
||||
mHandler.post(() -> update(mDisplayController.getDisplayContext(
|
||||
mContext.getDisplayId()).getResources().getConfiguration()));
|
||||
}
|
||||
|
||||
private void updateVisibility(final boolean visible) {
|
||||
if (DEBUG) Slog.d(TAG, "Updating visibility " + mVisible + "->" + visible);
|
||||
if (mVisible != visible) {
|
||||
@@ -524,7 +521,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
||||
|
||||
void ensureMinimizedSplit() {
|
||||
setHomeMinimized(true /* minimized */, mSplits.mSecondary.isResizable());
|
||||
if (!isDividerVisible()) {
|
||||
if (mView != null && !isDividerVisible()) {
|
||||
// Wasn't in split-mode yet, so enter now.
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, " entering split mode with minimized=true");
|
||||
@@ -535,7 +532,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
||||
|
||||
void ensureNormalSplit() {
|
||||
setHomeMinimized(false /* minimized */, mHomeStackResizable);
|
||||
if (!isDividerVisible()) {
|
||||
if (mView != null && !isDividerVisible()) {
|
||||
// Wasn't in split-mode, so enter now.
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, " enter split mode unminimized ");
|
||||
|
||||
@@ -113,8 +113,6 @@ class SplitScreenTaskOrganizer extends TaskOrganizer {
|
||||
t.setColor(mSecondaryDim, new float[]{0f, 0f, 0f});
|
||||
t.apply();
|
||||
releaseTransaction(t);
|
||||
|
||||
mDivider.onTasksReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user