Looper.quit() is asynchronous. The looper may still has some
preview callbacks in the queue after quit is called. The preview
callback still uses the camera object (setHasPreviewCallback).
After camera is released, RuntimeException will be thrown from
the method. So we need to join the looper thread here.
This change also fixes a potential race condition.
bug:2521202
Change-Id: If69bbb3125d1d30192563559579b87c20fa5aac8
This is kinda gross, but I can't find a good way to check for the
existence of gettid(), except by finding its syscall number. Then
might as well just use it rather than hope gettid's around, as it's
not in sim-eng.
Change-Id: Ieb7b39426dec08bd715b6fe1a9ab5b2801bdf775
This mimics what we do already for SQLiteDatabase's db_operation and
ContentProvider's content_query_operation and
content_update_operation: over a threshold things are always logged,
and under which they're sub-sampled.
Change-Id: Ia0280b9b07b336ee88b17be2a31a7af0fd7c5770
On keyboardful devices, it is possible to disable the system soft input
method. Something changed in eclair that caused the ime to be re-enabled
on every package manager update (packages added/deleted).
Now keep track of disabled system imes in the settings db and search
in that list before enabling a system IME on package changes.
Every time the user goes to settings to enable/disable imes, the list
is re-created.
Any new system IMEs that may be added via an OTA will get enabled if
they have a different package name.
If the Binder is allocated but its constructor does not run for some
reason, then Binder.init() will not be called. Since the object was
allocated, it is still eligible for finalization. Eventually when
the finalizer runs and calls Binder.destroy(), it will have a NULL
binder holder pointer. Previously this would cause Binder.destroy()
to attempt to decrement a reference count on a NULL pointer.
Now we check and ignore the binder if it does not have a valid
holder pointer.
Bug: b/2533956
Change-Id: Ifc2729b2f2abe8bceea5a0645ae0a4c1575b7846
Disallow Tethering being disabled by Wifi
and vice versa. We now need to explicitly
disable tethering to enable Wifi.
Bug: 2539071
Change-Id: Id34a5335e70cb7234367b4709882937a4b8cc526
Due to message removal, wakelock could be held forever.
Do a timer only based wakelock release until we do this
more cleanly in ConnectivityService for later release.
Also, add an optimization to prevent use of wakelocks when driver is
already stopped.
Bug: 2529883
Change-Id: Ia1c2ddd44213ef3aa609855613bf155945bef8e4
The view infos should never be null since they are created by ListView, which is
the natural and only use of this class.
However, some tests in CTS pass null pointers. Replace null by a static empty list.
http://b/issue?id=2527753
Change-Id: I9b92fa018c89007f12be899285f75130b2c8ac40
Null header and footer, as used by CTS tests, were no longer supported.
Added a static empty list to avoid repetitive null tests in that case.
Fixed getItem/getItemId/getView to handle corner cases.
Changed ListAdapter isEnabled documentation for invalid positions.
http://b/issue?id=2527753
Change-Id: I55e5bf21cb0673d906caa7c669987a6ae869d90f
Handle ACTION_CANCEL, fix edge cases related to grabbing content and
beginning a new scroll during overfling/springback. Will prevent
some cases where a view could get stuck overscrolled.
Change-Id: I7e89d9de9b7dc685d2ea278e6b2bd2c794364204
We now release the EGL context when pausing. This
is required to reduce the chance of running out of
contexts on devices which support a limited number
of active EGL contexts.
Someday we may implement a global EGL context
manager that will allow us to let EGL contexts
persist until another activity needs an EGL
context. But for now, without such a manager,
we take the conservative approach.
Separately, we now terminate EGL when
pausing on Sapphire. This is a requirement of the
Sapphire OpenGL driver.
The issue is that our code often "executes" a query
on a background thread but iterates over the cursor
on the UI thread. Since we actually do the fetch
on moveToFirst or moveToNext, the query is in reality
often run on the UI thread and causes an ANR.
Change-Id: Ia561135e974a44ad3e3774ecb23c6a3d0fc38176
Register to receive configuration changes and query the Display rotation as that
will reflect both device orientation and an open keyboard.
Bug: 2219138
Change-Id: Ibd6119ae0c7d473e1a9ede3af24bb4b584c9db71
Need to be sure to compute gids when SD card is mounted, since we
need the package info for that. Note that this is not re-granting
permissions (and in the future we could optimize this to just pass
through the mounted apps).
Change-Id: I51e1c23d17a6429642132902ef75c65a307fc33a
Fix for http://b/issue?id=2539948
This public API can be called from any thread, so do not use an
AsyncTask. In a separate changelist, the caller now uses an
AsyncTask instead.
Change-Id: I646950964323f8c749f9aa2176226561c6f2b21f
Currently, the browser does not use the credentials supplied from JavaScript.
If a request returns a 401 Unauthorized, the browser always prompts the user.
This violates http://www.w3.org/TR/XMLHttpRequest/#the-send-method
Bug: 2533522
Change-Id: I8e72c1a0be187d193c4ad6b2ca8a624c7ae06fa1