WifiWakeup: Ignore wakeup start if no saved networks or suggestions

If there are no saved networks or suggestions, there is no use of
starting wifi wake feature. So, gate the feature start based on whether
any saved networks are present on the device or not. This also works
around a race in the wake initialization/deinitialization sequence on
a freshly wiped device. This quick initialization/deinitialization
causes the device to not show the notification on enabling the feature
for a day.

Bug: 155795687
Test: atest com.android.server.wifi
Test: Manual tests
- Flash wipe the device.
- Connect to saved networks.
- Turn off wifi.
- Check that wake feature is enabled and the notification shown.

Change-Id: I6bc6315c9c1852e7cdb17ad73c4ed34d3895a951
2 files changed