From 4fdf7ef6e008dedd5e6edd4379cb54afe60325c1 Mon Sep 17 00:00:00 2001 From: "KL.chh" <1679216041@qq.com> Date: Thu, 20 Apr 2023 16:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=BA=86DataUtil=E7=9A=84?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/net/micode/notes/tool/DataUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/micode/notes/tool/DataUtils.java b/app/src/main/java/net/micode/notes/tool/DataUtils.java index 8224acd..18701dc 100644 --- a/app/src/main/java/net/micode/notes/tool/DataUtils.java +++ b/app/src/main/java/net/micode/notes/tool/DataUtils.java @@ -91,6 +91,9 @@ public class DataUtils { resolver.update(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, id), values, null, null); } + /** + * 脚本移动到文件夹中 + */ public static boolean batchMoveToFolder(ContentResolver resolver, HashSet ids, long folderId) { if (ids == null) { @@ -106,7 +109,7 @@ public class DataUtils { builder.withValue(NoteColumns.LOCAL_MODIFIED, 1); operationList.add(builder.build()); } - + //异常捕获 try { ContentProviderResult[] results = resolver.applyBatch(Notes.AUTHORITY, operationList); if (results == null || results.length == 0 || results[0] == null) {