Merge change 4477 into donut
* changes: BulkCursorToCursorAdaptor.respond no longer assumes RemoteException is impossible, fails more gracefully.
This commit is contained in:
@@ -247,9 +247,11 @@ public final class BulkCursorToCursorAdaptor extends AbstractWindowedCursor {
|
|||||||
try {
|
try {
|
||||||
return mBulkCursor.respond(extras);
|
return mBulkCursor.respond(extras);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// This should never happen because the system kills processes that are using remote
|
// the system kills processes that are using remote cursors when the provider process
|
||||||
// cursors when the provider process is killed.
|
// is killed, but this can still happen if this is being called from the system process,
|
||||||
throw new RuntimeException(e);
|
// so, better to log and return an empty bundle.
|
||||||
|
Log.w(TAG, "respond() threw RemoteException, returning an empty bundle.", e);
|
||||||
|
return Bundle.EMPTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user