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

Commit 14f60296 authored by PauloftheWest's avatar PauloftheWest Committed by Android (Google) Code Review
Browse files

Merge "Fixed Bluetooth renaming bug." into lmp-dev

parents e54014c4 ed7b44d8
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -264,9 +264,7 @@
    <!-- Bluetooth settings screen, menu item to scan for nearby bluetooth devices -->
    <string name="bluetooth_scan_for_devices">Scan for devices</string>
    <!-- Bluetooth settings screen, menu item to change this device's Bluetooth name. [CHAR LIMIT=30] -->
    <string name="bluetooth_rename_device" product="tablet">Rename tablet</string>
    <!-- Bluetooth settings screen, menu item to change this device's Bluetooth name. [CHAR LIMIT=30] -->
    <string name="bluetooth_rename_device" product="default">Rename phone</string>
    <string name="bluetooth_rename_device">Rename this device</string>
    <!-- Bluetooth settings screen, confirmation button for rename device dialog. [CHAR LIMIT=20] -->
    <string name="bluetooth_rename_button">Rename</string>
    <!-- Bluetooth settings.  Dialog title to confirm disconnecting from all profiles of a device. [CHAR LIMIT=30] -->
+0 −1
Original line number Diff line number Diff line
@@ -178,7 +178,6 @@ public final class BluetoothNameDialogFragment extends DialogFragment implements
            mDeviceNameUpdated = true;
            mDeviceNameEdited = false;
            mDeviceNameView.setText(mLocalAdapter.getName());
            getActivity().setTitle(mLocalAdapter.getName());
        }
    }

+4 −3
Original line number Diff line number Diff line
@@ -99,13 +99,14 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if (action.equals(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)) {
                updateDeviceName();
                updateDeviceName(context);
            }
        }

        private void updateDeviceName() {
        private void updateDeviceName(Context context) {
            if (mLocalAdapter.isEnabled() && mMyDevicePreference != null) {
                mMyDevicePreference.setTitle(mLocalAdapter.getName());
                mMyDevicePreference.setSummary(context.getResources().getString(
                            R.string.bluetooth_is_visible_message, mLocalAdapter.getName()));
            }
        }
    };