mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-10-04 06:41:48 +00:00
Fix strange behaviour when app loses access to saf download folder
This commit is contained in:
@@ -223,6 +223,15 @@ public class StoredDirectoryHelper {
|
||||
return docTree == null ? ioTree.canWrite() : docTree.canWrite();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code false} if the storage is direct, or the SAF storage is valid; {@code true} if
|
||||
* SAF access to this SAF storage is denied (e.g. the user clicked on {@code Android settings ->
|
||||
* Apps & notifications -> NewPipe -> Storage & cache -> Clear access});
|
||||
*/
|
||||
public boolean isInvalidSafStorage() {
|
||||
return docTree != null && docTree.getName() == null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
Reference in New Issue
Block a user