Launcher疑难问题记录

吴高洁
2023-12-01

1、#140936【SystemUI】【偶现】待机一段时间后解锁,系统导航点击无反应

06-28 11:05:33.398 2464 3127 W DividerUtil: e=
06-28 11:05:33.398 2464 3127 W DividerUtil: java.lang.IllegalArgumentException: Drag resize mode not allow for stack stackId=10 dragResizeMode=1
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.Parcel.createException(Parcel.java:2075)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.Parcel.readException(Parcel.java:2039)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.Parcel.readException(Parcel.java:1987)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.app.IActivityTaskManager S t u b Stub StubProxy.makeTopActivitySplit(IActivityTaskManager.java:8567)
06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.systemui.stackdivider.DividerUtil.lambda$startSplit 1 ( D i v i d e r U t i l . j a v a : 133 ) 06 − 2811 : 05 : 33.39824643127 W D i v i d e r U t i l : a t c o m . a n d r o i d . s y s t e m u i . s t a c k d i v i d e r . − 1(DividerUtil.java:133) 06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.systemui.stackdivider.- 1(DividerUtil.java:133)062811:05:33.39824643127WDividerUtil:atcom.android.systemui.stackdivider. L a m b d a Lambda LambdaDividerUtil$2EPWsFjd0N7V_FpD8jmLdd-W_dY.run(Unknown Source:0)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.Handler.handleCallback(Handler.java:883)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.Handler.dispatchMessage(Handler.java:100)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.Looper.loop(Looper.java:213)
06-28 11:05:33.398 2464 3127 W DividerUtil: at android.os.HandlerThread.run(HandlerThread.java:67)
06-28 11:05:33.398 2464 3127 W DividerUtil: Caused by: android.os.RemoteException: Remote stack trace:
06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.server.wm.Task.setDragResizing(Task.java:518)
06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.server.wm.Task.setTaskDockedResizing(Task.java:541)
06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.server.wm.TaskRecord.setTaskDockedResizing(TaskRecord.java:626)
06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.server.wm.ActivityStackSupervisor.setResizingDuringAnimation(ActivityStackSupervisor.java:2919)
06-28 11:05:33.398 2464 3127 W DividerUtil: at com.android.server.wm.ActivityStackSupervisor.startActivityFromRecents(ActivityStackSupervisor.java:3044)

private void makeTaskSplit(int taskId) {
final ActivityOptions options = ActivityOptions.makeBasic();
options.setLaunchWindowingMode(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY);
options.setSplitScreenCreateMode(SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT);
//startActivityFromRecents split screen mode,if mHomeStack need to display secondary screen should not display recentsView.
mRootActivityContainer.getDefaultDisplay().getHomeStack().mForceHidden = true;
startActivityFromRecents(taskId, options.toBundle());
mRootActivityContainer.getDefaultDisplay().getHomeStack().mForceHidden = false;
}

mRootActivityContainer.getDefaultDisplay().getHomeStack().mForceHidden = true

报错后该值无法变为false导致。

2、#143082 【多任务】【电信版本】大屏横屏进入腾讯视频-点击视频旋转横屏观看,手势上滑进入多任务显示一半

在onPause流程时调用
private void updateLauncherLayoutOnPause() {
getMainThreadHandler().removeCallbacks(DelayUpdateLauncherLayout);
getMainThreadHandler().post(DelayUpdateLauncherLayout);
}

onresume时调用
public void updateLauncherLayout() {
getMainThreadHandler().removeCallbacks(DelayUpdateLauncherLayout);
getMainThreadHandler().postDelayed(DelayUpdateLauncherLayout,100);
}

onpause时使用handler post调用更新ui导致异常,改为直接调用或者不在onpause时更新ui(怀疑可能onpause-onstop流程继续执行,进入了onstop然后再更新的ui,这时不会执行更新,会遗留到下一次onstart或onresume执行,从而影响布局)

#150163 [CTS]大屏CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedProfileOwnerTest fail
1、开机启动时,SystemUI会去绑定桌面应用的TouchInteractionService服务,绑定成功后,SystemUI回调TouchInteractionService服务的onInitialize方法,onInitialize方法调用 preloadOverview(true /* fromInit /);去判断是否需要加载多任务界面;
preloadOverview(true /
fromInit */)方法里面如果判断是非手势导航就不加载(即虚拟导航),手势导航的话就会调用startRecentsActivity去启动多任务界面;这段代码应该是原生的逻辑,理论上pixel应该也会有问题

 类似资料: