diff options
author | kai.cao <kai.cao@ck-telecom.com> | 2015-08-07 09:35:34 +0800 |
---|---|---|
committer | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2015-08-13 13:14:19 -0700 |
commit | ceef4c4070accf1bef20a57943571d9efa159a98 (patch) | |
tree | 3708cc13cc012fd3d1eaa68bd04765740fa32882 | |
parent | 2444ef323fc5920588f45c96a36533a969ab6be2 (diff) | |
download | android_packages_apps_CMFileManager-ceef4c4070accf1bef20a57943571d9efa159a98.tar.gz android_packages_apps_CMFileManager-ceef4c4070accf1bef20a57943571d9efa159a98.tar.bz2 android_packages_apps_CMFileManager-ceef4c4070accf1bef20a57943571d9efa159a98.zip |
Fix FileSystemInfo's ImageView shows incorrect picture in BreadcrumbView .
When we get MountPoint Information in FilesystemAsyncTask,
It will return null.So,the FileSystemInfo's ImageView
will setTag null,and then it will set picture filesystem_warning_drawable.
Change-Id: Ia624312468935cc86956665a3da4824c19728afc
-rwxr-xr-x[-rw-r--r--] | src/com/cyanogenmod/filemanager/util/MountPointHelper.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/cyanogenmod/filemanager/util/MountPointHelper.java b/src/com/cyanogenmod/filemanager/util/MountPointHelper.java index d1141be3..65c91819 100644..100755 --- a/src/com/cyanogenmod/filemanager/util/MountPointHelper.java +++ b/src/com/cyanogenmod/filemanager/util/MountPointHelper.java @@ -91,12 +91,10 @@ public final class MountPointHelper { public static boolean refreshMountPoints(Console console) { synchronized(sMountPoints) { try { - if (FileManagerApplication.hasShellCommands()) { - sMountPoints.clear(); - sMountPoints.addAll(CommandHelper.getMountPoints(null, null)); - sLastCachedTime = System.currentTimeMillis(); - return true; - } + sMountPoints.clear(); + sMountPoints.addAll(CommandHelper.getMountPoints(null, null)); + sLastCachedTime = System.currentTimeMillis(); + return true; } catch (Exception e) { Log.e(TAG, "Failed to update the mount point information", e); //$NON-NLS-1$ } @@ -119,7 +117,7 @@ public final class MountPointHelper { // Refresh mount points after some time (5 minutes should be enough) long now = System.currentTimeMillis(); synchronized(sMountPoints) { - if (sMountPoints == null || (now - sLastCachedTime) > MAX_CACHED_TIME) { + if (sMountPoints == null || (now - sLastCachedTime) > MAX_CACHED_TIME || FileManagerApplication.hasShellCommands()) { //Retrieve the mount points refreshMountPoints(console); } |