Android 12.0.0 release 21
Fallback to default PNO channels if no frequency

PNO scan is sometimes started with an empty channel list. This happens either because there is only suggested network (from mobile carrier) but no saved network or the frequency from saved network is too old or there is an issue with frequency history restore.

In the above case, current design is to scan all supported frequencies again and again which results in high power consumption. This defeats the purpose of "preferred network offload"  which is supposed to scan only a few channels.

The fix to mitigate this issue:
Fall back to default scan channel list if the PNO channel list from framework is empty.

Bug: 196246332
Bug: 195029545
Test: delete all saved network, add one saved network, turn off screen.
      wificond starts with the default PNO channels.
Test: scanner unit test
Change-Id: I153a04cfe9c82a2c9b21f87c10dd46706135cf3f
Merged-In: I153a04cfe9c82a2c9b21f87c10dd46706135cf3f
2 files changed