diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-01-31 11:48:39 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-02-01 16:30:14 -0800 |
commit | b19a71a20adb48c084e87d06a1e6b0dcb49170f5 (patch) | |
tree | 7b44bc9ebdf25842136091c6318c29f1c16a9ecf /core/java/android/database | |
parent | f10d69f30107f27465684630460615443783f2bc (diff) | |
download | frameworks_base-b19a71a20adb48c084e87d06a1e6b0dcb49170f5.zip frameworks_base-b19a71a20adb48c084e87d06a1e6b0dcb49170f5.tar.gz frameworks_base-b19a71a20adb48c084e87d06a1e6b0dcb49170f5.tar.bz2 |
Support automatic cancellation of Loaders.
Change-Id: I18d3f49e413f48fcdd519d15e99c238ad54d35b9
Diffstat (limited to 'core/java/android/database')
-rw-r--r-- | core/java/android/database/DatabaseUtils.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java index b69d9bf..0022118 100644 --- a/core/java/android/database/DatabaseUtils.java +++ b/core/java/android/database/DatabaseUtils.java @@ -21,6 +21,7 @@ import org.apache.commons.codec.binary.Hex; import android.content.ContentValues; import android.content.Context; import android.content.OperationApplicationException; +import android.content.OperationCanceledException; import android.database.sqlite.SQLiteAbortException; import android.database.sqlite.SQLiteConstraintException; import android.database.sqlite.SQLiteDatabase; @@ -107,6 +108,9 @@ public class DatabaseUtils { code = 9; } else if (e instanceof OperationApplicationException) { code = 10; + } else if (e instanceof OperationCanceledException) { + code = 11; + logException = false; } else { reply.writeException(e); Log.e(TAG, "Writing exception to parcel", e); @@ -178,6 +182,8 @@ public class DatabaseUtils { throw new SQLiteDiskIOException(msg); case 9: throw new SQLiteException(msg); + case 11: + throw new OperationCanceledException(msg); default: reply.readException(code, msg); } |