Update Android port
* java/org/gnu/emacs/EmacsSafThread.java (EmacsSafThread, getCache) (pruneCache1, pruneCache, cacheChild, cacheDirectoryFromCursor) (documentIdFromName1, openDocumentDirectory1): Implement the cache referred to by the commentary. * java/org/gnu/emacs/EmacsService.java (deleteDocument): Invalidate the cache upon document removal. * src/androidvfs.c (android_saf_exception_check) (android_document_id_from_name): Correctly preserve or set errno in error cases.
This commit is contained in:
@@ -1680,14 +1680,18 @@ public final class EmacsService extends Service
|
||||
deleteDocument (String uri, String id)
|
||||
throws FileNotFoundException
|
||||
{
|
||||
Uri uriObject;
|
||||
Uri uriObject, tree;
|
||||
|
||||
uriObject = Uri.parse (uri);
|
||||
uriObject = DocumentsContract.buildDocumentUriUsingTree (uriObject,
|
||||
id);
|
||||
tree = Uri.parse (uri);
|
||||
uriObject = DocumentsContract.buildDocumentUriUsingTree (tree, id);
|
||||
|
||||
if (DocumentsContract.deleteDocument (resolver, uriObject))
|
||||
return 0;
|
||||
{
|
||||
if (storageThread != null)
|
||||
storageThread.postInvalidateCache (tree, id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user