Prevent hotspot from being affected by the wifi retention feature

To prevent WiFi-to-WiFi interruption while entering APM:
  - If WiFi is retained while entering APM, hotspot will also remain enabled.
  - If WiFi is off before APM or disabled while entering APM, hotspot will be disabled.

To make sure hotspot always be disabled while entering APM, disable wifi before enable hotspot.

Bug: 278150162
Test: 1. turn on wifi while airplan mode on, then turn off airplan mode
      2. atest ConnectivityManagerTest#testFactoryReset
Change-Id: Ic48ba63deab02683280543516228104be928a6a2
1 file changed