Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb6230c9 authored by Mahesh A Saptasagar's avatar Mahesh A Saptasagar Committed by Gerrit Code Review
Browse files

p2p: Display P2P peer MAC address if device name is empty.

Display MAC address of a P2P peer in an invitation prompt
message on receiving invitation request from the P2P peer
with empty device name.

Change-Id: Icabeb91d666437746eb5a733ec582849eb7295a5
CRs-Fixed: 506109
parent d852b5af
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2185,7 +2185,6 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
        ViewGroup group = (ViewGroup) textEntryView.findViewById(R.id.info);
        addRowToDialog(group, R.string.wifi_p2p_from_message, getDeviceName(
                mSavedPeerConfig.deviceAddress));

        final EditText pin = (EditText) textEntryView.findViewById(R.id.wifi_p2p_wps_pin);

        AlertDialog dialog = new AlertDialog.Builder(mContext)
@@ -2537,6 +2536,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
    private String getDeviceName(String deviceAddress) {
        WifiP2pDevice d = mPeers.get(deviceAddress);
        if (d != null) {
                String deviceName = d.deviceName;
                if (deviceName.equals("")) {
                    return deviceAddress;
                }
                return d.deviceName;
        }
        //Treat the address as name if there is no match