WifiConnectivityManager: Disable PNO scans

Will enable this back once wificond is ready to accept PNO scan
requests from WifiScanningService. For now, we'll perform periodic
single scans instead of PNO when screen if off & disconnected.

Bug: 32907581
Test: Will send for regression tests
Change-Id: I6a4ade71626524fadbe515720f07fed3c28aa967
(cherry picked from commit 2bf8cc9cabe26484345f416136495a767b453e01)
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java
index 357fa32..5210adc 100644
--- a/service/java/com/android/server/wifi/WifiConnectivityManager.java
+++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java
@@ -900,12 +900,10 @@
             return;
         }
 
-        if (mScreenOn) {
+        // TODO(b/32977707): Start PNO scans when screen is off once wificond's interface
+        // is hooked on to WifiScanningService.
+        if (mScreenOn || (mWifiState == WIFI_STATE_DISCONNECTED)) {
             startPeriodicScan(scanImmediately);
-        } else { // screenOff
-            if (mWifiState == WIFI_STATE_DISCONNECTED) {
-                startDisconnectedPnoScan();
-            }
         }
     }
 
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
index 9e52eb2..1c33a2d 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
@@ -47,6 +47,7 @@
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 
@@ -500,6 +501,7 @@
      * because of their low RSSI values.
      */
     @Test
+    @Ignore("b/32977707")
     public void pnoRetryForLowRssiNetwork() {
         when(mWifiNS.selectNetwork(anyObject(), anyObject(), anyBoolean(), anyBoolean(),
               anyBoolean())).thenReturn(null);
@@ -531,6 +533,7 @@
      * a candidate while watchdog single scan did.
      */
     @Test
+    @Ignore("b/32977707")
     public void watchdogBitePnoBadIncrementsMetrics() {
         // Set screen to off
         mWifiConnectivityManager.handleScreenStateChanged(false);
@@ -554,6 +557,7 @@
      * a candidate which was the same with watchdog single scan.
      */
     @Test
+    @Ignore("b/32977707")
     public void watchdogBitePnoGoodIncrementsMetrics() {
         // Qns returns no candidate after watchdog single scan.
         when(mWifiNS.selectNetwork(anyObject(), anyObject(), anyBoolean(), anyBoolean(),