Skip to content

Use an EditTextPreference for changing the device name instead of an AlertDialog

Summary

Use an EditTextPreference instead of an AlertDialog for changing the device name because:

  • AlertDialogs do not survive an orientation change
  • Native Preference look and feel

Test Plan

Apply patch and click on settings in the navigation drawer
Click on the Device Name preference and change the name
Perform an orientation change and verify that the "Rename device" dialog is still displayed with the new device name
Press "Rename" or "Done" and verify that Device name preferences summary has been updated to the new device name
Verify that the device name has also been updated in the navigation drawer header

Merge request reports

Loading