diff options
author | Filip Gruszczynski <gruszczy@google.com> | 2014-10-13 15:51:39 -0700 |
---|---|---|
committer | Filip Gruszczynski <gruszczy@google.com> | 2014-10-13 15:51:39 -0700 |
commit | 5dcc3aca42255616c48388e012d1b43b2ac450f9 (patch) | |
tree | a4e67eb879dbf2a9efa1f68e95afb16ac24cad68 /services/core | |
parent | 540861c925df9b3743251e5d219cd5fe790f9048 (diff) | |
download | frameworks_base-5dcc3aca42255616c48388e012d1b43b2ac450f9.zip frameworks_base-5dcc3aca42255616c48388e012d1b43b2ac450f9.tar.gz frameworks_base-5dcc3aca42255616c48388e012d1b43b2ac450f9.tar.bz2 |
Log wallpaper crashes.
Change-Id: I40d9876dad2a8ec98135e3df127950dc3797040b
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/EventLogTags.logtags | 6 | ||||
-rw-r--r-- | services/core/java/com/android/server/wallpaper/WallpaperManagerService.java | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags index 99a1254..64d8f6f 100644 --- a/services/core/java/com/android/server/EventLogTags.logtags +++ b/services/core/java/com/android/server/EventLogTags.logtags @@ -165,6 +165,12 @@ option java_package com.android.server # --------------------------- +# WallpaperManagerService.java +# --------------------------- +33000 wp_wallpaper_crashed (component|3) + + +# --------------------------- # ConnectivityService.java # --------------------------- # Connectivity state changed diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java index 8a36335..ef87ecc 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java @@ -62,6 +62,7 @@ import android.service.wallpaper.IWallpaperConnection; import android.service.wallpaper.IWallpaperEngine; import android.service.wallpaper.IWallpaperService; import android.service.wallpaper.WallpaperService; +import android.util.EventLog; import android.util.Slog; import android.util.SparseArray; import android.util.Xml; @@ -87,6 +88,7 @@ import com.android.internal.content.PackageMonitor; import com.android.internal.util.FastXmlSerializer; import com.android.internal.util.JournaledFile; import com.android.internal.R; +import com.android.server.EventLogTags; public class WallpaperManagerService extends IWallpaperManager.Stub { static final String TAG = "WallpaperManagerService"; @@ -99,6 +101,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { * restarting it vs. just reverting to the static wallpaper. */ static final long MIN_WALLPAPER_CRASH_TIME = 10000; + static final int MAX_WALLPAPER_COMPONENT_LOG_LENGTH = 128; static final String WALLPAPER = "wallpaper"; static final String WALLPAPER_INFO = "wallpaper_info.xml"; @@ -272,6 +275,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { } else { mWallpaper.lastDiedTime = SystemClock.uptimeMillis(); } + EventLog.writeEvent(EventLogTags.WP_WALLPAPER_CRASHED, + name.flattenToString().substring(0, + MAX_WALLPAPER_COMPONENT_LOG_LENGTH)); } } } |