diff --git a/packages/SystemUI/res/anim/forced_resizable_enter.xml b/libs/WindowManager/Shell/res/anim/forced_resizable_enter.xml
similarity index 100%
rename from packages/SystemUI/res/anim/forced_resizable_enter.xml
rename to libs/WindowManager/Shell/res/anim/forced_resizable_enter.xml
diff --git a/packages/SystemUI/res/anim/forced_resizable_exit.xml b/libs/WindowManager/Shell/res/anim/forced_resizable_exit.xml
similarity index 100%
rename from packages/SystemUI/res/anim/forced_resizable_exit.xml
rename to libs/WindowManager/Shell/res/anim/forced_resizable_exit.xml
diff --git a/packages/SystemUI/res/layout/divider.xml b/libs/WindowManager/Shell/res/layout/divider.xml
similarity index 100%
rename from packages/SystemUI/res/layout/divider.xml
rename to libs/WindowManager/Shell/res/layout/divider.xml
diff --git a/packages/SystemUI/res/layout/docked_stack_divider.xml b/libs/WindowManager/Shell/res/layout/docked_stack_divider.xml
similarity index 86%
rename from packages/SystemUI/res/layout/docked_stack_divider.xml
rename to libs/WindowManager/Shell/res/layout/docked_stack_divider.xml
index 70e5451eed57b..ad870252d819a 100644
--- a/packages/SystemUI/res/layout/docked_stack_divider.xml
+++ b/libs/WindowManager/Shell/res/layout/docked_stack_divider.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
-
@@ -24,15 +24,15 @@
android:id="@+id/docked_divider_background"
android:background="@color/docked_divider_background"/>
- ">
-
-
+
diff --git a/packages/SystemUI/res/layout/forced_resizable_activity.xml b/libs/WindowManager/Shell/res/layout/forced_resizable_activity.xml
similarity index 100%
rename from packages/SystemUI/res/layout/forced_resizable_activity.xml
rename to libs/WindowManager/Shell/res/layout/forced_resizable_activity.xml
diff --git a/libs/WindowManager/Shell/res/values-land/dimens.xml b/libs/WindowManager/Shell/res/values-land/dimens.xml
new file mode 100644
index 0000000000000..77a601ddf4401
--- /dev/null
+++ b/libs/WindowManager/Shell/res/values-land/dimens.xml
@@ -0,0 +1,21 @@
+
+
+
+ 2dp
+ 16dp
+
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/values-land/styles.xml b/libs/WindowManager/Shell/res/values-land/styles.xml
new file mode 100644
index 0000000000000..863bb69d40342
--- /dev/null
+++ b/libs/WindowManager/Shell/res/values-land/styles.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/WindowManager/Shell/res/values-sw600dp/config.xml b/libs/WindowManager/Shell/res/values-sw600dp/config.xml
new file mode 100644
index 0000000000000..f194532f1e0d5
--- /dev/null
+++ b/libs/WindowManager/Shell/res/values-sw600dp/config.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ 290
+
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml
new file mode 100644
index 0000000000000..6a19083e37884
--- /dev/null
+++ b/libs/WindowManager/Shell/res/values/colors.xml
@@ -0,0 +1,25 @@
+
+
+
+ #ff000000
+ #ffffff
+ #59000000
+ #60000000
+ #00000000
+
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/values/config.xml b/libs/WindowManager/Shell/res/values/config.xml
index 245c0725c2a8c..39efd0768eaa1 100644
--- a/libs/WindowManager/Shell/res/values/config.xml
+++ b/libs/WindowManager/Shell/res/values/config.xml
@@ -26,4 +26,7 @@
false
+
+
+ 250
diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml
index 1c1217681b9f5..ce690281b491b 100644
--- a/libs/WindowManager/Shell/res/values/dimen.xml
+++ b/libs/WindowManager/Shell/res/values/dimen.xml
@@ -56,4 +56,10 @@
12dp
4dp
0dp
+
+
+ 4dp
+
+ 16dp
+ 2dp
diff --git a/libs/WindowManager/Shell/res/values/ids.xml b/libs/WindowManager/Shell/res/values/ids.xml
index ed20398f309d5..fb892388cf740 100644
--- a/libs/WindowManager/Shell/res/values/ids.xml
+++ b/libs/WindowManager/Shell/res/values/ids.xml
@@ -16,4 +16,11 @@
-->
+
+
+
+
+
+
+
diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml
index 6752b56fcdf35..cad924771cd34 100644
--- a/libs/WindowManager/Shell/res/values/strings.xml
+++ b/libs/WindowManager/Shell/res/values/strings.xml
@@ -53,4 +53,39 @@
Drag down to dismiss
+
+
+
+ App may not work with split-screen.
+
+ App does not support split-screen.
+
+ App may not work on a secondary display.
+
+ App does not support launch on secondary displays.
+
+
+ Split-screen divider
+
+
+ Left full screen
+
+ Left 70%
+
+ Left 50%
+
+ Left 30%
+
+ Right full screen
+
+
+ Top full screen
+
+ Top 70%
+
+ Top 50%
+
+ Top 30%
+
+ Bottom full screen
diff --git a/libs/WindowManager/Shell/res/values/styles.xml b/libs/WindowManager/Shell/res/values/styles.xml
new file mode 100644
index 0000000000000..fffcd33f79920
--- /dev/null
+++ b/libs/WindowManager/Shell/res/values/styles.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SyncTransactionQueue.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java
similarity index 90%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/SyncTransactionQueue.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java
index 13ed02e9513e8..9cb125087cd9d 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/SyncTransactionQueue.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.common;
+import android.annotation.NonNull;
import android.os.Handler;
import android.util.Slog;
import android.view.SurfaceControl;
@@ -23,17 +24,13 @@ import android.window.WindowContainerTransaction;
import android.window.WindowContainerTransactionCallback;
import android.window.WindowOrganizer;
-import androidx.annotation.NonNull;
-
-import com.android.wm.shell.common.TransactionPool;
-
import java.util.ArrayList;
/**
* Helper for serializing sync-transactions and corresponding callbacks.
*/
-class SyncTransactionQueue {
- private static final boolean DEBUG = SplitScreenController.DEBUG;
+public final class SyncTransactionQueue {
+ private static final boolean DEBUG = false;
private static final String TAG = "SyncTransactionQueue";
// Just a little longer than the sync-engine timeout of 5s
@@ -58,7 +55,7 @@ class SyncTransactionQueue {
}
};
- SyncTransactionQueue(TransactionPool pool, Handler handler) {
+ public SyncTransactionQueue(TransactionPool pool, Handler handler) {
mTransactionPool = pool;
mHandler = handler;
}
@@ -66,7 +63,7 @@ class SyncTransactionQueue {
/**
* Queues a sync transaction to be sent serially to WM.
*/
- void queue(WindowContainerTransaction wct) {
+ public void queue(WindowContainerTransaction wct) {
SyncCallback cb = new SyncCallback(wct);
synchronized (mQueue) {
if (DEBUG) Slog.d(TAG, "Queueing up " + wct);
@@ -82,7 +79,7 @@ class SyncTransactionQueue {
* Otherwise just returns without queueing.
* @return {@code true} if queued, {@code false} if not.
*/
- boolean queueIfWaiting(WindowContainerTransaction wct) {
+ public boolean queueIfWaiting(WindowContainerTransaction wct) {
synchronized (mQueue) {
if (mQueue.isEmpty()) {
if (DEBUG) Slog.d(TAG, "Nothing in queue, so skip queueing up " + wct);
@@ -102,7 +99,7 @@ class SyncTransactionQueue {
* Runs a runnable in sync with sync transactions (ie. when the current in-flight transaction
* returns. If there are no transactions in-flight, runnable executes immediately.
*/
- void runInSync(TransactionRunnable runnable) {
+ public void runInSync(TransactionRunnable runnable) {
synchronized (mQueue) {
if (DEBUG) Slog.d(TAG, "Run in sync. mInFlight=" + mInFlight);
if (mInFlight != null) {
@@ -127,7 +124,9 @@ class SyncTransactionQueue {
t.close();
}
- interface TransactionRunnable {
+ /** Task to run with transaction. */
+ public interface TransactionRunnable {
+ /** Runs with transaction. */
void runWithTransaction(SurfaceControl.Transaction t);
}
@@ -154,7 +153,7 @@ class SyncTransactionQueue {
@Override
public void onTransactionReady(int id,
- @androidx.annotation.NonNull SurfaceControl.Transaction t) {
+ @NonNull SurfaceControl.Transaction t) {
mHandler.post(() -> {
synchronized (mQueue) {
if (mId != id) {
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerHandleView.java
similarity index 76%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerHandleView.java
index 1559169bd8cad..2cb1fff4cde66 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerHandleView.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -28,43 +28,41 @@ import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
-import com.android.systemui.R;
+import com.android.wm.shell.R;
import com.android.wm.shell.animation.Interpolators;
/**
* View for the handle in the docked stack divider.
*/
-class DividerHandleView extends View {
+public class DividerHandleView extends View {
- private final static Property WIDTH_PROPERTY
- = new Property(Integer.class, "width") {
+ private static final Property WIDTH_PROPERTY =
+ new Property(Integer.class, "width") {
+ @Override
+ public Integer get(DividerHandleView object) {
+ return object.mCurrentWidth;
+ }
- @Override
- public Integer get(DividerHandleView object) {
- return object.mCurrentWidth;
- }
+ @Override
+ public void set(DividerHandleView object, Integer value) {
+ object.mCurrentWidth = value;
+ object.invalidate();
+ }
+ };
- @Override
- public void set(DividerHandleView object, Integer value) {
- object.mCurrentWidth = value;
- object.invalidate();
- }
- };
+ private static final Property HEIGHT_PROPERTY =
+ new Property(Integer.class, "height") {
+ @Override
+ public Integer get(DividerHandleView object) {
+ return object.mCurrentHeight;
+ }
- private final static Property HEIGHT_PROPERTY
- = new Property(Integer.class, "height") {
-
- @Override
- public Integer get(DividerHandleView object) {
- return object.mCurrentHeight;
- }
-
- @Override
- public void set(DividerHandleView object, Integer value) {
- object.mCurrentHeight = value;
- object.invalidate();
- }
- };
+ @Override
+ public void set(DividerHandleView object, Integer value) {
+ object.mCurrentHeight = value;
+ object.invalidate();
+ }
+ };
private final Paint mPaint = new Paint();
private final int mWidth;
@@ -86,7 +84,7 @@ class DividerHandleView extends View {
mCircleDiameter = (mWidth + mHeight) / 3;
}
- public void setTouching(boolean touching, boolean animate) {
+ void setTouching(boolean touching, boolean animate) {
if (touching == mTouching) {
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerImeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerImeController.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/DividerImeController.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerImeController.java
index 64ee7ed5e0e09..92cee8a1a874a 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerImeController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerImeController.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED;
import static android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED;
@@ -22,6 +22,7 @@ import static android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
+import android.annotation.Nullable;
import android.graphics.Rect;
import android.os.Handler;
import android.util.Slog;
@@ -31,8 +32,6 @@ import android.window.WindowContainerToken;
import android.window.WindowContainerTransaction;
import android.window.WindowOrganizer;
-import androidx.annotation.Nullable;
-
import com.android.wm.shell.common.DisplayImeController;
import com.android.wm.shell.common.TransactionPool;
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerState.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerState.java
similarity index 88%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/DividerState.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerState.java
index 8e79d51ee2099..23d86a00d4bf6 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerState.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerState.java
@@ -11,15 +11,15 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
/**
* Class to hold state of divider that needs to persist across configuration changes.
*/
-public class DividerState {
+final class DividerState {
public boolean animateAfterRecentsDrawn;
public float mRatioPositionBeforeMinimized;
}
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerView.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerView.java
index 9bf7ea6819260..79bfda92bd921 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerView.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.view.PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW;
import static android.view.PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW;
@@ -62,7 +62,7 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.policy.DividerSnapAlgorithm;
import com.android.internal.policy.DividerSnapAlgorithm.SnapTarget;
import com.android.internal.policy.DockedDividerUtils;
-import com.android.systemui.R;
+import com.android.wm.shell.R;
import com.android.wm.shell.animation.FlingAnimationUtils;
import com.android.wm.shell.animation.Interpolators;
@@ -76,7 +76,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
private static final String TAG = "DividerView";
private static final boolean DEBUG = SplitScreenController.DEBUG;
- public interface DividerCallbacks {
+ interface DividerCallbacks {
void onDraggingStart();
void onDraggingEnd();
}
@@ -187,7 +187,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
if (snapAlgorithm.showMiddleSplitTargetForAccessibility()) {
// Only show the middle target if there are more than 1 split target
info.addAction(new AccessibilityAction(R.id.action_move_tl_50,
- mContext.getString(R.string.accessibility_action_divider_top_50)));
+ mContext.getString(R.string.accessibility_action_divider_top_50)));
}
if (snapAlgorithm.isLastSplitTargetAvailable()) {
info.addAction(new AccessibilityAction(R.id.action_move_tl_30,
@@ -205,7 +205,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
if (snapAlgorithm.showMiddleSplitTargetForAccessibility()) {
// Only show the middle target if there are more than 1 split target
info.addAction(new AccessibilityAction(R.id.action_move_tl_50,
- mContext.getString(R.string.accessibility_action_divider_left_50)));
+ mContext.getString(R.string.accessibility_action_divider_left_50)));
}
if (snapAlgorithm.isLastSplitTargetAvailable()) {
info.addAction(new AccessibilityAction(R.id.action_move_tl_30,
@@ -373,6 +373,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
}
}
+ /** Gets non-minimized secondary bounds of split screen. */
public Rect getNonMinimizedSplitScreenSecondaryBounds() {
mOtherTaskRect.set(mSplitLayout.mSecondary);
return mOtherTaskRect;
@@ -409,6 +410,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
return mSurfaceHidden;
}
+ /** Starts dragging the divider bar. */
public boolean startDragging(boolean animate, boolean touching) {
cancelFlingAnimation();
if (touching) {
@@ -427,6 +429,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
return inSplitMode();
}
+ /** Stops dragging the divider bar. */
public void stopDragging(int position, float velocity, boolean avoidDismissStart,
boolean logMetrics) {
mHandle.setTouching(false, true /* animate */);
@@ -889,7 +892,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
WindowManagerProxy.applyResizeSplits(midPos, mSplitLayout);
}
- public void setMinimizedDockStack(boolean minimized, long animDuration,
+ void setMinimizedDockStack(boolean minimized, long animDuration,
boolean isHomeStackResizable) {
if (DEBUG) Slog.d(TAG, "setMinDock: " + mDockedStackMinimized + "->" + minimized);
mHomeStackResizable = isHomeStackResizable;
@@ -925,7 +928,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
}
}
- public void setAdjustedForIme(boolean adjustedForIme, long animDuration) {
+ void setAdjustedForIme(boolean adjustedForIme, long animDuration) {
if (mAdjustedForIme == adjustedForIme) {
return;
}
@@ -952,8 +955,8 @@ public class DividerView extends FrameLayout implements OnTouchListener,
private void saveSnapTargetBeforeMinimized(SnapTarget target) {
mSnapTargetBeforeMinimized = target;
- mState.mRatioPositionBeforeMinimized = (float) target.position /
- (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height()
+ mState.mRatioPositionBeforeMinimized = (float) target.position
+ / (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height()
: mSplitLayout.mDisplayLayout.width());
}
@@ -971,8 +974,8 @@ public class DividerView extends FrameLayout implements OnTouchListener,
}
private void repositionSnapTargetBeforeMinimized() {
- int position = (int) (mState.mRatioPositionBeforeMinimized *
- (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height()
+ int position = (int) (mState.mRatioPositionBeforeMinimized
+ * (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height()
: mSplitLayout.mDisplayLayout.width()));
// Set the snap target before minimized but do not save until divider is attached and not
@@ -1011,7 +1014,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
containingRect.right, containingRect.bottom);
}
- public void calculateBoundsForPosition(int position, int dockSide, Rect outRect) {
+ private void calculateBoundsForPosition(int position, int dockSide, Rect outRect) {
DockedDividerUtils.calculateBoundsForPosition(position, dockSide, outRect,
mSplitLayout.mDisplayLayout.width(), mSplitLayout.mDisplayLayout.height(),
mDividerSize);
@@ -1240,8 +1243,8 @@ public class DividerView extends FrameLayout implements OnTouchListener,
if (dismissTarget != null && fraction > 0f
&& isDismissing(splitTarget, position, dockSide)) {
fraction = calculateParallaxDismissingFraction(fraction, dockSide);
- int offsetPosition = (int) (start +
- fraction * (dismissTarget.position - splitTarget.position));
+ int offsetPosition = (int) (start + fraction
+ * (dismissTarget.position - splitTarget.position));
int width = taskRect.width();
int height = taskRect.height();
switch (dockSide) {
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerWindowManager.java
similarity index 90%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/DividerWindowManager.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerWindowManager.java
index d869333e11a7f..0b4e17c273982 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerWindowManager.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerWindowManager.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
@@ -37,7 +37,7 @@ import com.android.wm.shell.common.SystemWindows;
/**
* Manages the window parameters of the docked stack divider.
*/
-public class DividerWindowManager {
+final class DividerWindowManager {
private static final String WINDOW_TITLE = "DockedStackDivider";
@@ -45,12 +45,12 @@ public class DividerWindowManager {
private WindowManager.LayoutParams mLp;
private View mView;
- public DividerWindowManager(SystemWindows systemWindows) {
+ DividerWindowManager(SystemWindows systemWindows) {
mSystemWindows = systemWindows;
}
/** Add a divider view */
- public void add(View view, int width, int height, int displayId) {
+ void add(View view, int width, int height, int displayId) {
mLp = new WindowManager.LayoutParams(
width, height, TYPE_DOCK_DIVIDER,
FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL
@@ -67,14 +67,14 @@ public class DividerWindowManager {
mView = view;
}
- public void remove() {
+ void remove() {
if (mView != null) {
mSystemWindows.removeView(mView);
}
mView = null;
}
- public void setSlippery(boolean slippery) {
+ void setSlippery(boolean slippery) {
boolean changed = false;
if (slippery && (mLp.flags & FLAG_SLIPPERY) == 0) {
mLp.flags |= FLAG_SLIPPERY;
@@ -88,7 +88,7 @@ public class DividerWindowManager {
}
}
- public void setTouchable(boolean touchable) {
+ void setTouchable(boolean touchable) {
if (mView == null) {
return;
}
@@ -106,7 +106,7 @@ public class DividerWindowManager {
}
/** Sets the touch region to `touchRegion`. Use null to unset.*/
- public void setTouchRegion(Region touchRegion) {
+ void setTouchRegion(Region touchRegion) {
if (mView == null) {
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivity.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivity.java
similarity index 96%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivity.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivity.java
index 02f75050c0610..7a16335301480 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivity.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivity.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SECONDARY_DISPLAY;
import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SPLIT_SCREEN;
@@ -29,7 +29,7 @@ import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.TextView;
-import com.android.systemui.R;
+import com.android.wm.shell.R;
/**
* Translucent activity that gets started on top of a task in multi-window to inform the user that
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivityController.java
similarity index 90%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivityController.java
index 4c26694cc22a3..1ef142dacb9e1 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivityController.java
@@ -11,13 +11,13 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
-import static com.android.systemui.stackdivider.ForcedResizableInfoActivity
- .EXTRA_FORCED_RESIZEABLE_REASON;
+
+import static com.android.wm.shell.splitscreen.ForcedResizableInfoActivity.EXTRA_FORCED_RESIZEABLE_REASON;
import android.app.ActivityOptions;
import android.content.Context;
@@ -27,7 +27,7 @@ import android.os.UserHandle;
import android.util.ArraySet;
import android.widget.Toast;
-import com.android.systemui.R;
+import com.android.wm.shell.R;
import java.util.function.Consumer;
@@ -55,20 +55,20 @@ final class ForcedResizableInfoActivityController implements DividerView.Divider
/** Record of force resized task that's pending to be handled. */
private class PendingTaskRecord {
- int taskId;
+ int mTaskId;
/**
* {@link android.app.ITaskStackListener#FORCED_RESIZEABLE_REASON_SPLIT_SCREEN} or
* {@link android.app.ITaskStackListener#FORCED_RESIZEABLE_REASON_SECONDARY_DISPLAY}
*/
- int reason;
+ int mReason;
PendingTaskRecord(int taskId, int reason) {
- this.taskId = taskId;
- this.reason = reason;
+ this.mTaskId = taskId;
+ this.mReason = reason;
}
}
- public ForcedResizableInfoActivityController(Context context,
+ ForcedResizableInfoActivityController(Context context,
SplitScreenController splitScreenController) {
mContext = context;
splitScreenController.registerInSplitScreenListener(mDockedStackExistsListener);
@@ -116,11 +116,11 @@ final class ForcedResizableInfoActivityController implements DividerView.Divider
PendingTaskRecord pendingRecord = mPendingTasks.valueAt(i);
Intent intent = new Intent(mContext, ForcedResizableInfoActivity.class);
ActivityOptions options = ActivityOptions.makeBasic();
- options.setLaunchTaskId(pendingRecord.taskId);
+ options.setLaunchTaskId(pendingRecord.mTaskId);
// Set as task overlay and allow to resume, so that when an app enters split-screen and
// becomes paused, the overlay will still be shown.
options.setTaskOverlay(true, true /* canResume */);
- intent.putExtra(EXTRA_FORCED_RESIZEABLE_REASON, pendingRecord.reason);
+ intent.putExtra(EXTRA_FORCED_RESIZEABLE_REASON, pendingRecord.mReason);
mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
}
mPendingTasks.clear();
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/MinimizedDockShadow.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MinimizedDockShadow.java
similarity index 95%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/MinimizedDockShadow.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MinimizedDockShadow.java
index ecff54fd907d1..06f4ef1091936 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/MinimizedDockShadow.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MinimizedDockShadow.java
@@ -11,10 +11,10 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import android.annotation.Nullable;
import android.content.Context;
@@ -27,7 +27,7 @@ import android.util.AttributeSet;
import android.view.View;
import android.view.WindowManager;
-import com.android.systemui.R;
+import com.android.wm.shell.R;
/**
* Shadow for the minimized dock state on homescreen.
@@ -42,7 +42,7 @@ public class MinimizedDockShadow extends View {
super(context, attrs);
}
- public void setDockSide(int dockSide) {
+ void setDockSide(int dockSide) {
if (dockSide != mDockSide) {
mDockSide = dockSide;
updatePaint(getLeft(), getTop(), getRight(), getBottom());
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitDisplayLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitDisplayLayout.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/SplitDisplayLayout.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitDisplayLayout.java
index a34e855179531..3c0f939067958 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitDisplayLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitDisplayLayout.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreen.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreen.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java
index 93b1f86a5dc2a..184342f14d4f9 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreen.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import android.graphics.Rect;
import android.window.WindowContainerToken;
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenController.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
index 360b495556123..d5326d4845a38 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
@@ -34,7 +34,7 @@ import android.window.WindowContainerTransaction;
import android.window.WindowOrganizer;
import com.android.internal.policy.DividerSnapAlgorithm;
-import com.android.systemui.R;
+import com.android.wm.shell.R;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.DisplayChangeController;
import com.android.wm.shell.common.DisplayController;
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskOrganizer.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskOrganizer.java
index 325c5597f9d89..6d28c5e17d422 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskOrganizer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/WindowManagerProxy.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
rename to libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/WindowManagerProxy.java
index 82b10bd40b174..cd96676ad1fed 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/WindowManagerProxy.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.stackdivider;
+package com.android.wm.shell.splitscreen;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
@@ -40,6 +40,7 @@ import android.window.WindowContainerTransaction;
import android.window.WindowOrganizer;
import com.android.internal.annotations.GuardedBy;
+import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.common.TransactionPool;
import java.util.ArrayList;
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 6db3d0b8dff2e..e3f75e3e0b34d 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -390,7 +390,7 @@
left;back,home,recent;right
-
- 290
-
0
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 0cc0dfd19fdfe..1c3fba2abacda 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -161,9 +161,6 @@
10000
-
- 250
-
true
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 72ee004837fdf..76c61fb6e1e58 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -954,12 +954,6 @@
12dp
9dp
-
- 4dp
-
- 16dp
- 2dp
-
27dp
27dp
diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml
index a56f6f56836a0..2f018b9239b50 100644
--- a/packages/SystemUI/res/values/ids.xml
+++ b/packages/SystemUI/res/values/ids.xml
@@ -103,13 +103,6 @@
-
-
-
-
-
-
-
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index bfa7532349aa6..e58bf3bad795c 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2260,31 +2260,6 @@
Other
-
- Split-screen divider
-
-
- Left full screen
-
- Left 70%
-
- Left 50%
-
- Left 30%
-
- Right full screen
-
-
- Top full screen
-
- Top 70%
-
- Top 50%
-
- Top 30%
-
- Bottom full screen
-
Position %1$d, %2$s. Double tap to edit.
@@ -2312,16 +2287,6 @@
Report rejected touch
-
-
- App may not work with split-screen.
-
- App does not support split-screen.
-
- App may not work on a secondary display.
-
- App does not support launch on secondary displays.
-
Open settings.
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index ee07e613a0c53..58563f49dce47 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -24,21 +24,6 @@
- 0dp
-
-
-
-
-
-
-
-
-
-
-