Merge "Fix an assertion to avoid crash on deletions in Recent root." into nyc-dev

This commit is contained in:
Garfield Tan
2016-05-26 23:46:40 +00:00
committed by Android (Google) Code Review

View File

@@ -308,7 +308,9 @@ abstract public class Job implements Runnable {
String id, DocumentStack stack, List<DocumentInfo> srcs,
DocumentInfo srcParent) {
assert(!srcs.isEmpty());
assert(stack.peek().isDirectory()); // we can't currently delete from archives.
// stack is empty if we delete docs from recent.
// we can't currently delete from archives.
assert(stack.isEmpty() || stack.peek().isDirectory());
return new DeleteJob(service, appContext, listener, id, stack, srcs, srcParent);
}
}