DO NOT MERGE Wifi: Disable PNO (if enabled) only when the scan is allowed to trigger

CPed from https://partner-android-review.googlesource.com/#/c/216165

In WiFi's disconnected state and when a PNO is enabled, a scan
request through an alarm source shall disable the PNO, though
the scan fails to trigger (if cancelled due to cancelDelayedScan).
This commit ensures to disable the PNO only before the scan request
succeeds to trigger.

Change-Id: Ie462011d99644e83314c55e8135f8cbf2b8de5c7
(cherry picked from commit 4c94fc6a884fc17424c76d791a42c3c263b390b2)
1 file changed
tree: 110519148a3e6be9991956163e0c5dcc807132d5
  1. service/