performReceive() is called with the activity manager lock held.
Don't call out to other system services (such as user state
callbacks) with the lock held. Post a runnable to the handler
instead.
Bug: 27589217
Change-Id: I5c2f8debe1ae365682b27af65e0bf02bcce50d4a
Note:
DevicePolicyManagerService is changed to inject ContentObserver notifier
Test: all test cases in DevicePolicyManagerTest pass
BUG: 25710621
Change-Id: I347cec71769d0e9dd6a334d7d6339d5ce6a3fa6a
Add content to Settings and SettingsLib to add a checkbox for PBAP
client profile, and remove the box for PBAP server profile when the
client profile is enabled.
Bug: 27642222
Change-Id: I125559904a8e017a01ae90b1f6425129a87cbee3
Fix error in audio focus dispatching log: the message value (here
MSSG_FOCUS_CHANGE, which is 0) was logged instead of the focus
value being sent to the audio focus listener.
Bug 25790720
Change-Id: I534ce8d1059c09a52e56c51acd60405ef3c4cda1
It turns out that BaseInputConnection has still depended on a private
API named BaseInputConnection#reportFinish(), which was introduced
4 years ago to work around a UI freeze due to an unbalanced batch edit
count [1]. Note that such an unbalanced batch edit count cannot always
be avoidable. It can easily occur in the following situations.
- The current IME crashed during batch edit.
- The user changed the View focus during batch edit.
- The current IME called IMM#switchToNextInputMethod() during batch
edit.
The remaining problem is that #reportFinish() is still an internal API
and only subclasses of BaseInputConnection can implement it, and IMM
calls it when and only when the current InputConnection is
BaseInputConnection or its subclass. InputConnectionWrapper and any
other InputConnection implementations will never receive such a callback
to clean up InputConnection#{begin, end}BatchEdit(), which is considered
to be a major contributor to UI freeze.
To address the above issue, we unhide BaseInputConnection#reportFinish()
as InputConnection#closeConnection() so that application developers can
receive an appropriate callback to clean up internal state including
unfinished batch edit.
[1] I5525d776916f0c42d5e6d4a4282aed590d7f0e9a
9d69ecbf61a4a142c3f4cbb9d5659faa6f85e832
Bug: 24688781
Bug: 25332806
Change-Id: I234309c5880c9fe0b299b8bd0f8862796d4dda0d
The VirtualRefBasePtr is used to track the usage of native objects from
the java side by reference counting. Implementing the class delegate to
make sure we dispose the objects correctly.
Change-Id: I3dd4717944b0dbe79f30e49b3083bf65c6e5276d
We still need to be able to compile all the Java source code in the tree
using javac, though the compiled code never ends up running on device.
Bug: 25958912
Change-Id: Id76663cdf768db579517515d7b7f51519b515fa8
Bug: 26912651
By setting debug.hwui.filter_test_overhead to true, hwui's
janktracker will attempt to filter out overhead caused
by the event injection that automated testing uses
Change-Id: I75c8dc5e7798e06e3009baf396108507c7240eec
With ART commit d1537b569b6, the underlying issue is fixed.
Bug: 27618311
Bug: 27676766
Bug: 27693977
Bug: 27915086
Change-Id: Ib6e85e47daf3d2ceab1e5abe615610790ac6947f
It turned out that calling ResourceManager.setDefaultLocalesLocked
and ResourcesManager.applyConfigurationToResourcesLocked
can be called before the locale negotiation is ready.
To fix this issue, move ResourcesManager setup flow after creating
application context.
This also introduces RuntimeException for notifying developers the
initialize order.
Bug: 27567902
Change-Id: Iab7ea384b039fb649fb52d06d45b2bfae21f9a8a