Search code examples
androidwifiandroid-sourceandroid-wifi

Android 7(AOSP): Wifi: Disable RSSI polling


is there any possibility to dynamically disable RSSI polling in the WifiStateMachine of Android 7? I know that the polling intervall can be modified in config.xml, but then it is static for one build.

The command for polling is at enter() of the L2ConnectedState:

if (mEnableRssiPolling) {
  sendMessage(CMD_RSSI_POLL, mRssiPollToken, 0);
}

Enable is set whenever the ACTION_SCREEN_ON broadcast is published:

ACTION_SCREEN_ON->CMD_SCREEN_STATE_CHANGED->
handleScreenStateChanged()->enableRssiPolling()->
CMD_ENABLE_RSSI_POLL

Is there any config entry, which allows it to be disabled during runtime?


Solution

  • I did not find a possibility, so I wrote a patch for wifiStateMachine.java. The next issue was to apply the Patch during build time before the wifi module is built. This is further investigated in this question.