diff options
author | Vinit Deshapnde <vinitd@google.com> | 2013-12-06 15:12:41 -0800 |
---|---|---|
committer | Vinit Deshapnde <vinitd@google.com> | 2013-12-11 16:06:49 -0800 |
commit | ffadfb9ffdced62db215319d3edc7717802088fb (patch) | |
tree | b33f1b8d1d9cba0c9de8bed3c18859a7e72d8d5a /wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java | |
parent | f7a38a09ff4d7b3cf7f2e975e18562335e0cbcf3 (diff) | |
download | frameworks_base-ffadfb9ffdced62db215319d3edc7717802088fb.zip frameworks_base-ffadfb9ffdced62db215319d3edc7717802088fb.tar.gz frameworks_base-ffadfb9ffdced62db215319d3edc7717802088fb.tar.bz2 |
Move Wifi/P2p service components under services
Some methods need to be public, since frameworks/base complies before
frameworks/base/services; and services takes build dependency on base.
Similar issue exists with WifiEnterpriseConfig constants.
Bug: 9907308
Change-Id: Ied0e3dee0b25c939067dbc66867a9814b3b3b68e
Diffstat (limited to 'wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java')
-rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java b/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java index 98f0972..64bb00b 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java @@ -42,11 +42,13 @@ public class WifiP2pGroupList implements Parcelable { public void onDeleteGroup(int netId); } - WifiP2pGroupList() { + /** @hide */ + public WifiP2pGroupList() { this(null, null); } - WifiP2pGroupList(WifiP2pGroupList source, GroupDeleteListener listener) { + /** @hide */ + public WifiP2pGroupList(WifiP2pGroupList source, GroupDeleteListener listener) { mListener = listener; mGroups = new LruCache<Integer, WifiP2pGroup>(CREDENTIAL_MAX_NUM) { @Override @@ -78,8 +80,9 @@ public class WifiP2pGroupList implements Parcelable { * Add the specified group to this group list. * * @param group + * @hide */ - void add(WifiP2pGroup group) { + public void add(WifiP2pGroup group) { mGroups.put(group.getNetworkId(), group); } @@ -87,8 +90,9 @@ public class WifiP2pGroupList implements Parcelable { * Remove the group with the specified network id from this group list. * * @param netId + * @hide */ - void remove(int netId) { + public void remove(int netId) { mGroups.remove(netId); } @@ -103,8 +107,9 @@ public class WifiP2pGroupList implements Parcelable { /** * Clear the group. + * @hide */ - boolean clear() { + public boolean clear() { if (mGroups.size() == 0) return false; isClearCalled = true; mGroups.evictAll(); @@ -120,8 +125,9 @@ public class WifiP2pGroupList implements Parcelable { * * @param deviceAddress p2p device address. * @return the network id. if not found, return -1. + * @hide */ - int getNetworkId(String deviceAddress) { + public int getNetworkId(String deviceAddress) { if (deviceAddress == null) return -1; final Collection<WifiP2pGroup> groups = mGroups.snapshot().values(); @@ -142,8 +148,9 @@ public class WifiP2pGroupList implements Parcelable { * @param deviceAddress p2p device address. * @param ssid ssid. * @return the network id. if not found, return -1. + * @hide */ - int getNetworkId(String deviceAddress, String ssid) { + public int getNetworkId(String deviceAddress, String ssid) { if (deviceAddress == null || ssid == null) { return -1; } @@ -166,8 +173,9 @@ public class WifiP2pGroupList implements Parcelable { * * @param netId network id. * @return the address. if not found, return null. + * @hide */ - String getOwnerAddr(int netId) { + public String getOwnerAddr(int netId) { WifiP2pGroup grp = mGroups.get(netId); if (grp != null) { return grp.getOwner().deviceAddress; @@ -182,8 +190,9 @@ public class WifiP2pGroupList implements Parcelable { * * @param netId network id. * @return true if the specified network id is present in this group list. + * @hide */ - boolean contains(int netId) { + public boolean contains(int netId) { final Collection<WifiP2pGroup> groups = mGroups.snapshot().values(); for (WifiP2pGroup grp: groups) { if (netId == grp.getNetworkId()) { |