[Xiaomi Redmi 1S] teddy0804:
The behaviour of WiFi on Build #4

I have run the logcat continuously during the test. When we turn on the WiFi in QS, there are some code running continuosly

05-23 01:33:53.401 W/ResourceType( 1016): No package identifier when getting value for resource number 0x00000001

05-23 01:33:53.402 W/ImageView( 1016): Unable to find resource: 1

05-23 01:33:53.402 W/ImageView( 1016): android.content.res.Resources$NotFoundException: Resource ID #0x1

05-23 01:33:53.402 W/ImageView( 1016):	at android.content.res.Resources.getValue(Resources.java:1267)

05-23 01:33:53.402 W/ImageView( 1016):	at android.content.res.Resources.getDrawable(Resources.java:786)

05-23 01:33:53.402 W/ImageView( 1016):	at android.content.Context.getDrawable(Context.java:403)

05-23 01:33:53.402 W/ImageView( 1016):	at android.widget.ImageView.resolveUri(ImageView.java:747)

05-23 01:33:53.402 W/ImageView( 1016):	at android.widget.ImageView.setImageResource(ImageView.java:398)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.systemui.statusbar.MSimSignalClusterView.updateMobile(MSimSignalClusterView.java:509)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.systemui.statusbar.MSimSignalClusterView.apply(MSimSignalClusterView.java:448)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.systemui.statusbar.MSimSignalClusterView.setMobileDataIndicators(MSimSignalClusterView.java:348)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.systemui.statusbar.policy.MSimNetworkControllerImpl.refreshSignalCluster(MSimNetworkControllerImpl.java:361)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.systemui.statusbar.policy.MSimNetworkControllerImpl.refreshViews(MSimNetworkControllerImpl.java:1336)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.systemui.statusbar.policy.MSimNetworkControllerImpl.onReceive(MSimNetworkControllerImpl.java:433)

05-23 01:33:53.402 W/ImageView( 1016):	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:866)

05-23 01:33:53.402 W/ImageView( 1016):	at android.os.Handler.handleCallback(Handler.java:739)

05-23 01:33:53.402 W/ImageView( 1016):	at android.os.Handler.dispatchMessage(Handler.java:95)

05-23 01:33:53.402 W/ImageView( 1016):	at android.os.Looper.loop(Looper.java:135)

05-23 01:33:53.402 W/ImageView( 1016):	at android.app.ActivityThread.main(ActivityThread.java:5273)

05-23 01:33:53.402 W/ImageView( 1016):	at java.lang.reflect.Method.invoke(Native Method)

05-23 01:33:53.402 W/ImageView( 1016):	at java.lang.reflect.Method.invoke(Method.java:372)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)

05-23 01:33:53.402 W/ImageView( 1016):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

Then we turn off the WiFi, it stop the running code and the phone trying to connect to mobile networks

05-23 01:42:28.975 D/CommandListener( 191): Clearing all IP addresses on wlan0

05-23 01:42:28.981 D/ConnectivityService( 711): notifyType LOST for NetworkAgentInfo [WIFI () - 102]

05-23 01:42:28.982 D/ConnectivityManager.CallbackHandler( 1016): CM callback handler got msg 524292

05-23 01:42:28.983 W/Settings( 1690): Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.

05-23 01:42:28.984 D/NetworkMonitor/NetworkAgentInfo [WIFI () - 102]( 711): OfflineState{ when=-1ms what=532487 target=com.android.internal.util.StateMachine$SmHandler }

05-23 01:42:28.984 D/NetworkMonitor/NetworkAgentInfo [WIFI () - 102]( 711): DefaultState{ when=-1ms what=532487 target=com.android.internal.util.StateMachine$SmHandler }

05-23 01:42:28.984 D/NetworkMonitor/NetworkAgentInfo [WIFI () - 102]( 711): Disconnected - quitting

05-23 01:42:28.984 D/WifiNetworkAgent( 711): NetworkAgent: NetworkAgent channel lost

05-23 01:42:28.985 D/CSLegacyTypeTracker( 711): Sending disconnected broadcast for type 1 NetworkAgentInfo [WIFI () - 102] isDefaultNetwork=true

05-23 01:42:28.985 D/ConnectivityService( 711): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE

05-23 01:42:28.985 D/ConnectivityService( 711): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE

05-23 01:42:28.986 D/Tethering( 711): MasterInitialState.processMessage what=3

05-23 01:42:28.990 D/ConnectivityService( 711): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE

05-23 01:42:28.991 D/ConnectivityService( 711): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE

