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

am: 66f7553862

* commit '66f75538622f951f1088b6fc163c046e5c4338cf':
  Fix an assertion to avoid crash on deletions in Recent root.

Change-Id: Ic6355197bcfeb879aff7ede761aa56aa05687533
This commit is contained in:
Garfield Tan
2016-05-27 04:03:19 +00:00
committed by android-build-merger

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);
}
}