Android关于Launcher的Activity启动两次的问

2022-06-02  本文已影响0人  superme_

1 android 9.0 类似的日志,activity 会启动两次

1.1 日志

05-27 09:56:18.034569 1229 1333 I ActivityManager: Config changes=8 {1.0 ?mcc?mnc [zh_CN] ldltr sw1152dp w1152dp h1098dp 240dpi xlrg port car -touch qwerty/v/v -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 0 - 1728, 1738) mWindowingMode=fullscreen mActivityType=undefined} s.9 overlayThemeName=null}

05-27 09:56:18.037075 1229 1333 I ActivityManager: Override config changes=8 {1.0 ?mcc?mnc [zh_CN] ldltr sw1152dp w1152dp h1098dp 240dpi xlrg port car -touch qwerty/v/v -nav/h winConfig={ mBounds=Rect(0, 0 - 1728, 1738) mAppBounds=Rect(0, 0 - 1728, 1738) mWindowingMode=fullscreen mActivityType=undefined} s.9 overlayThemeName=null} for displayId=0--------- switch to events

05-27 09:56:18.038823 1229 1333 I am_relaunch_resume_activity: [0,193263077,53,com.tencent.wecar.karaoke/.activity.MainActivity]

1.2 初步分析

Override config changes=8

publicstaticfinalintCONFIG_TOUCHSCREEN=0x0008;

2 解决方法

2.1 app 中增加如下配置:

2.2 从系统角度看下是否合理?上报这个config change?

上一篇下一篇

猜你喜欢

热点阅读