mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-13 15:00:42 -08:00
Update Android port
* java/org/gnu/emacs/EmacsSafThread.java (postInvalidateCache): New argument cacheName. Remove that file from the cache. (accessDocument1): Consult the storage cache as well. * java/org/gnu/emacs/EmacsService.java (deleteDocument): New argument NAME. * src/android.c (android_init_emacs_service): Add new argument. * src/androidvfs.c (android_saf_delete_document) (android_saf_tree_rmdir, android_saf_file_unlink): Pass name of file being deleted to `deleteDocument'.
This commit is contained in:
parent
431fdda2eb
commit
4bf8b0a2e9
4 changed files with 96 additions and 18 deletions
|
|
@ -1674,10 +1674,13 @@ public final class EmacsService extends Service
|
|||
|
||||
/* Delete the document identified by ID from the document tree
|
||||
identified by URI. Return 0 upon success and -1 upon
|
||||
failure. */
|
||||
failure.
|
||||
|
||||
NAME should be the name of the document being deleted, and is
|
||||
used to invalidate the cache. */
|
||||
|
||||
public int
|
||||
deleteDocument (String uri, String id)
|
||||
deleteDocument (String uri, String id, String name)
|
||||
throws FileNotFoundException
|
||||
{
|
||||
Uri uriObject, tree;
|
||||
|
|
@ -1688,7 +1691,7 @@ public final class EmacsService extends Service
|
|||
if (DocumentsContract.deleteDocument (resolver, uriObject))
|
||||
{
|
||||
if (storageThread != null)
|
||||
storageThread.postInvalidateCache (tree, id);
|
||||
storageThread.postInvalidateCache (tree, id, name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue