DO NOT MERGE: Not to crash DocumentsUI if moving cursor fails.
Bug: 31945164 Bug: 30348114 Change-Id: I3ac675c83379dc269ca8e0ff1678dc3979df5252
This commit is contained in:
@@ -157,6 +157,9 @@ public class RecentsLoader extends AsyncTaskLoader<DirectoryResult> {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ExecutionException e) {
|
||||
// We already logged on other side
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to query Recents for authority: " + task.authority
|
||||
+ ". Skip this authority in Recents.", e);
|
||||
}
|
||||
} else {
|
||||
allDone = false;
|
||||
|
||||
@@ -107,7 +107,13 @@ public class Model {
|
||||
mSortOrder = result.sortOrder;
|
||||
doc = result.doc;
|
||||
|
||||
updateModelData();
|
||||
try {
|
||||
updateModelData();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error while accessing cursors", e);
|
||||
notifyUpdateListeners(e);
|
||||
return;
|
||||
}
|
||||
|
||||
final Bundle extras = mCursor.getExtras();
|
||||
if (extras != null) {
|
||||
|
||||
Reference in New Issue
Block a user