From d181673e2872ef4f4c47c109880cc9c03d2fd1ec Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 20 Mar 2014 16:27:01 -0700 Subject: Fix stopBatchedScan not working for wifi Change-Id: I011747da2a98cbed76a8fc6716f0c539c65f2804 --- wifi/java/android/net/wifi/WifiStateMachine.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 3dda56a..02884bd 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -3092,7 +3092,11 @@ public class WifiStateMachine extends StateMachine { case CMD_SET_BATCHED_SCAN: if (recordBatchedScanSettings(message.arg1, message.arg2, (Bundle)message.obj)) { - startBatchedScan(); + if (mBatchedScanSettings != null) { + startBatchedScan(); + } else { + stopBatchedScan(); + } } break; case CMD_SET_COUNTRY_CODE: -- cgit v1.1