When the battery stats buffer hits 128KB, it hits a code path
that causes an NPE. This can happen depending on usage and charging
patterns and manifest in bad ways, such as failure to boot up
or random crashes, or refusing to go to sleep.
Bug: 5645407
Change-Id: I21d5d189431f776f25bcb7d598c86e598ad8cb17
This class provides an API for an application to know when it is time to
destroy its EGL context when memory is being trimmed. By having this in
the framework, we can still detect whether it will be useful to destroy
any EGL contexts (because we know if doing so will destroy all of them).
Change-Id: I1eac8d640052778052926b875c7928008f752182
Updated WebView documentation to clarify this behavior.
Additionally, if target-densityDpi is specified in the meta viewport
tag, update the display density in ZoomManager.
Bug: 5477652
Bug: 5327492
Change-Id: I176e87489f76a2ee6595d76a006e302b07595de1
Donnot make the bluetoothservice.getUuids call if the bluetooth
is not on. Also get rid of all the necessary locks on BluetoothService
for get property call. It had a lock on BluetoothAdapterProperty.
bug5472114
Change-Id: I383472ae6006fc1f0129c960c8a44ed0df027a43
Bump WebView database version to 11. This has the following effects:
- Removes the old webview cookie table on GB devices. Cookies are now
managed by the Chromium stack.
- Removes the old webview cache database on GB devices. Cache is now
managed by the Chromium stack.
- Autocomplete form data is now stored/retrieved based on
the URL minus the query string/fragment. Upgrade any existing
form URLs in the database to match this format, so we can
still use them. This will impact GB and HC devices.
This has an unfortunate side effect that we may end up with
duplicate URLs in the formurl table (say we had two URLS for the
same host but with different query strings). Currently we only take
the first url from the table - which is fine when they were
unique. The simplest way to work around this is just iterate all the
rows returned and use all the values we find.
Bug: 5560410
Change-Id: I59323dc5e523969e0a1c268b5936d6fa998d625c
Bug: 5533078
There is no alternative and this is still useful and used. It should
not have been deprecated.
Change-Id: I641026cf76ea87738909827b7c48a556d9021d11
During upgrade from v9 -> v10 the database version was not
being updated.
Also remove conditionals based on what are effectively hardcoded
truth values to simplfiy the logic greatly.
Bug: 5560410
Change-Id: I31a01aa35a109a951d4e4c6d5b884bb666668b28
Bugs 5599728 and 5319237.
mInputContentType should be set for a "modern" cupcake
environment says a comment in TextView.
However, it is possible to call onEditorAction on a
TextView that didn't use any of the method that lazily
create that field. This is for instance achieved using
the extracted mode in landscape (Done, Next actions)
or in Contacts, that feature a Next/Done button in the
IME.
As a result, the action is ignored.
The patch is to force the creation of the mInputContentType
when the EditText is associated to the IME.
Change-Id: I5beec5a52e9eec0c209af37d68791bb6ff83d6f6
Currently set to DeskClock's screensaver, but since it's a
(private) string in f/b/c/r/r/values/config.xml any product
could overlay this.
Bug: 5611008
Change-Id: I7a4623c9c667a6cff8ed80ad600a8a4460bfafb7
Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.
It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.
Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
This fixes a problem where the alarm status was forced to scroll on phones
when the date string got too long. We now abbreviate the day on lock screen.
Change-Id: I99990f1568282c65fb6ed4e78d20bb31b3487a8e
Instead of trusting NTP time alone, use the most-conservative of
system clock and NTP.
Bug: 5584564
Change-Id: I5dd87fc009959b1cf0a7d660e385a0b1a8be238b
This change fixes race conditions that occur very regularly when
content providers are accessed from multiple threads at the same
time.
When a content provider is not already in the application's cache,
the application needs to ask the ActivityManager to obtain it.
Meanwhile, another thread can come along and do the same thing.
This can cause problems because the application attempts to
install two copies of the provider and the reference counts
and other bookkeeping can get muddled.
Similarly, there are races between releasing the last reference
to a content provider and acquiring the content provider. It's
possible for one thread to snatch the content provider from the
jaws of death. We need to handle this explicitly to ensure that
the content provider does not accidentally get released right
after it was acquired by the other thread.
This change ensures that the reference count bookkeeping and
provider map are maintained in parallel while holding the same lock.
Previously because the lock was dropped and reacquired in the
middle of acquisition and removal, it was possible for a
content provider with a zero reference count to be returned
to the application. Likewise, it was possible for a content
provider with a non-zero reference count to be disposed!
This change also performs compensatory actions when races are
detected to ensure that the necessary invariants are maintained
throughout. In particular, it ensures that the application
drops a duplicate reference to a content provider when no
longer needed.
Another way to solve this problem would be to explicitly prevent
the races from happening in the first place by maintaining a
table of content providers that are in the process of being
acquired. The first thread to attempt to acquire the provider
would store a record. The next thread would find the record
and block until the first thread was finished. I chose not
to implement the code in that manner because we would still
have needed to perform compensatory actions in the case where
the same provider binder has multiple logical names. Also,
it could cause deadlocks if the attempt to acquire
a content provider were re-entrant for some bizarre reason.
Bug: 5547357
Change-Id: I2ad39a8acc30aaf7ae5354decd0a0a41e9b9c3da