diff options
author | Mark Lu <Mark_Lu@htc.com> | 2015-11-06 15:26:15 +0800 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2015-12-18 00:03:16 +0000 |
commit | 8877120173fd62d6701822471f06fe84e992c2ae (patch) | |
tree | 5fc122441d8217fccce2fb7dc8c8a9d337441b04 /services | |
parent | c99c41781c69d2cfef411c531cf879e84ca62a74 (diff) | |
download | frameworks_base-8877120173fd62d6701822471f06fe84e992c2ae.zip frameworks_base-8877120173fd62d6701822471f06fe84e992c2ae.tar.gz frameworks_base-8877120173fd62d6701822471f06fe84e992c2ae.tar.bz2 |
Fix system watchdog timeout when reading too many usage events.
Symptom:
As issue link:
https://code.google.com/p/android/issues/detail?id=193100
RootCause:
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.
Solution:
Let display listener executed in background thread handler
BUG: 25355086
Change-Id: Ic894d112612400ed8fb7ba843b3309fdc4f66fe1
(Cherrypicked from 4e59db328d8b0cc163d2e3eb0f7f3a108f20a58d)
(cherry picked from commit 7018f60b06fd0c647ebf13225320d7e15d02e075)
Diffstat (limited to 'services')
-rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index 2b8afba..54d9cd9 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java @@ -218,7 +218,7 @@ public class UsageStatsService extends SystemService implements synchronized (this) { mScreenOnTime = readScreenOnTimeLocked(); } - mDisplayManager.registerDisplayListener(mDisplayListener, null); + mDisplayManager.registerDisplayListener(mDisplayListener, mHandler); synchronized (this) { updateDisplayLocked(); } |