diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-08-14 19:25:14 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-08-16 01:21:41 +0000 |
commit | 3edf5272fb2185403dfe64b9722b9fc9b9de80f8 (patch) | |
tree | 4474c57e2e362d9252f7171476ffb3ebd0f9bbe9 /services/core/java/com/android/server/lights | |
parent | 0a992a8288f8d64ae28402bbafa403959e674a9d (diff) | |
download | frameworks_base-3edf5272fb2185403dfe64b9722b9fc9b9de80f8.zip frameworks_base-3edf5272fb2185403dfe64b9722b9fc9b9de80f8.tar.gz frameworks_base-3edf5272fb2185403dfe64b9722b9fc9b9de80f8.tar.bz2 |
Add trace tag for power management.
Instrumented the basic power manager state transitions,
calling into the Power HAL, setting the display power mode,
and setting the backlight.
Bug: 17004602
Change-Id: I4e362162ddfd7292a7eea8b5d029ce3f6593c4a9
Diffstat (limited to 'services/core/java/com/android/server/lights')
-rw-r--r-- | services/core/java/com/android/server/lights/LightsService.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java index 94cf668..9dcc529 100644 --- a/services/core/java/com/android/server/lights/LightsService.java +++ b/services/core/java/com/android/server/lights/LightsService.java @@ -23,6 +23,7 @@ import android.content.pm.PackageManager; import android.os.Handler; import android.os.IHardwareService; import android.os.Message; +import android.os.Trace; import android.util.Slog; import java.io.FileInputStream; @@ -105,7 +106,12 @@ public class LightsService extends SystemService { mMode = mode; mOnMS = onMS; mOffMS = offMS; - setLight_native(mNativePointer, mId, color, mode, onMS, offMS, brightnessMode); + Trace.traceBegin(Trace.TRACE_TAG_POWER, "setLight(" + mId + ", " + color + ")"); + try { + setLight_native(mNativePointer, mId, color, mode, onMS, offMS, brightnessMode); + } finally { + Trace.traceEnd(Trace.TRACE_TAG_POWER); + } } } |