前文
Android U 多任务启动分屏——Launcher流程(下分屏)
前文说到通过ISplitScreen
接口跨进程调用到了SystemUI进程,我们继续分析分屏在systemui中的实现。
wmshell实现分屏
实现ISplitScreen
接口
代码路径:frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
/*** The interface for calls from outside the host process.*/@BinderThreadprivate static class ISplitScreenImpl extends ISplitScreen.Stubimplements ExternalInterfaceBinder {......@Overridepublic void startTasks(int taskId1, @Nullable Bundle options1, int taskId2,@Nullable Bundle options2, @SplitPosition int splitPosition, float splitRatio,@Nullable RemoteTransition remoteTransition, InstanceId instanceId) {executeRemoteCallWithTaskPermission(mController, "startTasks",(controller) -> controller.mStageCoordinator.startTasks(taskId1, options1,taskId2, options2, splitPosition, splitRatio, remoteTransition,instanceId));}......}