美文网首页
Android关于Launcher的Activity启动两次的问

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

作者: superme_ | 来源:发表于2022-06-02 11:59 被阅读0次

    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?

    相关文章

      网友评论

          本文标题:Android关于Launcher的Activity启动两次的问

          本文链接:https://www.haomeiwen.com/subject/drkqmrtx.html