diff options
author | Vinit Deshpande <vinitd@google.com> | 2014-09-09 05:14:04 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-09 05:14:04 +0000 |
commit | bb90cfffc12cd759333698ac24590b8a05fd1f2a (patch) | |
tree | fdf8baa7ea22f05ca2828a9ee66e678845740a2a /wifi/java | |
parent | 60803943f8276a311b7f985613b285a60b042886 (diff) | |
parent | ef03465f3c321415d3ef3818e943ada170fa6e10 (diff) | |
download | frameworks_base-bb90cfffc12cd759333698ac24590b8a05fd1f2a.zip frameworks_base-bb90cfffc12cd759333698ac24590b8a05fd1f2a.tar.gz frameworks_base-bb90cfffc12cd759333698ac24590b8a05fd1f2a.tar.bz2 |
am 33e1b95c: am fc591cc1: Merge "Implement getAvailableChannels" into lmp-dev
* commit '33e1b95ca08f8ecc114665f3eed3e9c71355310c':
Implement getAvailableChannels
Diffstat (limited to 'wifi/java')
-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; + } } /** |