Fix system watchdog timeout when reading too many usage events.

As issue link:

UsageStatsService.onDisplayChanged executed in system main thread,
If calling UsageStatsManager.queryEvents with too many events before it
(i.e. in daily usage event file,
too many activity resume / pause events or configuration change
during monkey test),
System will be blocked then watchdog timeout.

Let display listener executed in background thread handler

BUG: 25355086

Change-Id: Ic894d112612400ed8fb7ba843b3309fdc4f66fe1
(Cherrypicked from 4e59db328d8b0cc163d2e3eb0f7f3a108f20a58d)
(cherry picked from commit 7018f60b06fd0c647ebf13225320d7e15d02e075)
diff --git a/services/usage/java/com/android/server/usage/ b/services/usage/java/com/android/server/usage/
index 2b8afba..54d9cd9 100644
--- a/services/usage/java/com/android/server/usage/
+++ b/services/usage/java/com/android/server/usage/
@@ -218,7 +218,7 @@
             synchronized (this) {
                 mScreenOnTime = readScreenOnTimeLocked();
-            mDisplayManager.registerDisplayListener(mDisplayListener, null);
+            mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
             synchronized (this) {