05-23 01:42:28.994 D/ConnectivityService( 711): Checking for replacement network to handle request NetworkRequest [ id=1, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]

05-23 01:42:29.003 D/StatusBar.MSimNetworkController( 1016): updateConnectivity: intent=Intent { act=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE flg=0x4000010 (has extras) }

05-23 01:42:29.003 D/ConnectivityManager( 6628): getMobileDataEnabled()+ subId=2

05-23 01:42:29.004 D/StatusBar.MSimNetworkController( 1016): updateConnectivity: networkInfo=null

05-23 01:42:29.004 D/StatusBar.MSimNetworkController( 1016): updateConnectivity: connectionStatus=0

05-23 01:42:29.005 D/PhoneInterfaceManager( 1334): [PhoneIntfMgr] getDataEnabled: subId=2 phoneId=1

05-23 01:42:29.005 D/PhoneInterfaceManager( 1334): [PhoneIntfMgr] getDataEnabled: subId=2 retVal=true

05-23 01:42:29.005 D/ConnectivityManager( 6628): getMobileDataEnabled()- subId=2 retVal=true

05-23 01:42:29.009 D/StatusBar.MSimNetworkController( 1016): updateDataNetType: phoneId0 is not DDS(=SUB1)!

05-23 01:42:29.019 D/StatusBar.MSimNetworkController( 1016): updateDataNetType sub = 1 mDataNetType = 2

05-23 01:42:29.033 I/iu.Environment( 1751): update connectivity state; isNetworkMetered? false, isRoaming? false, isBackgroundDataAllowed? false*

05-23 01:42:29.036 D/StatusBar.MSimNetworkController( 1016): updateConnectivity: intent=Intent { act=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE flg=0x4000010 (has extras) }

05-23 01:42:29.037 D/StatusBar.MSimNetworkController( 1016): updateConnectivity: networkInfo=null

05-23 01:42:29.037 D/StatusBar.MSimNetworkController( 1016): updateConnectivity: connectionStatus=0

05-23 01:42:29.039 D/StatusBar.MSimNetworkController( 1016): updateDataNetType: phoneId0 is not DDS(=SUB1)!

05-23 01:42:29.048 D/Tethering( 711): MasterInitialState.processMessage what=3

05-23 01:42:29.049 D/StatusBar.MSimNetworkController( 1016): updateDataNetType sub = 1 mDataNetType = 2

05-23 01:42:29.066 D/ChimeraRcvrProxy( 1751): Creating receiver proxy ComponentInfo{com.google.android.gms/com.google.android.gms.kids.chimera.SystemEventReceiverProxy}

05-23 01:42:29.067 D/ChimeraRcvrProxy( 1751): Proxying container receiver ComponentInfo{com.google.android.gms/com.google.android.gms.kids.chimera.SystemEventReceiverProxy} to Chimera receiver impl com.google.android.gms.kids.account.SystemEventReceiver

05-23 01:42:29.067 D/ChimeraCfgMgr( 1751): Loading module com.google.android.gms.kids from APK com.google.android.gms

05-23 01:42:29.083 I/iu.UploadsManager( 1751): num queued entries: 0

05-23 01:42:29.087 I/iu.UploadsManager( 1751): num updated entries: 0

05-23 01:42:29.092 I/iu.SyncManager( 1751): NEXT; no task

05-23 01:42:29.173 I/art ( 711): Explicit concurrent mark sweep GC freed 103488(5MB) AllocSpace objects, 11(753KB) LOS objects, 33% free, 17MB/26MB, paused 1.323ms total 100.841ms

05-23 01:42:29.183 D/Mms ( 6628): Cursor= >>>>> Dumping cursor android.content.ContentResolver$CursorWrapperInner@3dd33058

05-23 01:42:29.183 D/Mms ( 6628): <<<<<

05-23 01:42:29.210 D/ConnectivityManager( 6628): getMobileDataEnabled()+ subId=2

05-23 01:42:29.211 D/PhoneInterfaceManager( 1334): [PhoneIntfMgr] getDataEnabled: subId=2 phoneId=1

05-23 01:42:29.211 D/PhoneInterfaceManager( 1334): [PhoneIntfMgr] getDataEnabled: subId=2 retVal=true

05-23 01:42:29.211 D/ConnectivityManager( 6628): getMobileDataEnabled()- subId=2 retVal=true

05-23 01:42:29.221 I/iu.Environment( 1751): update connectivity state; isNetworkMetered? false, isRoaming? false, isBackgroundDataAllowed? false

05-23 01:42:29.235 D/ChimeraRcvrProxy( 1751): Creating receiver proxy ComponentInfo{com.google.android.gms/com.google.android.gms.kids.chimera.SystemEventReceiverProxy}

