From 90dd5df09089b549c01087028af5a164d7b61da3 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Thu, 28 Sep 2023 13:50:15 +0800 Subject: [PATCH] Add requiresNonNull to LoveDocumentsProvider. --- .../normal/java/org/love2d/android/LoveDocumentsProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/normal/java/org/love2d/android/LoveDocumentsProvider.java b/app/src/normal/java/org/love2d/android/LoveDocumentsProvider.java index a24ee344..2bcc0a4e 100644 --- a/app/src/normal/java/org/love2d/android/LoveDocumentsProvider.java +++ b/app/src/normal/java/org/love2d/android/LoveDocumentsProvider.java @@ -48,6 +48,7 @@ import java.util.Comparator; import java.util.HashSet; import java.util.LinkedList; +import java.util.Objects; import java.util.PriorityQueue; import java.util.Set; @@ -95,7 +96,7 @@ public class LoveDocumentsProvider extends DocumentsProvider { public boolean onCreate() { Log.v(TAG, "onCreate"); - mBaseDir = getContext().getExternalFilesDir(null); + mBaseDir = Objects.requireNonNull(getContext()).getExternalFilesDir(null); return true; }