WifiConnectivityManager: Ignore forced scan when autojoin is disabled

WifiManager.reconnect() should not be processed if global "auto-join" is
disabled since this forced scan is anyway useless until global
"auto-join" is enabled.
This should also handle the NPE crash reported in the bug which occurs if
there is a WifiManager.reconnect() API call after reboot with global
"auto-join" disabled.

Bug: 171768789
Test: atest com.android.server.wifi
Change-Id: I6db7806c27ae23dc94a4bce989bf026731b5780c
2 files changed
tree: 12d50bfc77b409229c1a19fe3fb10df0cb088776
  1. apex/
  2. service/
  3. metrics_pdd_hook.py
  4. PREUPLOAD.cfg