Commit Graph

37 Commits

Author SHA1 Message Date
Jake Hamby
436b29e68e Refactor Bluetooth settings for readability and performance.
Major refactoring of Bluetooth settings classes.
- Moved all functionality from LocalBluetoothManager into new
  LocalBluetoothAdapter and LocalBluetoothPreferences, and into
  existing classes.
- Refactored functionality from BluetoothEventRedirector into new
  BluetoothEventManager class, deleting the original version. New
  version uses a HashMap from action Strings to implementers of the
  BluetoothEventManager.Handler interface.
- Created new BluetoothDiscoveryReceiver to update shared preferences
  timestamp for Bluetooth discovery start/finish. This is the only event
  handling we need to do when the settings app is not visible, so it has
  its own receiver entry in AndroidManifest.xml. Edits are written using
  QueuedWork.singleThreadExecutor(), which BroadcastReceiver knows about
  and will wait for completion, eliminating the need for PendingResult.
- Miscellaneous cleanups to code style and logic for readability.
- Pulled some large switch statement code blocks into new methods.
- Changed all Bluetooth state references to the new BluetoothProfile
  constants.
- Changed use of deprecated Notification constructor in
  BluetoothPairingRequest to use Notification.Builder.
- Moved Utf8ByteLengthFilter helper function from BluetoothNamePreference
  into its own class, and moved test cases into the same package.
- Moved all LocalBluetoothProfileManager functionality related to
  specific profiles into new top-level classes (A2dpProfile, etc.), all
  implementing the LocalBluetoothProfile interface.
- Moved all UI-related methods from CachedBluetoothDevice into the class
  that uses the method, or into the static Utils class for shared methods.

Change-Id: I6d49b7f4ae0c7d7dcf62551ee40b51ecb5fe4f47
2011-03-01 18:44:36 -08:00
Eric Fischer
82d880de75 Import revised translations.
Change-Id: I51cf9d94cd14e67e56a86e669a92e1a64eb6540b
2011-02-17 10:20:39 -08:00
Eric Fischer
332af2fdf5 Import revised translations.
Change-Id: Ia9338cf200345ea00eb0179ca06770a9c47c16d8
2010-12-23 14:18:00 -08:00
Eric Fischer
68b975513a Rename Indonesian and Hebrew translations to match Locale.java conventions
Change-Id: Id3eaf43c69acdff39966ce6b4af4d51ebf14c999
2010-12-02 14:12:25 -08:00
Eric Fischer
9f5a2ccf46 Import initial translations for 20 new locales.
Change-Id: I55b0229ca58d63282625b6eaf9e0e58672403c02
2010-11-17 16:40:05 -08:00
Eric Fischer
9dfa60c33e Import revised translations.
Change-Id: I8ff3fdad70919d2937c3a897b5698e45078d0227
2010-11-09 17:42:54 -08:00
Eric Fischer
9446b7fe50 Import revised translations.
Change-Id: I0d19c79e3e0ac76527671d181bb77e8944ec4a5f
2010-10-27 14:36:03 -07:00
Jake Hamby
2695660674 am 5496db04: am 59091c08: Fix Bluetooth device name max length checking.
Merge commit '5496db047df21a44280c56984dbc296e2a1d7968'

* commit '5496db047df21a44280c56984dbc296e2a1d7968':
  Fix Bluetooth device name max length checking.
2010-09-22 17:05:30 -07:00
Jake Hamby
5496db047d am 59091c08: Fix Bluetooth device name max length checking.
Merge commit '59091c08f4d0ad8f42013f58ce9bd23ac3306336' into gingerbread-plus-aosp

* commit '59091c08f4d0ad8f42013f58ce9bd23ac3306336':
  Fix Bluetooth device name max length checking.
2010-09-22 16:26:02 -07:00
Jake Hamby
59091c08f4 Fix Bluetooth device name max length checking.
The Bluetooth device name has a maximum length of 248 bytes in UTF-8
encoding. The settings app previously limited the Bluetooth device
name entered by the user based on the number of characters, which is
incorrect when the name includes non-ASCII characters.

Created a new Utf8ByteLengthFilter class for BluetoothNamePreference
which counts UTF-8 bytes instead of Unicode characters, along with
unit tests.

We can move Utf8ByteLengthFilter into the framework in the future
if it would be useful elsewhere in the system or for applications.

Change-Id: I9debface09659f09d750f3bfe8ad6ddfd34c75c5
2010-09-22 16:04:50 -07:00
Eric Fischer
641ec835c4 Merge "Import Romansh translations." 2010-08-19 12:01:34 -07:00
Amith Yamasani
d79934731c Refactor settings top level activities to use fragments.
Added a base class SettingsPreferenceFragment from which the settings activities should
be derived so that they can behave like fragments. It contains some commonly called
utility methods and dialog conversion to DialogFragment.

