aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_fso_contact.pngbin0 -> 697 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_app.pngbin0 -> 2440 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_calendar.pngbin0 -> 684 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_database.pngbin2400 -> 728 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_ebook.pngbin0 -> 544 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_email.pngbin0 -> 558 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_font.pngbin0 -> 543 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_security.pngbin1864 -> 2970 bytes
-rw-r--r--res/drawable-hdpi/ic_fso_type_system.pngbin0 -> 2896 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_app.pngbin0 -> 1407 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_calendar.pngbin0 -> 535 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_contact.pngbin0 -> 479 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_database.pngbin1410 -> 722 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_ebook.pngbin0 -> 437 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_email.pngbin0 -> 470 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_font.pngbin0 -> 404 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_security.pngbin1067 -> 1617 bytes
-rw-r--r--res/drawable-mdpi/ic_fso_type_system.pngbin0 -> 1665 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_app.pngbin0 -> 3391 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_calendar.pngbin0 -> 1021 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_contact.pngbin0 -> 1003 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_database.pngbin3579 -> 1037 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_ebook.pngbin0 -> 654 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_email.pngbin0 -> 784 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_font.pngbin0 -> 640 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_security.pngbin2673 -> 4606 bytes
-rw-r--r--res/drawable-xhdpi/ic_fso_type_system.pngbin0 -> 5323 bytes
-rw-r--r--res/drawable/fso_type_app.xml22
-rw-r--r--res/drawable/fso_type_calendar.xml22
-rw-r--r--res/drawable/fso_type_contact.xml22
-rw-r--r--res/drawable/fso_type_ebook.xml22
-rw-r--r--res/drawable/fso_type_email.xml22
-rw-r--r--res/drawable/fso_type_font.xml22
-rw-r--r--res/drawable/fso_type_system.xml22
-rw-r--r--res/raw/mime_types.properties36
-rw-r--r--res/values/strings.xml6
-rw-r--r--src/com/cyanogenmod/explorer/util/MimeTypeHelper.java52
37 files changed, 247 insertions, 1 deletions
diff --git a/res/drawable-hdpi/ic_fso_contact.png b/res/drawable-hdpi/ic_fso_contact.png
new file mode 100644
index 00000000..d12fe03b
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_contact.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_app.png b/res/drawable-hdpi/ic_fso_type_app.png
new file mode 100644
index 00000000..be75d033
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_type_app.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_calendar.png b/res/drawable-hdpi/ic_fso_type_calendar.png
new file mode 100644
index 00000000..e5061211
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_type_calendar.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_database.png b/res/drawable-hdpi/ic_fso_type_database.png
index fe2166be..dff91600 100644
--- a/res/drawable-hdpi/ic_fso_type_database.png
+++ b/res/drawable-hdpi/ic_fso_type_database.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_ebook.png b/res/drawable-hdpi/ic_fso_type_ebook.png
new file mode 100644
index 00000000..2b42143d
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_type_ebook.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_email.png b/res/drawable-hdpi/ic_fso_type_email.png
new file mode 100644
index 00000000..4f539c32
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_type_email.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_font.png b/res/drawable-hdpi/ic_fso_type_font.png
new file mode 100644
index 00000000..75746fe5
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_type_font.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_security.png b/res/drawable-hdpi/ic_fso_type_security.png
index a0d67513..a4646975 100644
--- a/res/drawable-hdpi/ic_fso_type_security.png
+++ b/res/drawable-hdpi/ic_fso_type_security.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_fso_type_system.png b/res/drawable-hdpi/ic_fso_type_system.png
new file mode 100644
index 00000000..8fa634bc
--- /dev/null
+++ b/res/drawable-hdpi/ic_fso_type_system.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_app.png b/res/drawable-mdpi/ic_fso_type_app.png
new file mode 100644
index 00000000..7b33b40d
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_app.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_calendar.png b/res/drawable-mdpi/ic_fso_type_calendar.png
new file mode 100644
index 00000000..1c954bdb
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_calendar.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_contact.png b/res/drawable-mdpi/ic_fso_type_contact.png
new file mode 100644
index 00000000..a5bb836c
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_contact.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_database.png b/res/drawable-mdpi/ic_fso_type_database.png
index 6d5af0f0..0cb429c7 100644
--- a/res/drawable-mdpi/ic_fso_type_database.png
+++ b/res/drawable-mdpi/ic_fso_type_database.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_ebook.png b/res/drawable-mdpi/ic_fso_type_ebook.png
new file mode 100644
index 00000000..a6a3da1d
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_ebook.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_email.png b/res/drawable-mdpi/ic_fso_type_email.png
new file mode 100644
index 00000000..89f97301
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_email.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_font.png b/res/drawable-mdpi/ic_fso_type_font.png
new file mode 100644
index 00000000..13dfdef3
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_font.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_security.png b/res/drawable-mdpi/ic_fso_type_security.png
index 31fd43b5..56efbc55 100644
--- a/res/drawable-mdpi/ic_fso_type_security.png
+++ b/res/drawable-mdpi/ic_fso_type_security.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_fso_type_system.png b/res/drawable-mdpi/ic_fso_type_system.png
new file mode 100644
index 00000000..0d5176bf
--- /dev/null
+++ b/res/drawable-mdpi/ic_fso_type_system.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_app.png b/res/drawable-xhdpi/ic_fso_type_app.png
new file mode 100644
index 00000000..53a3d8a0
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_app.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_calendar.png b/res/drawable-xhdpi/ic_fso_type_calendar.png
new file mode 100644
index 00000000..c588285a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_calendar.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_contact.png b/res/drawable-xhdpi/ic_fso_type_contact.png
new file mode 100644
index 00000000..91bbda4a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_contact.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_database.png b/res/drawable-xhdpi/ic_fso_type_database.png
index 2b3bd819..2eebf092 100644
--- a/res/drawable-xhdpi/ic_fso_type_database.png
+++ b/res/drawable-xhdpi/ic_fso_type_database.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_ebook.png b/res/drawable-xhdpi/ic_fso_type_ebook.png
new file mode 100644
index 00000000..5ab6a789
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_ebook.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_email.png b/res/drawable-xhdpi/ic_fso_type_email.png
new file mode 100644
index 00000000..d99e93cc
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_email.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_font.png b/res/drawable-xhdpi/ic_fso_type_font.png
new file mode 100644
index 00000000..7ee5a74f
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_font.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_security.png b/res/drawable-xhdpi/ic_fso_type_security.png
index 2f0d5039..63a8e659 100644
--- a/res/drawable-xhdpi/ic_fso_type_security.png
+++ b/res/drawable-xhdpi/ic_fso_type_security.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_fso_type_system.png b/res/drawable-xhdpi/ic_fso_type_system.png
new file mode 100644
index 00000000..1dc81862
--- /dev/null
+++ b/res/drawable-xhdpi/ic_fso_type_system.png
Binary files differ
diff --git a/res/drawable/fso_type_app.xml b/res/drawable/fso_type_app.xml
new file mode 100644
index 00000000..cd571950
--- /dev/null
+++ b/res/drawable/fso_type_app.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_app"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/fso_type_calendar.xml b/res/drawable/fso_type_calendar.xml
new file mode 100644
index 00000000..f3fe3d68
--- /dev/null
+++ b/res/drawable/fso_type_calendar.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_calendar"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/fso_type_contact.xml b/res/drawable/fso_type_contact.xml
new file mode 100644
index 00000000..d6c6d6ba
--- /dev/null
+++ b/res/drawable/fso_type_contact.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_contact"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/fso_type_ebook.xml b/res/drawable/fso_type_ebook.xml
new file mode 100644
index 00000000..02ae0c57
--- /dev/null
+++ b/res/drawable/fso_type_ebook.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_ebook"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/fso_type_email.xml b/res/drawable/fso_type_email.xml
new file mode 100644
index 00000000..393495e8
--- /dev/null
+++ b/res/drawable/fso_type_email.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_email"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/fso_type_font.xml b/res/drawable/fso_type_font.xml
new file mode 100644
index 00000000..5ed448d5
--- /dev/null
+++ b/res/drawable/fso_type_font.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_font"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/fso_type_system.xml b/res/drawable/fso_type_system.xml
new file mode 100644
index 00000000..084467ec
--- /dev/null
+++ b/res/drawable/fso_type_system.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ** Copyright (C) 2012 The CyanogenMod Project
+ **
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
+ **
+ ** http://www.apache.org/licenses/LICENSE-2.0
+ **
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
+ ** limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:drawable="@drawable/ic_fso_default"/>
+ <item android:drawable="@drawable/ic_fso_type_system"/>
+
+</layer-list> \ No newline at end of file
diff --git a/res/raw/mime_types.properties b/res/raw/mime_types.properties
index b0d44a55..c59c2659 100644
--- a/res/raw/mime_types.properties
+++ b/res/raw/mime_types.properties
@@ -24,9 +24,10 @@
# Binary
a = BINARY | application/octet-stream | fso_type_binary
bin = BINARY | application/octet-stream | fso_type_binary
-dump = BINARY | application/octet-stream | fso_type_binary
class = BINARY | application/java-vm | fso_type_binary
com = BINARY | application/x-msdownload | fso_type_binary
+dex = BINARY | application/octet-stream | fso_type_binary
+dump = BINARY | application/octet-stream | fso_type_binary
exe = BINARY | application/x-msdownload | fso_type_binary
dat = BINARY | application/octet-stream | fso_type_binary
dll = BINARY | application/x-msdownload | fso_type_binary
@@ -108,6 +109,25 @@ rtf = DOCUMENT | application/rtf
xls = DOCUMENT | application/vnd.ms-excel | fso_type_spreadsheet
xlsx = DOCUMENT | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | fso_type_spreadsheet
+# e-Book
+azw = EBOOK | application/octet-stream | fso_type_ebook
+djv = EBOOK | image/x-djvu | fso_type_ebook
+djvu = EBOOK | image/vnd.djvu | fso_type_ebook
+epub = EBOOK | application/epub+zip | fso_type_ebook
+kf8 = EBOOK | application/octet-stream | fso_type_ebook
+lit = EBOOK | application/x-ms-reader | fso_type_ebook
+lrf = EBOOK | application/x-sony-bbeb | fso_type_ebook
+lrx = EBOOK | application/x-sony-bbeb | fso_type_ebook
+ibooks= EBOOK | application/x-ibooks+zip | fso_type_ebook
+
+# Internet document
+ics = INTERNET | text/calendar | fso_type_calendar
+ifb = INTERNET | text/calendar | fso_type_calendar
+eml = INTERNET | message/rfc822 | fso_type_email
+msg = INTERNET | application/vnd.ms-outlook | fso_type_email
+vcf = INTERNET | text/x-vcard | fso_type_contact
+vcs = INTERNET | text/x-vcalendar | fso_type_calendar
+
# CdImage
dmg = CDIMAGE | application/octet-stream | fso_type_cdimage
cue = CDIMAGE | application/octet-stream | fso_type_cdimage
@@ -144,6 +164,12 @@ db = DATABASE | application/octet-stream | fso_type_database
db3 = DATABASE | application/octet-stream | fso_type_database
mdb = DATABASE | application/octet-stream | fso_type_database
+# Font
+otf = FONT | application/x-font-otf | fso_type_font
+ttf = FONT | application/x-font-ttf | fso_type_font
+gsf = FONT | application/x-font-ghostscript | fso_type_font
+psf = FONT | application/x-font-linux-psf | fso_type_font
+
# Image
bmp = IMAGE | image/bmp | fso_type_image
cgm = IMAGE | image/cgm | fso_type_image
@@ -290,3 +316,11 @@ pki = SECURITY | application/pkixcmp | fso_type_security
pgp = SECURITY | application/pgp-encrypted | fso_type_security
sig = SECURITY | application/pgp-signature | fso_type_security
spc = SECURITY | application/x-pkcs7-certificates | fso_type_security
+
+# Application
+apk = APP | application/vnd.android.package-archive | fso_type_app
+pkg = APP | application/octet-stream | fso_type_app
+deb = APP | application/x-debian-package | fso_type_app
+udeb = APP | application/x-debian-package | fso_type_app
+msi = APP | application/x-msdownload | fso_type_app
+rpm = APP | application/x-rpm | fso_type_app
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 92a758a5..8ae993ec 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -27,6 +27,12 @@
<string name="size_megabytes" translatable="false">Mb</string>
<string name="size_gigabytes" translatable="false">Gb</string>
+ <!-- Devices types -->
+ <string name="device_blockdevice">Block device</string>
+ <string name="device_characterdevice">Character device</string>
+ <string name="device_namedpipe">Named pipe</string>
+ <string name="device_domainsocket">Domain socket</string>
+
<!-- Mount Point States -->
<string name="mount_point_readonly">RO</string>
<string name="mount_point_readwrite">RW</string>
diff --git a/src/com/cyanogenmod/explorer/util/MimeTypeHelper.java b/src/com/cyanogenmod/explorer/util/MimeTypeHelper.java
index 127debb3..45a3671e 100644
--- a/src/com/cyanogenmod/explorer/util/MimeTypeHelper.java
+++ b/src/com/cyanogenmod/explorer/util/MimeTypeHelper.java
@@ -21,9 +21,14 @@ import android.content.res.Resources;
import android.util.Log;
import com.cyanogenmod.explorer.R;
+import com.cyanogenmod.explorer.model.BlockDevice;
+import com.cyanogenmod.explorer.model.CharacterDevice;
import com.cyanogenmod.explorer.model.Directory;
+import com.cyanogenmod.explorer.model.DomainSocket;
import com.cyanogenmod.explorer.model.FileSystemObject;
+import com.cyanogenmod.explorer.model.NamedPipe;
import com.cyanogenmod.explorer.model.Symlink;
+import com.cyanogenmod.explorer.model.SystemFile;
import java.util.Enumeration;
import java.util.HashMap;
@@ -44,6 +49,14 @@ public final class MimeTypeHelper {
*/
NONE,
/**
+ * System file
+ */
+ SYSTEM,
+ /**
+ * Application, Installer, ...
+ */
+ APP,
+ /**
* Binary file
*/
BINARY,
@@ -56,6 +69,14 @@ public final class MimeTypeHelper {
*/
DOCUMENT,
/**
+ * e-Book file
+ */
+ EBOOK,
+ /**
+ * Internet document file
+ */
+ INTERNET,
+ /**
* CD Image file
*/
CDIMAGE,
@@ -72,6 +93,10 @@ public final class MimeTypeHelper {
*/
DATABASE,
/**
+ * Font file
+ */
+ FONT,
+ /**
* Image file
*/
IMAGE,
@@ -148,6 +173,10 @@ public final class MimeTypeHelper {
}
}
+ // Check system file
+ if (fso instanceof SystemFile) {
+ return R.drawable.fso_type_system;
+ }
// Check if the fso is executable
if (fso.getPermissions().getUser().isExecute()) {
return R.drawable.fso_type_executable;
@@ -178,6 +207,20 @@ public final class MimeTypeHelper {
return res.getString(R.string.mime_symlink);
}
+ // System files
+ if (fso instanceof BlockDevice) {
+ return context.getString(R.string.device_blockdevice);
+ }
+ if (fso instanceof CharacterDevice) {
+ return context.getString(R.string.device_characterdevice);
+ }
+ if (fso instanceof NamedPipe) {
+ return context.getString(R.string.device_namedpipe);
+ }
+ if (fso instanceof DomainSocket) {
+ return context.getString(R.string.device_domainsocket);
+ }
+
//Get the extension and delivery
String ext = FileHelper.getExtension(fso);
if (ext != null) {
@@ -218,6 +261,15 @@ public final class MimeTypeHelper {
}
}
+ // Check system file
+ if (fso instanceof SystemFile) {
+ return MimeTypeCategory.SYSTEM;
+ }
+ // Check if the fso is executable
+ if (fso.getPermissions().getUser().isExecute()) {
+ return MimeTypeCategory.EXEC;
+ }
+
// No category
return MimeTypeCategory.NONE;
}