summaryrefslogtreecommitdiffstats
path: root/core/java/android/database
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2009-05-15 15:10:40 -0700
committerFred Quintana <fredq@google.com>2009-05-22 14:17:48 -0700
commit8943737692169f564cd34a9c8d471f3a5d438712 (patch)
tree7b017cbed472235c15d32e694b1fa18c5446c751 /core/java/android/database
parentfc5095f44ba46b57f4ef6179ee4d69ce3a7fe69a (diff)
downloadframeworks_base-8943737692169f564cd34a9c8d471f3a5d438712.zip
frameworks_base-8943737692169f564cd34a9c8d471f3a5d438712.tar.gz
frameworks_base-8943737692169f564cd34a9c8d471f3a5d438712.tar.bz2
add ipc support to batching
Diffstat (limited to 'core/java/android/database')
-rw-r--r--core/java/android/database/DatabaseUtils.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java
index 78ef374..4ca6601 100644
--- a/core/java/android/database/DatabaseUtils.java
+++ b/core/java/android/database/DatabaseUtils.java
@@ -20,6 +20,7 @@ import org.apache.commons.codec.binary.Hex;
import android.content.ContentValues;
import android.content.Context;
+import android.content.OperationApplicationException;
import android.database.sqlite.SQLiteAbortException;
import android.database.sqlite.SQLiteConstraintException;
import android.database.sqlite.SQLiteDatabase;
@@ -82,6 +83,8 @@ public class DatabaseUtils {
code = 8;
} else if (e instanceof SQLiteException) {
code = 9;
+ } else if (e instanceof OperationApplicationException) {
+ code = 10;
} else {
reply.writeException(e);
Log.e(TAG, "Writing exception to parcel", e);
@@ -123,6 +126,18 @@ public class DatabaseUtils {
}
}
+ public static void readExceptionWithOperationApplicationExceptionFromParcel(
+ Parcel reply) throws OperationApplicationException {
+ int code = reply.readInt();
+ if (code == 0) return;
+ String msg = reply.readString();
+ if (code == 10) {
+ throw new OperationApplicationException(msg);
+ } else {
+ DatabaseUtils.readExceptionFromParcel(reply, msg, code);
+ }
+ }
+
private static final void readExceptionFromParcel(Parcel reply, String msg, int code) {
switch (code) {
case 2: