From c090feb64f674d9840993736a24f9667f8b0e0d5 Mon Sep 17 00:00:00 2001 From: Jake Hamby Date: Tue, 7 Dec 2010 16:27:21 -0800 Subject: [PATCH] Implement BT settings functionality for new UI. - Removed context menu logic for long press (no longer used). - Converted device picker to run in its own Activity, using a dialog theme on large screen devices and full-screen on phones. - Removed unused resources. - Add device to "Paired devices" list when pairing is initiated by the remote device. - Return to Bluetooth settings pane after successfully pairing a new device from the "Find nearby device" pane. - Add support for renaming devices (TODO: persist the custom name and update the "bread crumb" in the action bar to the new device name). - Add support for incoming file transfer and auto connect checkboxes in DeviceProfilesSettings. - Show available and connected device profiles as icons instead of summary text. Available but disconnected profiles are drawn in gray. - Fixed bluetooth_notif_message to include the device name as a parameter instead of appending the name to the end of the localized string. - Changed some fields from private to package scope for more efficient access from inner classes. Bug: 3137982 Change-Id: Ic2d6ee5be60c9c5b3f3a8a58846d58efedfa5c93 --- AndroidManifest.xml | 14 +- res/layout/bluetooth.xml | 51 ------ res/layout/bluetooth_device_picker.xml | 28 +++ res/values/strings.xml | 19 +- src/com/android/settings/DeviceAdminAdd.java | 2 - .../bluetooth/BluetoothDevicePreference.java | 25 ++- .../settings/bluetooth/BluetoothEnabler.java | 4 +- .../bluetooth/BluetoothEventRedirector.java | 6 +- .../bluetooth/BluetoothPairingRequest.java | 5 +- .../settings/bluetooth/BluetoothSettings.java | 80 +++------ .../bluetooth/CachedBluetoothDevice.java | 170 +++--------------- .../CachedBluetoothDeviceManager.java | 12 +- .../bluetooth/DevicePickerActivity.java | 35 ++++ .../bluetooth/DeviceProfilesSettings.java | 49 +++-- .../bluetooth/LocalBluetoothManager.java | 3 + .../LocalBluetoothProfileManager.java | 1 - 16 files changed, 195 insertions(+), 309 deletions(-) delete mode 100644 res/layout/bluetooth.xml create mode 100644 res/layout/bluetooth_device_picker.xml create mode 100644 src/com/android/settings/bluetooth/DevicePickerActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 926f6f87f4a..15dc279cf3f 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -206,16 +206,22 @@ - - - - + + + + + + + diff --git a/res/layout/bluetooth.xml b/res/layout/bluetooth.xml deleted file mode 100644 index a4ac1ca9351..00000000000 --- a/res/layout/bluetooth.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - -