aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java3
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
index 16bf4547..9578df0d 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
@@ -377,8 +377,7 @@ public class AutofillService extends AccessibilityService {
}
private ArrayList<File> searchPasswords(File path, String appName) {
- ArrayList<File> passList
- = PasswordRepository.getFilesList(path);
+ ArrayList<File> passList = PasswordRepository.getFilesList(path);
if (passList.size() == 0) return new ArrayList<>();
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java
index 990aec39..e232b8a0 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java
@@ -166,7 +166,7 @@ public class PasswordRepository {
* @return the list of gpg files in that directory
*/
public static ArrayList<File> getFilesList(File path) {
- if (!path.exists()) return new ArrayList<>();
+ if (path == null || !path.exists()) return new ArrayList<>();
Log.d("REPO", "current path: " + path.getPath());
List<File> directories = Arrays.asList(path.listFiles((FileFilter) FileFilterUtils.directoryFileFilter()));