Skip to content

Commit 69387f4

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge "Use EVIOCSCLOCKID correctly." into jb-dev
2 parents 0632b35 + a75fe05 commit 69387f4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

services/input/EventHub.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,8 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
11941194
// As of Linux 3.4, there is a new EVIOCSCLOCKID ioctl to set the desired clock.
11951195
// Therefore, we no longer require the Android-specific kernel patch described above
11961196
// as long as we make sure to set select the monotonic clock. We do that here.
1197-
bool usingClockIoctl = !ioctl(fd, EVIOCSCLOCKID, CLOCK_MONOTONIC);
1197+
int clockId = CLOCK_MONOTONIC;
1198+
bool usingClockIoctl = !ioctl(fd, EVIOCSCLOCKID, &clockId);
11981199

11991200
ALOGI("New device: id=%d, fd=%d, path='%s', name='%s', classes=0x%x, "
12001201
"configuration='%s', keyLayout='%s', keyCharacterMap='%s', builtinKeyboard=%s, "

services/java/com/android/server/PowerManagerService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,12 @@ public void crash(final String message)
27092709
}
27102710

27112711
private void goToSleepLocked(long time, int reason) {
2712+
if (mSpew) {
2713+
Exception ex = new Exception();
2714+
ex.fillInStackTrace();
2715+
Slog.d(TAG, "goToSleep mLastEventTime=" + mLastEventTime + " time=" + time
2716+
+ " reason=" + reason, ex);
2717+
}
27122718

27132719
if (mLastEventTime <= time) {
27142720
mLastEventTime = time;

0 commit comments

Comments
 (0)