Some of the top-level activities can be launched directly without the left pane.
Settings.java acts as a proxy activity that contains just that settings fragment without
the left pane.

There are still a lot of second and third level activities that need to be fragmentized.
This is just the first pass to test the 2-pane layout.
2010-08-18 22:59:33 -07:00
Eric Fischer
dbd31f29d9 Import Romansh translations.
Change-Id: I71df0c212e4ef30c94bc36d048226c3216f79e9b
2010-08-18 16:26:49 -07:00
Eric Fischer
fa58e8dcb0 Import revised translations.
Change-Id: Ib5a34ef0ce1f4639a4744efbc401788982ad43b3
2010-08-10 12:13:01 -07:00
Eric Fischer
f10101c9c6 Import revised translations.
Change-Id: I0b805e4c7d2cedf70ec4ca5309f2a8073010fa51
2010-08-05 16:09:45 -07:00
Eric Fischer
8e2193c6d0 am 4d9d75a4: Import revised translations. DO NOT MERGE
Merge commit '4d9d75a42471ca65670fd2adc80d37bca43a69f6' into gingerbread-plus-aosp

* commit '4d9d75a42471ca65670fd2adc80d37bca43a69f6':
  Import revised translations.  DO NOT MERGE
2010-08-04 10:59:25 -07:00
Eric Fischer
4d9d75a424 Import revised translations. DO NOT MERGE
Change-Id: Ic83849d97650cec0560d847a962756c53d65ea78
2010-08-04 10:45:20 -07:00
The Android Open Source Project
73550d28df merge from froyo-plus-aosp
Change-Id: I6c6ee9c9567f5aef7e1beb585296c1e2fb884e9a
2010-06-14 11:48:15 -07:00
The Android Open Source Project
00c406364e merge from open-source master
Change-Id: I7d167c97600bbf25e2ed8872cffecd9fa5b1db7c
2010-06-11 13:31:28 -07:00
Anders Hammar1
b2dd90383b Settings: Add a hook for operator or vendor specific settings.
The Settings application now provides a hook that can be used by an
operator or a vendor specific application to add an activity of choice
in the settings menu.

Change-Id: Id55da9fd4262bbfc6a5abf863799c747b0d75b24
2010-06-11 14:27:29 +02:00
Kenny Root
28b245c01d Import revised translations
Change-Id: I6f0e1a9dbaa3b3e81b24de207c3731249d160a59
2010-05-17 11:42:19 -07:00
Kenny Root
eab62faea7 Import revised translations
Change-Id: I91401f661d61a86d166baac1cad14b8897d0a467
2010-04-28 09:20:52 -07:00
Kenny Root
c0b5624ccc Import revised translations
Change-Id: Ib730899be1485cc95ed6254279bae0c9413332b3
2010-03-30 09:33:49 -07:00
Kenny Root
c42bee0702 Import revised translations
Change-Id: I0f81ee1b861fa5df40700baccc29e2e6c52a39d1
2010-03-17 22:15:56 -07:00
Eric Fischer
e688885673 Merge "Import new translations" 2010-03-04 14:19:49 -08:00
Eric Fischer
881be995d9 Import new translations 2010-03-04 14:06:34 -08:00
Michael Chan
af080e1abb b/2310373 Change string from Start/Stop Scan to Start/Stop scan
Change-Id: I2ffe47b74a46d9f0e71d905fd1df1a0650c5505a
2010-03-04 10:04:48 -08:00
Michael Chan
76098b7f7a b/2310373 Show pairing dialogs if the device has been scanning for bt devices recently.
Change-Id: Iec9eb37a5e79b63cc3cf226e2ead6d9ed06d56a6
2010-03-03 12:35:49 -08:00
Eric Fischer
a15d03fccc Import new translations. 2010-02-26 17:33:15 -08:00
Romain Guy
3378715626 Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
2010-01-08 15:11:59 -08:00
Eric Fischer
ac052113c8 Update with latest translations. 2010-01-07 16:00:11 -08:00
Eric Fischer
18517f50ed Import revised translations. DO NOT MERGE 2009-11-16 16:45:29 -08:00
Eric Fischer
48c451b388 Import revised translations. DO NOT MERGE
Approver: jerryw
2009-11-12 19:50:45 -08:00
Michael Chan
834e5993e4 b/2234854 Fixed Bluetooth API return codes for requesting permission to enable bluetooth
Also added test app.
2009-11-05 18:32:09 -08:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
de2d9f5f10 Initial Contribution 2008-10-21 07:00:00 -07:00