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

Commit edf8c5dc authored by Weng Su's avatar Weng Su
Browse files

Update maximum length of device name for WiFi direct settings

- Changed the maximum length of the device name from 30 to 22 as recommended by the WiFi framework.

Bug: 231980298
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest

Change-Id: I3bbfca9e2804c4dc65cb20132c402e87f65c0c27
parent 870dcb69
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -522,7 +522,7 @@ public class WifiP2pSettings extends DashboardFragment
            final LayoutInflater layoutInflater = LayoutInflater.from(getPrefContext());
            final View root = layoutInflater.inflate(R.layout.dialog_edittext, null /* root */);
            mDeviceNameText = root.findViewById(R.id.edittext);
            mDeviceNameText.setFilters(new InputFilter[] {new InputFilter.LengthFilter(30)});
            mDeviceNameText.setFilters(new InputFilter[] {new InputFilter.LengthFilter(22)});
            if (mSavedDeviceName != null) {
                mDeviceNameText.setText(mSavedDeviceName);
                mDeviceNameText.setSelection(mSavedDeviceName.length());