~xdavidwu/saf-cephfs

be0881935486eb76b016295506be2bf7b7995dda — Pinghao Wu a month ago a0a9321
CephFSDocumentsProvider: icon for symlink-to-dir

based on material symbols drive file move, with color from pixel
M src/main/java/org/safcephfs/CephFSDocumentsProvider.java => src/main/java/org/safcephfs/CephFSDocumentsProvider.java +6 -1
@@ 270,7 270,8 @@ public class CephFSDocumentsProvider extends DocumentsProvider {
		row.add(Document.COLUMN_SIZE, cs.size);
		row.add(Document.COLUMN_LAST_MODIFIED, cs.m_time);

		if (cs.isSymlink()) {
		var wasSymlink = cs.isSymlink();
		if (wasSymlink) {
			executor.executeWithUnchecked(cm -> {
				try {
					cm.stat(dir + displayName, cs);


@@ 299,6 300,10 @@ public class CephFSDocumentsProvider extends DocumentsProvider {
			if (mayRead(cs)) {
				flags |= Document.FLAG_SUPPORTS_METADATA;
			}
			if (wasSymlink) {
				// DocumentsUI grid view is hard-coded to system folder icon
				row.add(Document.COLUMN_ICON, R.drawable.ic_symlink_to_dir);
			}
		} else if (cs.isFile()) {
			if ((MetadataReader.isSupportedMimeType(mimeType) ||
					MediaMetadataReader.isSupportedMimeType(mimeType)) &&

A src/main/res/drawable/ic_symlink_to_dir.xml => src/main/res/drawable/ic_symlink_to_dir.xml +10 -0
@@ 0,0 1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960"
    android:autoMirrored="true">
  <path
      android:fillColor="#9aa0a6"
      android:pathData="M488,560L423,625L479,681L640,520L479,359L423,415L488,480L320,480L320,560L488,560ZM160,800Q127,800 103.5,776.5Q80,753 80,720L80,240Q80,207 103.5,183.5Q127,160 160,160L400,160L480,240L800,240Q833,240 856.5,263.5Q880,287 880,320L880,720Q880,753 856.5,776.5Q833,800 800,800L160,800ZM160,720L800,720Q800,720 800,720Q800,720 800,720L800,320Q800,320 800,320Q800,320 800,320L447,320L367,240L160,240Q160,240 160,240Q160,240 160,240L160,720Q160,720 160,720Q160,720 160,720ZM160,720Q160,720 160,720Q160,720 160,720L160,240Q160,240 160,240Q160,240 160,240L160,240L160,320L160,320Q160,320 160,320Q160,320 160,320L160,720Q160,720 160,720Q160,720 160,720Z"/>
</vector>