when a surface was returned from a remote process through the binder we
would leak its resources until a GC happened.
implement writeToParcel to release the source when PARCELABLE_WRITE_RETURN_VALUE
is set
Change-Id: I6a9fa369b0d164a9ca1229b8a2944d3c132a3720
Using close instead of shutdown on the file descriptors and only clear the file
descriptor that was closed. If both file descriptors are cleared the thread
will not be able to close it.
with the current locale, not previous one, every time it is possible.
Add a unit test verifying this fix.
BUG: 2514026
Change-Id: I4dd1b047e1ab4bf399e2c3ebc0304c0cfa3a0928
There is a potential threading issue where an app could call release()
on two threads. This hack adds a static lock object that serializes
access to the Java fields that contain the pointer to the native
AudioRecord object and weak reference to the Java object. Also
modifies finalize() to call release() so that both use the locking
scheme.
Change-Id: I09dcb19b7f501dc582e40e8718142b493eba2518
For each location provider, call getInternalState() to see if it has any
state information to include in a bugreport. If the returned string is not
null, then print a header with the provided name followed by the returned
string.
Change-Id: I0a388d7fba14ac8cadcb80eda0a0ceb95032410b
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
this will allow sqlite to return this name, along with the message.
otherwise, sqlite logging messages are confusing without database
name to associate them with.
Bug #2376231: Apps lose window focus (and back key causes ANR) if the
lock screen is dismissed while the phone is in landscape mode
This is another case where we weren't recomputing the focused window
after changing the visibility policy.
bug #2479958: Investigate source of "Resources don't contain package
for resource number 0x7f0a0000"
Um, okay, so it turns out there were bugs all over the place where
we would load an XML resource from a another application, but not
use the Resources for that application to retrieve its resources...!
I think the only reason any of this stuff was working at all was
because it typically only cared about retrieving the resource
identifiers of the items (it would look up the values later).
Bug #2401082: Passion ERE26 monkey crash - InputMethodManagerService
Add some null checks.
register a logging func with sqlite, to get extra info on errors
sqlite3 (latest patch) from DRH included this functionality.
use it to get more useful debugging info from sqlite
Sometimes shell commands like "am" return before the framework stuff
really finishes initializing (e.g. if you give it no arguments so you
can see the usage info). The runtime used to print the dire and
uninformative message:
E/AndroidRuntime(): ERROR: thread attach failed
With this change it's a bit more subdued:
I/AndroidRuntime(): NOTE: attach of thread 'Binder Thread #2' failed
Ideally it wouldn't get logged at all when it's "expected", but that
requires actual code changes.
StringBlock instances containing UTF-8 strings use a cache to convert
into UTF-16, but using that cache and then using a JNI call to NewString
causes the UTF-8 string as well as two copies of the UTF-16 string to
be held in memory. Getting the UTF-8 string directly from the StringPool
eliminates one copy of the UTF-16 string being held in memory.
This is part 1. Part 2 will include ResXMLParser optimizations.
Change-Id: Ibd4509a485db746d59cd4b9501f544877139276c
Some error messages would have clobbered some memory adjacent to them,
so increase the buffer sizes to fit them.
Change-Id: I9c4a3f3444bf57b5d2bd1b7a2546e16137747ad0
Fix potential invalid array access if start index is before the
beginning of the array or start + count is past the end of the array.
Update Javadoc for mirror to reflect the usage of "start" and "count".
Change-Id: I7e596de8eae5c518a2b4ff0d28604bd9c59f9d9d
Currently there is no way for an application built against the API to
access East Asian Width data from ICU. This adds an API for applications
to use to access it for correct drawing of international characters.
Change-Id: Iab50698ee555ae2ca8ab4b242cc14aa6e0dc3b48