diff options
author | Vinit Deshpande <vinitd@google.com> | 2014-09-09 05:29:06 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-09 05:29:06 +0000 |
commit | 43f6edae1b0b92e1656d87a60723f2f71c9c06cc (patch) | |
tree | d727f6ee9219cefb7855e6688a8debbd40b08e05 /wifi/java/android | |
parent | 2387aeea03226764f6b85e35e1cf395fb3c5b811 (diff) | |
parent | bb90cfffc12cd759333698ac24590b8a05fd1f2a (diff) | |
download | frameworks_base-43f6edae1b0b92e1656d87a60723f2f71c9c06cc.zip frameworks_base-43f6edae1b0b92e1656d87a60723f2f71c9c06cc.tar.gz frameworks_base-43f6edae1b0b92e1656d87a60723f2f71c9c06cc.tar.bz2 |
am 80adb33a: am 33e1b95c: am fc591cc1: Merge "Implement getAvailableChannels" into lmp-dev
* commit '80adb33a9f07b7f6bfa55165deb3f35d1fd3411e':
Implement getAvailableChannels
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/IWifiScanner.aidl | 3 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiScanner.java | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/IWifiScanner.aidl b/wifi/java/android/net/wifi/IWifiScanner.aidl index fef2d11..3984934 100644 --- a/wifi/java/android/net/wifi/IWifiScanner.aidl +++ b/wifi/java/android/net/wifi/IWifiScanner.aidl @@ -17,6 +17,7 @@ package android.net.wifi; import android.os.Messenger; +import android.os.Bundle; /** * {@hide} @@ -24,4 +25,6 @@ import android.os.Messenger; interface IWifiScanner { Messenger getMessenger(); + + Bundle getAvailableChannels(int band); } diff --git a/wifi/java/android/net/wifi/WifiScanner.java b/wifi/java/android/net/wifi/WifiScanner.java index e7bcb23..65c00bd 100644 --- a/wifi/java/android/net/wifi/WifiScanner.java +++ b/wifi/java/android/net/wifi/WifiScanner.java @@ -18,6 +18,7 @@ package android.net.wifi; import android.annotation.SystemApi; import android.content.Context; +import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; @@ -76,6 +77,9 @@ public class WifiScanner { /** Invalid request */ public static final int REASON_INVALID_REQUEST = -3; + /** @hide */ + public static final String GET_AVAILABLE_CHANNELS_EXTRA = "Channels"; + /** * Generic action callback invocation interface * @hide @@ -92,7 +96,12 @@ public class WifiScanner { * @hide */ public List<Integer> getAvailableChannels(int band) { - return null; + try { + Bundle bundle = mService.getAvailableChannels(band); + return bundle.getIntegerArrayList(GET_AVAILABLE_CHANNELS_EXTRA); + } catch (RemoteException e) { + return null; + } } /** |