Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ceef4c40 authored by kai.cao's avatar kai.cao Committed by Abhisek Devkota
Browse files

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
parent 2444ef32
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -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;
                }
            } 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);
                }