Update TermuxConstants

The `TermuxConstants` and `TermuxPropertyConstants` classes have both been updated to `v0.2.0`. Check their Changelog sections for info on changes.
Some other hardcoded termux paths have been removed as well and are now referenced from `TermuxConstants` class.
This commit is contained in:
agnostic-apollo 2021-03-11 20:11:59 +05:00
parent 7b4acb53c9
commit ef9e406300
10 changed files with 310 additions and 116 deletions

View file

@ -35,7 +35,7 @@ public class TermuxDocumentsProvider extends DocumentsProvider {
private static final String ALL_MIME_TYPES = "*/*";
private static final File BASE_DIR = new File(TermuxConstants.HOME_PATH);
private static final File BASE_DIR = TermuxConstants.TERMUX_HOME_DIR;
// The default columns to return information about a root if no specific
@ -171,7 +171,7 @@ public class TermuxDocumentsProvider extends DocumentsProvider {
// through the whole SD card).
boolean isInsideHome;
try {
isInsideHome = file.getCanonicalPath().startsWith(TermuxConstants.HOME_PATH);
isInsideHome = file.getCanonicalPath().startsWith(TermuxConstants.TERMUX_HOME_DIR_PATH);
} catch (IOException e) {
isInsideHome = true;
}