Home
last modified time | relevance | path

Searched refs:WifiP2pDevice (Results 1 – 25 of 48) sorted by relevance

12

/packages/modules/Wifi/framework/tests/src/android/net/wifi/p2p/
DWifiP2pDeviceTest.java54 private void compareWifiP2pDevices(WifiP2pDevice devA, WifiP2pDevice devB) { in compareWifiP2pDevices()
78 WifiP2pDevice dev_a = new WifiP2pDevice(); in testEqualsWithHashCode()
80 WifiP2pDevice dev_b = new WifiP2pDevice(); in testEqualsWithHashCode()
92 WifiP2pDevice device = new WifiP2pDevice(); in testCopyConstructorWithDefaultValues()
93 WifiP2pDevice copy = new WifiP2pDevice(device); in testCopyConstructorWithDefaultValues()
102 WifiP2pDevice device = new WifiP2pDevice(); in testCopyConstructorWithUpdatedValues()
110 device.status = WifiP2pDevice.CONNECTED; in testCopyConstructorWithUpdatedValues()
112 WifiP2pDevice copy = new WifiP2pDevice(device); in testCopyConstructorWithUpdatedValues()
121 WifiP2pDevice device = new WifiP2pDevice(); in testCopyConstructorWithNullWfdInfo()
129 device.status = WifiP2pDevice.CONNECTED; in testCopyConstructorWithNullWfdInfo()
[all …]
DWifiP2pDeviceListTest.java33 private static final WifiP2pDevice TEST_DEVICE_1 = new WifiP2pDevice("aa:bb:cc:dd:ee:ff");
34 private static final WifiP2pDevice TEST_DEVICE_2 = new WifiP2pDevice("aa:bb:cc:dd:ee:f1");
35 private static final WifiP2pDevice TEST_DEVICE_3 = new WifiP2pDevice("11:22:33:44:55:66");
36 private static final WifiP2pDevice TEST_DEVICE_4 = new WifiP2pDevice("a0:b0:c0:d0:e0:f0");
DWifiP2pGroupListTest.java36 private static final WifiP2pDevice TEST_GROUP_OWNER_1 = new WifiP2pDevice("aa:bb:cc:dd:ee:f0");
37 private static final WifiP2pDevice TEST_GROUP_OWNER_2 = new WifiP2pDevice("aa:bb:cc:dd:ee:f1");
38 private static final WifiP2pDevice TEST_GROUP_OWNER_3 = new WifiP2pDevice("aa:bb:cc:dd:ee:f2");
39 private static final WifiP2pDevice TEST_GROUP_OWNER_OTHER =
40 new WifiP2pDevice("aa:bb:cc:dd:ee:f3");
50 WifiP2pDevice goDev) { in createGroup()
DWifiP2pGroupTest.java49 private static final WifiP2pDevice GROUP_OWNER = new WifiP2pDevice("de:ad:be:ef:00:01");
53 private static final WifiP2pDevice CLIENT_1 = new WifiP2pDevice(CLIENT_1_DEV_ADDRESS);
54 private static final WifiP2pDevice CLIENT_2 = new WifiP2pDevice(CLIENT_2_DEV_ADDRESS);
102 Collection<WifiP2pDevice> clientsList = group.getClientList(); in testSetterGetter()
103 for (WifiP2pDevice client : clientsList) { in testSetterGetter()
/packages/modules/Wifi/framework/java/android/net/wifi/p2p/
DWifiP2pDeviceList.java38 private final HashMap<String, WifiP2pDevice> mDevices = new HashMap<String, WifiP2pDevice>();
46 for (WifiP2pDevice d : source.getDeviceList()) { in WifiP2pDeviceList()
47 mDevices.put(d.deviceAddress, new WifiP2pDevice(d)); in WifiP2pDeviceList()
53 public WifiP2pDeviceList(ArrayList<WifiP2pDevice> devices) { in WifiP2pDeviceList()
54 for (WifiP2pDevice device : devices) { in WifiP2pDeviceList()
56 mDevices.put(device.deviceAddress, new WifiP2pDevice(device)); in WifiP2pDeviceList()
61 private void validateDevice(WifiP2pDevice device) { in validateDevice()
88 public void update(WifiP2pDevice device) { in update()
94 public void updateSupplicantDetails(WifiP2pDevice device) { in updateSupplicantDetails()
96 WifiP2pDevice d = mDevices.get(device.deviceAddress); in updateSupplicantDetails()
[all …]
DWifiP2pGroup.java88 private WifiP2pDevice mOwner;
94 private List<WifiP2pDevice> mClients = new ArrayList<WifiP2pDevice>();
199 mOwner = new WifiP2pDevice(match.group(5)); in WifiP2pGroup()
216 WifiP2pDevice dev = new WifiP2pDevice(); in WifiP2pGroup()
223 mOwner = new WifiP2pDevice(nameValue[1]); in WifiP2pGroup()
262 public void setOwner(WifiP2pDevice device) { in setOwner()
267 public WifiP2pDevice getOwner() { in getOwner()
273 addClient(new WifiP2pDevice(address)); in addClient()
277 public void addClient(WifiP2pDevice device) { in addClient()
278 for (WifiP2pDevice client : mClients) { in addClient()
[all …]
DWifiP2pDevice.java53 public class WifiP2pDevice implements Parcelable { class
218 public WifiP2pDevice() { in WifiP2pDevice() method in WifiP2pDevice
239 public WifiP2pDevice(String string) throws IllegalArgumentException { in WifiP2pDevice() method in WifiP2pDevice
351 public void update(@NonNull WifiP2pDevice device) { in update()
357 public void updateSupplicantDetails(WifiP2pDevice device) { in updateSupplicantDetails()
473 if (!(obj instanceof WifiP2pDevice)) return false; in equals()
475 WifiP2pDevice other = (WifiP2pDevice) obj; in equals()
515 public WifiP2pDevice(WifiP2pDevice source) { in WifiP2pDevice() method in WifiP2pDevice
566 public static final @android.annotation.NonNull Creator<WifiP2pDevice> CREATOR =
567 new Creator<WifiP2pDevice>() {
[all …]
DWifiP2pProvDiscEvent.java51 public WifiP2pDevice device;
77 device = new WifiP2pDevice(); in WifiP2pProvDiscEvent()
124 device = new WifiP2pDevice(); in WifiP2pProvDiscEvent()
/packages/services/BuiltInPrintService/src/com/android/bips/p2p/
DP2pDiscoveryProcedure.java22 import android.net.wifi.p2p.WifiP2pDevice;
51 private final List<WifiP2pDevice> mPeers = new ArrayList<>();
77 Collection<WifiP2pDevice> newPeers = list.getDeviceList(); in P2pDiscoveryProcedure()
98 for (WifiP2pDevice peer : mPeers) { in addListener()
115 private void updatePeers(Collection<WifiP2pDevice> newPeers) { in updatePeers()
116 List<WifiP2pDevice> oldPeers = new ArrayList<>(mPeers); in updatePeers()
120 for (WifiP2pDevice peer : newPeers) { in updatePeers()
128 for (WifiP2pDevice peer : mPeers) { in updatePeers()
130 WifiP2pDevice old = getDevice(oldPeers, peer.deviceAddress); in updatePeers()
139 for (WifiP2pDevice oldPeer : oldPeers) { in updatePeers()
[all …]
DP2pMonitor.java20 import android.net.wifi.p2p.WifiP2pDevice;
46 public static String toString(WifiP2pDevice device) { in toString()
57 case WifiP2pDevice.AVAILABLE: in statusString()
59 case WifiP2pDevice.CONNECTED: in statusString()
61 case WifiP2pDevice.FAILED: in statusString()
63 case WifiP2pDevice.INVITED: in statusString()
65 case WifiP2pDevice.UNAVAILABLE: in statusString()
107 public void connect(WifiP2pDevice peer, P2pConnectionListener listener) { in connect()
DP2pConnectionProcedure.java25 import android.net.wifi.p2p.WifiP2pDevice;
51 private final WifiP2pDevice mPeer;
62 WifiP2pDevice peer, P2pConnectionListener listener) { in P2pConnectionProcedure()
75 private WifiP2pConfig configForPeer(WifiP2pDevice peer) { in configForPeer()
89 public WifiP2pDevice getPeer() { in getPeer()
169 WifiP2pDevice device = list.get(mPeer.deviceAddress); in onReceive()
172 if (!mInvited && device != null && device.status == WifiP2pDevice.INVITED) { in onReceive()
187 WifiP2pDevice owner = group.getOwner(); in isConnectedToPeer()
191 for (WifiP2pDevice client : group.getClientList()) { in isConnectedToPeer()
DP2pPrinterConnection.java19 import android.net.wifi.p2p.WifiP2pDevice;
51 private WifiP2pDevice mPeer;
62 public P2pPrinterConnection(BuiltInPrintService service, WifiP2pDevice peer, in P2pPrinterConnection()
75 WifiP2pDevice peer = service.getP2pMonitor().getConnection().getPeer(); in P2pPrinterConnection()
84 private void connectToPeer(WifiP2pDevice peer) { in connectToPeer()
90 public void onPeerFound(WifiP2pDevice peer) { in onPeerFound()
105 public void onPeerLost(WifiP2pDevice peer) { in onPeerLost()
DP2pPeerListener.java19 import android.net.wifi.p2p.WifiP2pDevice;
26 void onPeerFound(WifiP2pDevice peer); in onPeerFound()
29 void onPeerLost(WifiP2pDevice peer); in onPeerLost()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/p2p/
DSupplicantP2pIfaceCallbackHidlImplTest.java37 import android.net.wifi.p2p.WifiP2pDevice;
110 public void answer(String iface, WifiP2pDevice device) { in testOnDeviceFound_success()
120 assertEquals(device.status, WifiP2pDevice.AVAILABLE); in testOnDeviceFound_success()
123 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFound_success()
141 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFound_success()
164 ArgumentCaptor<WifiP2pDevice> deviceCaptor = ArgumentCaptor.forClass(WifiP2pDevice.class); in testOnDeviceFoundWithSignBitInDeviceInfoBytesSuccess()
167 WifiP2pDevice device = deviceCaptor.getValue(); in testOnDeviceFoundWithSignBitInDeviceInfoBytesSuccess()
174 assertEquals(WifiP2pDevice.AVAILABLE, device.status); in testOnDeviceFoundWithSignBitInDeviceInfoBytesSuccess()
185 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFoundWithSignBitInDeviceInfoBytesSuccess()
207 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFound_invalidArguments()
[all …]
DSupplicantP2pIfaceCallbackAidlImplTest.java51 import android.net.wifi.p2p.WifiP2pDevice;
135 public void answer(String iface, WifiP2pDevice device) { in testOnDeviceFound_success()
145 assertEquals(device.status, WifiP2pDevice.AVAILABLE); in testOnDeviceFound_success()
148 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFound_success()
166 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFound_success()
215 public void answer(String iface, WifiP2pDevice device) { in testOnDeviceFoundWithParams_success()
225 assertEquals(device.status, WifiP2pDevice.AVAILABLE); in testOnDeviceFoundWithParams_success()
230 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFoundWithParams_success()
239 anyString(), any(WifiP2pDevice.class)); in testOnDeviceFoundWithParams_success()
262 ArgumentCaptor<WifiP2pDevice> deviceCaptor = ArgumentCaptor.forClass(WifiP2pDevice.class); in testOnDeviceFoundWithSignBitInDeviceInfoBytesSuccess()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/
DSupplicantP2pIfaceCallbackHidlImpl.java25 import android.net.wifi.p2p.WifiP2pDevice;
109 WifiP2pDevice device = new WifiP2pDevice(); in onDeviceFound()
133 device.status = WifiP2pDevice.AVAILABLE; in onDeviceFound()
152 WifiP2pDevice device = new WifiP2pDevice(); in onDeviceLost()
161 device.status = WifiP2pDevice.UNAVAILABLE; in onDeviceLost()
300 WifiP2pDevice owner = new WifiP2pDevice(); in onGroupStarted()
348 WifiP2pDevice client = new WifiP2pDevice(); in onInvitationReceived()
359 WifiP2pDevice owner = new WifiP2pDevice(); in onInvitationReceived()
421 event.device = new WifiP2pDevice(); in onProvisionDiscoveryCompleted()
493 private WifiP2pDevice createStaEventDevice(byte[] interfaceAddress, byte[] p2pDeviceAddress) { in createStaEventDevice()
[all …]
DSupplicantP2pIfaceCallbackAidlImpl.java41 import android.net.wifi.p2p.WifiP2pDevice;
125 WifiP2pDevice device = new WifiP2pDevice(); in onDeviceLost()
134 device.status = WifiP2pDevice.UNAVAILABLE; in onDeviceLost()
333 WifiP2pDevice owner = new WifiP2pDevice(); in onGroupStarted()
435 WifiP2pDevice client = new WifiP2pDevice(); in handleInvitationReceivedEvent()
446 WifiP2pDevice owner = new WifiP2pDevice(); in handleInvitationReceivedEvent()
555 event.device = new WifiP2pDevice(); in handleProvisionDiscoveryCompletedEvent()
630 private WifiP2pDevice createStaEventDevice(byte[] interfaceAddress, byte[] p2pDeviceAddress, in createStaEventDevice()
632 WifiP2pDevice device = new WifiP2pDevice(); in createStaEventDevice()
692 WifiP2pDevice device = createStaEventDevice(srcAddress, p2pDeviceAddress, ipAddressClient); in onP2pApStaConnected()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/p2p/nsd/
DWifiP2pServiceResponse.java19 import android.net.wifi.p2p.WifiP2pDevice;
60 protected WifiP2pDevice mDevice;
119 WifiP2pDevice device, byte[] data) { in WifiP2pServiceResponse()
175 public WifiP2pDevice getSrcDevice() { in getSrcDevice()
180 public void setSrcDevice(WifiP2pDevice dev) { in setSrcDevice()
198 WifiP2pDevice dev = new WifiP2pDevice(); in newInstance()
360 WifiP2pDevice dev = (WifiP2pDevice)in.readParcelable(null);
DWifiP2pUpnpServiceResponse.java19 import android.net.wifi.p2p.WifiP2pDevice;
81 int transId, WifiP2pDevice dev, byte[] data) { in WifiP2pUpnpServiceResponse()
147 int transId, WifiP2pDevice device, byte[] data) { in newInstance()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/
DWifiP2pPeerTest.java25 import android.net.wifi.p2p.WifiP2pDevice;
48 private WifiP2pDevice mWifiP2pDevice;
88 mWifiP2pDevice.status = WifiP2pDevice.FAILED; in compareTo_withLowerDeviceStatus_shouldBeOne()
114 final WifiP2pDevice wifiP2pDevice = mock(WifiP2pDevice.class); in setupOneOtherP2pPeer()
115 wifiP2pDevice.status = WifiP2pDevice.CONNECTED; in setupOneOtherP2pPeer()
DP2pThisDevicePreferenceControllerTest.java24 import android.net.wifi.p2p.WifiP2pDevice;
61 WifiP2pDevice device = new WifiP2pDevice(); in updateDeviceName_emptyName_shouldUseIpAddress()
71 WifiP2pDevice device = new WifiP2pDevice(); in updateDeviceName_hasName_shouldUseName()
DWifiP2pSettingsTest.java35 import android.net.wifi.p2p.WifiP2pDevice;
150 mFragment.onDeviceInfoAvailable(mock(WifiP2pDevice.class)); in networkInfo_afterOnDeviceInfoAvailable_shouldBeRequested()
157 mFragment.onDeviceInfoAvailable(mock(WifiP2pDevice.class)); in onDeviceInfoAvailable_nullChannel_shouldBeIgnored()
234 setupOneP2pPeer(WifiP2pDevice.INVITED); in clickCancel_withInvitedPeerDialog_shouldCallCancelConnection()
245 setupOneP2pPeer(WifiP2pDevice.FAILED); in wifiP2pManager_clickOnFailedPeer_shouldTryToConnect()
332 setupOneP2pPeer(WifiP2pDevice.CONNECTED); in pressDisconnectDialog_clickDisconnectDialog_shouldRemoveGroup()
414 setupOneP2pPeer(WifiP2pDevice.CONNECTED); in onSaveInstanceState_withWiFiPeer_shouldGetP2pDeviceType()
421 assertThat(object instanceof WifiP2pDevice).isTrue(); in onSaveInstanceState_withWiFiPeer_shouldGetP2pDeviceType()
485 final WifiP2pDevice wifiP2pDevice = mock(WifiP2pDevice.class); in peersCategoryController_withOnePeerDevice_shouldBeAvailable()
486 final ArrayList<WifiP2pDevice> deviceList = new ArrayList<>(); in peersCategoryController_withOnePeerDevice_shouldBeAvailable()
[all …]
/packages/services/BuiltInPrintService/src/com/android/bips/discovery/
DP2pDiscovery.java20 import android.net.wifi.p2p.WifiP2pDevice;
43 public static DiscoveredPrinter toPrinter(WifiP2pDevice device) { in toPrinter()
53 public static Uri toPath(WifiP2pDevice device) { in toPath()
95 public void onPeerFound(WifiP2pDevice peer) { in onPeerFound()
108 public void onPeerLost(WifiP2pDevice peer) { in onPeerLost()
/packages/apps/Settings/src/com/android/settings/wifi/p2p/
DWifiP2pSettings.java31 import android.net.wifi.p2p.WifiP2pDevice;
108 private WifiP2pDevice mThisDevice;
143 WifiP2pDevice device =
144 (WifiP2pDevice) intent.getExtra(WifiP2pManager.EXTRA_WIFI_P2P_DEVICE);
145 if (device != null && device.status == WifiP2pDevice.UNAVAILABLE) {
228 WifiP2pDevice device = savedInstanceState.getParcelable(SAVE_DIALOG_PEER); in onCreateView()
427 if (mSelectedWifiPeer.device.status == WifiP2pDevice.CONNECTED) { in onPreferenceTreeClick()
429 } else if (mSelectedWifiPeer.device.status == WifiP2pDevice.INVITED) { in onPreferenceTreeClick()
569 for (WifiP2pDevice peer: mPeers.getDeviceList()) { in handlePeersChanged()
572 if (peer.status == WifiP2pDevice.CONNECTED) mConnectedDevices++; in handlePeersChanged()
[all …]
DWifiP2pPeer.java21 import android.net.wifi.p2p.WifiP2pDevice;
35 public WifiP2pDevice device;
43 public WifiP2pPeer(Context context, WifiP2pDevice dev) { in WifiP2pPeer()

12