Fix bug 2271901: do not auto-connect to services on a BT device
when pairing was initiated by the device (e.g. for OPP file transfer).
Also corrected some typos and removed an unneeded lock object in
LocalBluetoothManager (synchronize on .class object instead, like
android.bluetooth.BluetoothDevice.getService() does).
Change-Id: I121105c6eee2658129f6094786754bbc7932d324
Merge commit '59091c08f4d0ad8f42013f58ce9bd23ac3306336' into gingerbread-plus-aosp
* commit '59091c08f4d0ad8f42013f58ce9bd23ac3306336':
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
Merge commit '28580b4d9a36bb15e75423bc95747b9a746ea8b9' into gingerbread-plus-aosp
* commit '28580b4d9a36bb15e75423bc95747b9a746ea8b9':
Remove Search from the system Settings app DO NOT MERGE
The search settings acitivity lives in the system search app,
which is build-dependent. Also, since the Browser no longer
looks at the SHOW_WEB_SUGGESTIONS system preference, none
of the search settings affect the behavior of any other
platform apps.
The search settings will henceforth only be
available from within the search app (e.g. QuickSearchBox).
This is a cherry-pick of change I08f3979cd8cdc0742efbc49be95aa59753c94c0d
to gingerbread.
Bug: 3017365
Change-Id: I55df30e3a0e1f307ad6f23900f54d3018efda59f
Merge commit '3a6bb47d9f97ff55d75a23fac85c0febbabcb2eb' into gingerbread-plus-aosp
* commit '3a6bb47d9f97ff55d75a23fac85c0febbabcb2eb':
Some improvements to the manage apps code:
- Battery stats now aggregates bluetooth usage.
- Battery stats now uses new history iterator API.
- Battery stats chart is refectored to have the start of a
common facility for building tick charts.
- Manage apps will now asynchronously wait for the apps list
if it is taking >.25ms to build.
Change-Id: I568dd74beedf9a0a5a4c88ab567510cee9af8299
The Linux kernel supports reporting "cold" battery health to sysfs.
Android framework has not implemented this and it defaults to "unknown"
This adds handling the cold battery health.
Change-Id: Idfc7029fabcdfdaaf2b5c95977c11e0eb3fd76a7
Merge commit 'cb818619c669d4257a4df969dd03eff479ba84d0' into gingerbread-plus-aosp
* commit 'cb818619c669d4257a4df969dd03eff479ba84d0':
Update power usage UI to follow WIFI data changes.
Now handles WIFI start times being distributed across applications,
and collapses all work done in WIFI uid procs (esp that supplicant
thing) into the apps and overall WIFI category.
Change-Id: I341e5d63c45eeb0fb4121beed62474d947f9de11
Merge commit '213d579f98a83145989f11cfdbd47631b64de000' into gingerbread-plus-aosp
* commit '213d579f98a83145989f11cfdbd47631b64de000':
Don't disconnect the same device before connecting.
We Pair: Remote device sends incoming connection, we get connected.
We get BondingState change and we connect.
Settings app disconnects connected profiles and then connects
without checking whether we are disconnecting the same device itself.
How was it working before ? Settings app used to queue all
commands. The disconnect followed by the connect would work
but unnecessarily disconnect and then connect.
With the queuing moved to framework, the connect fails
since the disconnect status has not been broadcasted.
Settings app shouldn't be disconnecting connected profiles.
That logic should reside in the framework. There is an open bug
and when the new APIs get implemented this will get removed.
Change-Id: I32a7fa36ff3c3321691c55071498f985dcdcfe8e
Merge commit 'c5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb' into gingerbread-plus-aosp
* commit 'c5c8dad0afb84bda9495a0aa1f7d6a3db28de5cb':
Use new apply() instead of commit().
apply() starts an async disk write and doesn't have a return
value but is otherwise identical in observable effects.
Change-Id: I0f528607319d7eb5136bb11fce0b24d8741ccdf9
Merge commit 'e5e4282af1d2d4277c8e2c13a312be0187f44257' into gingerbread-plus-aosp
* commit 'e5e4282af1d2d4277c8e2c13a312be0187f44257':
Enable the call setting when the VoIP feature is supported.
If the VoIP feature is included, the user need to be able to
configure the internet call settings even if it is in airplan mode.
Change-Id: I00d73fb0d9213162b8a9887cad0f800418446787
Merge commit '83c3b64ff7235e1382712a899ab0a269ce8a28d6' into gingerbread-plus-aosp
* commit '83c3b64ff7235e1382712a899ab0a269ce8a28d6':
BT: The Phone doesn't "wake up" when trying to pair with it.
To improve the pairing request usability:
- In the case where a notification shall be used the standard
notification sound is added
- When the screen is off notification is always used.
Change-Id: I751a7913517c64de5d7ba06d7c17358197d002c5
Merge commit '5774d5d34b2339135feab01b998fcd111ebdde4d' into gingerbread-plus-aosp
* commit '5774d5d34b2339135feab01b998fcd111ebdde4d':
Show correct process dependency for providers.
Merge commit '22aa2130fe40952d477a998ba60dea99ada32711' into gingerbread-plus-aosp
* commit '22aa2130fe40952d477a998ba60dea99ada32711':
Make power control widget be more responsive. Fix StrictMode violations.
Also use new location providers changed broadcast intent, and fix a bug
introduced in Froyo where we stopped observing the SYSTEM_CLOSE_DIALOGS
intent so we fell out of sync (more often) with the sync settings.
Now even responsive during the boot I/O storm! (except for toggling
brightness, which still does disk writes from the UI thread...)
BUG=2956025
Change-Id: I77876ff6e0be2325c15d5f08bb2970edf233f839
To improve the pairing request usability:
- In the case where a notification shall be used the standard
notification sound is added
- When the screen is off notification is always used.
Change-Id: I751a7913517c64de5d7ba06d7c17358197d002c5
Merge commit 'a712c3b7b5a17129d016ede082e3e3b2bbd31f9a' into gingerbread-plus-aosp
* commit 'a712c3b7b5a17129d016ede082e3e3b2bbd31f9a':
A couple small settings fixes:
- Correctly position WIFI/GPS charts.
- Start out with running services hidden in case we need to show
the progress bar.
Change-Id: I8852f334f68f4e9122b5d688d9fd57d0f94d94d8
Merge commit 'be5994d20152c7194aac79eb8152240655fd3373' into gingerbread-plus-aosp
* commit 'be5994d20152c7194aac79eb8152240655fd3373':
Some improvements to the battery usage UI:
- Show wake lock usage in the battery history.
- Show WIFI usage in the battery history.
- Show the amount an app has held a wake lock in the app details.
- Also fix service run time computation in running services.
Change-Id: I5aa959857f83808fbc709f65204f59bbfb73935b
Merge commit '3673546205ebf1b4c83c212c1032eea38c8adbe7' into gingerbread-plus-aosp
* commit '3673546205ebf1b4c83c212c1032eea38c8adbe7':
More version info.
Also change the app details screen to make use of the common
ApplicationsState object for its UI, improving launch performance.
Change-Id: I387ed72a06d44aab47a85692c10247ce488c605c
(This replaces Iaa0f3b25eaadb094a4c3fb4cecbd09e0322aae33)
This change removes the need to convert Object[]->String[] for each iteration
of each of available,tethered,errored states in updateStatus()
by converting these as soon as possible.
This fix (and the code before) is strange because each of available,tethered,
errored are defined as type ArrayList<String> but
intent.getStringArrayListExtra() returns type Object[] dispite its name.
Because other calls to updateState() use String[] it seems best to do the
conversion outside this method in the Object[] case and thus avoid the
per-iteration casting in the Object[] case and the downright wasteful
per-iteration String[]->Object[]->String[] casting in the String[] input cases.
I've also removed some unused imports and an unused variable.
Change-Id: I805ef19aa9ceff7e4fc491623cdcb413ce170798