use of android.net.wifi.p2p.WifiP2pDevice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class P2pThisDevicePreferenceControllerTest method updateDeviceName_emptyName_shouldUseIpAddress.
@Test
public void updateDeviceName_emptyName_shouldUseIpAddress() {
WifiP2pDevice device = new WifiP2pDevice();
device.deviceAddress = "address";
mController.displayPreference(mPreferenceScreen);
mController.updateDeviceName(device);
assertThat(mPreference.getTitle()).isEqualTo(device.deviceAddress);
}
use of android.net.wifi.p2p.WifiP2pDevice in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class P2pThisDevicePreferenceControllerTest method updateDeviceName_hasName_shouldUseName.
@Test
public void updateDeviceName_hasName_shouldUseName() {
WifiP2pDevice device = new WifiP2pDevice();
device.deviceAddress = "address";
device.deviceName = "name";
mController.displayPreference(mPreferenceScreen);
mController.updateDeviceName(device);
assertThat(mPreference.getTitle()).isEqualTo(device.deviceName);
}
use of android.net.wifi.p2p.WifiP2pDevice in project android_packages_apps_Settings by omnirom.
the class WifiP2pSettings method handlePeersChanged.
private void handlePeersChanged() {
mPeerCategoryController.removeAllChildren();
mConnectedDevices = 0;
if (DBG)
Log.d(TAG, "List of available peers");
for (WifiP2pDevice peer : mPeers.getDeviceList()) {
if (DBG)
Log.d(TAG, "-> " + peer);
mPeerCategoryController.addChild(new WifiP2pPeer(getPrefContext(), peer));
if (peer.status == WifiP2pDevice.CONNECTED)
mConnectedDevices++;
}
if (DBG)
Log.d(TAG, " mConnectedDevices " + mConnectedDevices);
}
use of android.net.wifi.p2p.WifiP2pDevice in project android_packages_apps_Settings by omnirom.
the class P2pThisDevicePreferenceControllerTest method updateDeviceName_hasName_shouldUseName.
@Test
public void updateDeviceName_hasName_shouldUseName() {
WifiP2pDevice device = new WifiP2pDevice();
device.deviceAddress = "address";
device.deviceName = "name";
mController.displayPreference(mPreferenceScreen);
mController.updateDeviceName(device);
assertThat(mPreference.getTitle()).isEqualTo(device.deviceName);
}
use of android.net.wifi.p2p.WifiP2pDevice in project android_packages_apps_Settings by omnirom.
the class P2pThisDevicePreferenceControllerTest method updateDeviceName_emptyName_shouldUseIpAddress.
@Test
public void updateDeviceName_emptyName_shouldUseIpAddress() {
WifiP2pDevice device = new WifiP2pDevice();
device.deviceAddress = "address";
mController.displayPreference(mPreferenceScreen);
mController.updateDeviceName(device);
assertThat(mPreference.getTitle()).isEqualTo(device.deviceAddress);
}
Aggregations