summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-05-14 11:42:00 -0700
committerDianne Hackborn <hackbod@google.com>2014-05-15 13:32:29 -0700
commitcbefd8dd2befcb768f911a63becc427ec4c13250 (patch)
tree083c53ca606811b4ccfbda8d013f29497b7efbd0 /core/jni
parente7db83426e9979a0b6ecf124a013dc944dd3ccce (diff)
downloadframeworks_base-cbefd8dd2befcb768f911a63becc427ec4c13250.zip
frameworks_base-cbefd8dd2befcb768f911a63becc427ec4c13250.tar.gz
frameworks_base-cbefd8dd2befcb768f911a63becc427ec4c13250.tar.bz2
Battery stats more wake history, power save mode.
Add new option for battery stats to record the full wake lock history, and recording the current power save mode. Also add in some additional error constants when generating Binder error exceptions. And fix issue #14974572: Avoid repeating wakeup_reason at the beginning of history Change-Id: I7c1a2ab9569de216634f63d8ad69f1294ef1d235
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_util_Binder.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 662af89..d82fc96 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -697,6 +697,38 @@ void signalExceptionForError(JNIEnv* env, jobject obj, status_t err,
jniThrowException(env, "java/lang/RuntimeException",
"Not allowed to write file descriptors here");
break;
+ case -EBADF:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "Bad file descriptor");
+ break;
+ case -ENFILE:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "File table overflow");
+ break;
+ case -EMFILE:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "Too many open files");
+ break;
+ case -EFBIG:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "File too large");
+ break;
+ case -ENOSPC:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "No space left on device");
+ break;
+ case -ESPIPE:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "Illegal seek");
+ break;
+ case -EROFS:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "Read-only file system");
+ break;
+ case -EMLINK:
+ jniThrowException(env, "java/lang/RuntimeException",
+ "Too many links");
+ break;
default:
ALOGE("Unknown binder error code. 0x%" PRIx32, err);
String8 msg;