Display events in each batch received from IPC were being processed in
reverse order, and stopped after the first vsync event (latest
chronologically) was handled. This makes perfect sense for vsync
events, but is broken for hotplug events.
Now we process them all in order, handling all except vsync as we see
them. For vsync events, only the last is reported.
Bug: 7491120
Change-Id: I448d139d21dc27128d75ca1d661de666fff51bcb
Hotplug events say which display they're for and whether the display
was connected or disconnected. Before, this info was ignored, and the
event just triggered a rescan of all displays. If a display was
disconnected and then reconnected quickly, the rescan would treat this
as a no-op or a device property change and wouldn't turn the display
on.
Now the display manager attempts to update its state with the change
the event describes. So a quick disconnect/connect cycle will cause
the display to be turned on since the display manager will have
updated its internal state to reflect the disconnect event, and will
treat the connect event as a new display rather than a device property
change.
Bug: 7491120
Change-Id: Ia83f7c96b7f16f4c1bed2a73e9b56b0bf7ee3984
# By Arun Ravindran
# Via Android Git Automerger (1) and others
* commit 'b9620a89bd734d749cd162cbcda4699474bbf57a':
Services: Adding HSPAP info in Android
# By Arun Ravindran
# Via Gerrit Code Review (1) and Shuo Gao (1)
* commit '9434c112d1fef52ade78d7ef818daf981bf63bef':
Services: Adding HSPAP info in Android
# By Jorge Ruesga
# Via Android Git Automerger (1) and others
* commit '1fd774709790b220bb780e95db7275d60a1eae57':
DateView: Use Intent.ACTION_LOCALE_CHANGED to refresh notification bar clock
# By László Dávid
# Via Android Git Automerger (1) and others
* commit '3c6ee5b509d6360a431290fff4b366848c293899':
NullPointerException in SQLiteSession
# By Jorge Ruesga
# Via Gerrit Code Review (1) and Jorge Ruesga (1)
* commit '1a1e9b317ac2d737ad92a35c4d806f0fda1ede70':
DateView: Use Intent.ACTION_LOCALE_CHANGED to refresh notification bar clock
# By László Dávid
# Via Gerrit Code Review (1) and László Dávid (1)
* commit 'd2bec0960d04578182905b34795c6895760944dd':
NullPointerException in SQLiteSession
# By Yevgen Pronenko
# Via Android Git Automerger (1) and others
* commit '8934c57564a864e046c5172ba7d56ab68056ab26':
Disable usage of WAL in DatabaseHelper
# By Niklas Brunlid
# Via Android Git Automerger (1) and others
* commit '1e48b386eac8cb1ca9e6e50d73422661691512dc':
Keep native callbacks when primary SQLiteConnection is recreated
# By Roman Mazur
# Via Android Git Automerger (1) and others
* commit '352d84b841e7c81c259f5de576ea127d177b39f8':
Clear loaders array after they are destroyed.
# By Jangwon Lee
# Via Android Git Automerger (1) and others
* commit '1950d2e6575e04fc623d1d0bcc32393ce4dfef93':
Fix bugs regarding IllegalStateException during moving position in cursorwindow.
# By Sungmin Choi
# Via Android Git Automerger (1) and others
* commit 'e4ce25177bdf7720c6b3dd5ea7b48f6b03b06469':
add reply.writeNoException() for quick response
# By Yevgen Pronenko
# Via Gerrit Code Review (1) and Johan Redestig (1)
* commit '88ba2f48a2d1193f3877575b2589897a7804aa75':
Disable usage of WAL in DatabaseHelper
# By Niklas Brunlid
# Via Gerrit Code Review (1) and Johan Redestig (1)
* commit '04ce0d253de9ec16f921824409a7b2c13195c19e':
Keep native callbacks when primary SQLiteConnection is recreated
# By Sylvain Becuwe
# Via Gerrit Code Review (1) and You Kim (1)
* commit 'ea56499dc36d863f92857ab7f93e5c4436f9654f':
Potential NPE in SQLiteConnection
# By Roman Mazur
# Via Gerrit Code Review (1) and Roman Mazur (1)
* commit '0d47af1131c4d4f9f29dad790d919d8599e3a3cc':
Clear loaders array after they are destroyed.
# By Jangwon Lee
# Via Gerrit Code Review (1) and git-lg-database.lge.com (1)
* commit 'af595a0f37643f12f32860fdea43fb67b74654b4':
Fix bugs regarding IllegalStateException during moving position in cursorwindow.
By using D-pad, no-focus in non touch mode is rare but legal in a case like below.
1. The first request to get focus for a new activity is handled in the first
performTraversals() call when activity is not ready for a complete view hierarchy.
So there might be no focusable yet.
2. If the activity has some menus, ActionMenuView can be attached to the view hierarchy
in the PhoneWindow.preparePanel() soon.
So there can be focusables but still not focused.
Fixed ViewRootImpl.deliverKeyEventPostIme() to handle this case to resurrect a focus
if there are focusables.
How to reproduce:
(1) Open "API Demos" application -> Views -> Search View
(2) Select "Action Bar" item using the D-pad
(3) Try to focus the Search View, using the D-pad.
Change-Id: Ic379774f0307f168f0ed775d0f6a9078ac5c9713