05-23 01:42:29.235 D/ChimeraRcvrProxy( 1751): Proxying container receiver ComponentInfo{com.google.android.gms/com.google.android.gms.kids.chimera.SystemEventReceiverProxy} to Chimera receiver impl com.google.android.gms.kids.account.SystemEventReceiver

05-23 01:42:29.235 D/ChimeraCfgMgr( 1751): Loading module com.google.android.gms.kids from APK com.google.android.gms

05-23 01:42:29.247 D/Mms ( 6628): Cursor= >>>>> Dumping cursor android.content.ContentResolver$CursorWrapperInner@fcdf617

05-23 01:42:29.247 D/Mms ( 6628): <<<<<

05-23 01:42:29.294 D/PhoneApp( 1334): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED

05-23 01:42:29.294 D/PhoneApp( 1334): - state: DISCONNECTED

05-23 01:42:29.294 D/PhoneApp( 1334): - reason: dataDetached

05-23 01:42:29.296 D/PhoneApp( 1334): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED

05-23 01:42:29.296 D/PhoneApp( 1334): - state: DISCONNECTED

05-23 01:42:29.296 D/PhoneApp( 1334): - reason: dataDetached

05-23 01:42:29.296 D/PhoneApp( 1334): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED

05-23 01:42:29.296 D/PhoneApp( 1334): - state: DISCONNECTED

05-23 01:42:29.296 D/PhoneApp( 1334): - reason: dataDetached

05-23 01:42:29.298 D/PhoneApp( 1334): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED

05-23 01:42:29.298 D/PhoneApp( 1334): - state: DISCONNECTED

05-23 01:42:29.298 D/PhoneApp( 1334): - reason: dataDetached

05-23 01:42:29.298 D/PhoneApp( 1334): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED

05-23 01:42:29.298 D/PhoneApp( 1334): - state: DISCONNECTED

05-23 01:42:29.298 D/PhoneApp( 1334): - reason: dataDetached

when idle and going to sleep

05-23 01:50:34.725 I/ThermalEngine( 204): Sensor:batt_temp:31000 mC

05-23 01:50:35.729 I/ThermalEngine( 204): Sensor:batt_temp:31000 mC

05-23 01:50:35.907 I/PowerManagerService( 711): Going to sleep due to screen timeout (uid 1000)...

05-23 01:50:35.908 I/PowerManagerService( 711): Sleeping (uid 1000)...

05-23 01:50:35.962 E/WifiStateMachine( 711): cancelDelayedScan -> 101

05-23 01:50:35.969 D/audio_hw_primary( 195): adev_set_parameters: enter: screen_state=off

05-23 01:50:35.975 E/native ( 711): do suspend true

05-23 01:50:35.977 D/PhoneStatusBar( 1016): disable: < expand ICONS alerts SYSTEM_INFO back HOME RECENT clock SEARCH >

05-23 01:50:36.377 D/SurfaceFlinger( 184): Set power mode=0, type=0 flinger=0xb829f5e0

05-23 01:50:36.377 D/qdhwcomposer( 184): hwc_setPowerMode: Setting mode 0 on display: 0

05-23 01:50:36.377 I/DisplayManagerService( 711): Display device changed: DisplayDeviceInfo{"Built-in Screen": uniqueId="local:0", 720 x 1280, 60.0 fps, supportedRefreshRates [60.0], density 280, 315.31 x 315.65 dpi, appVsyncOff 0, presDeadline 17666667, touch INTERNAL, rotation 0, type BUILT_IN, state OFF, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}

05-23 01:50:36.378 V/ActivityManager( 711): Display changed displayId=0

05-23 01:50:36.671 I/qdhwcomposer( 184): handle_blank_event: dpy:0 panel power state: 0

05-23 01:50:36.672 D/qdhwcomposer( 184): hwc_setPowerMode: Done setting mode 0 on display 0

05-23 01:50:36.673 D/SurfaceControl( 711): Excessive delay in setPowerMode(): 296ms

05-23 01:50:36.673 I/QCOM PowerHAL( 711): Got set_interactive hint

05-23 01:50:36.735 I/ThermalEngine( 204): Sensor:batt_temp:31000 mC

05-23 01:50:37.740 I/ThermalEngine( 204): Sensor:batt_temp:31300 mC

Might this code cause the WiFi did not turn off at all?

05-23 01:42:43.769 E/WifiStateMachine( 711): cancelDelayedScan -> 99

05-23 01:42:43.802 E/native ( 711): do suspend true