OSDN Git Service

Handle hotplug events as described instead of rescanning
authorJesse Hall <jessehall@google.com>
Thu, 8 Nov 2012 19:55:14 +0000 (11:55 -0800)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Thu, 7 Feb 2013 21:59:41 +0000 (21:59 +0000)
commit190fd9aecae650ace2213fdb17a647b2f5a4aa5f
tree89d750b99f67fbfa65aef7b38ca039d75c7996bb
parent9434c112d1fef52ade78d7ef818daf981bf63bef
Handle hotplug events as described instead of rescanning

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
services/java/com/android/server/display/LocalDisplayAdapter.java