Compare commits

...

2 commits

2 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,7 @@
- Support for cross-profile interactions allowlisting (e.g. for Gboard).
- Removed "Fake Camera" feature as it has not been supported since R.
- Version displayed within the app has now been changed to also reflect the exact Git commit when the app is built.
- File Shuttle no longer appends ".null" or ".bin" suffixes unnecessarily. This should make it work much better with file managers such as Material Files.
1.8
===

View file

@ -19,6 +19,7 @@ import android.webkit.MimeTypeMap;
import androidx.annotation.Nullable;
import net.typeblog.shelter.R;
import net.typeblog.shelter.ShelterApplication;
import net.typeblog.shelter.util.CrossProfileDocumentsProvider;
import net.typeblog.shelter.util.Utility;
@ -66,7 +67,12 @@ public class FileShuttleService extends Service {
File f = new File(resolvePath(path));
HashMap<String, Serializable> map = new HashMap<>();
map.put(DocumentsContract.Document.COLUMN_DOCUMENT_ID, f.getAbsolutePath());
map.put(DocumentsContract.Document.COLUMN_DISPLAY_NAME, f.getName());
if (f.equals(Environment.getExternalStorageDirectory())) {
// Show "Shelter" as the name of the root directory
map.put(DocumentsContract.Document.COLUMN_DISPLAY_NAME, getString(R.string.app_name));
} else {
map.put(DocumentsContract.Document.COLUMN_DISPLAY_NAME, f.getName());
}
map.put(DocumentsContract.Document.COLUMN_SIZE, f.length());
map.put(DocumentsContract.Document.COLUMN_LAST_MODIFIED, f.lastModified());