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

Commit 8b1fef1f authored by André Rivotti Casimiro's avatar André Rivotti Casimiro Committed by Nir Bruderman
Browse files

make sure MountPointInfo and DiskUsageInfo runs in the UI Thread.

At some point the original View was dettached and both mMountPointInfo and mDiskUsageInfo handler's were null which means the Ruannable wasn't executed.

Change-Id: I883af543b19bc644e451109675c241a8c84e5d64
(cherry picked from commit d7558cf8)
parent 6e039982
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.os.AsyncTask;
import android.util.Log;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.app.Activity;

import com.cyanogenmod.filemanager.model.DiskUsage;
import com.cyanogenmod.filemanager.model.MountPoint;
@@ -131,7 +132,7 @@ public class FilesystemAsyncTask extends AsyncTask<String, Integer, Boolean> {
            if (isCancelled()) {
                return Boolean.TRUE;
            }
            this.mMountPointInfo.post(new Runnable() {
            ((Activity)mContext).runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    Theme theme = ThemeManager.getCurrentTheme(FilesystemAsyncTask.this.mContext);
@@ -149,7 +150,7 @@ public class FilesystemAsyncTask extends AsyncTask<String, Integer, Boolean> {
            if (isCancelled()) {
                return Boolean.TRUE;
            }
            this.mMountPointInfo.post(new Runnable() {
            ((Activity)mContext).runOnUiThread(new Runnable() {
                @Override
                public void run() {
                   String resource =
@@ -173,7 +174,7 @@ public class FilesystemAsyncTask extends AsyncTask<String, Integer, Boolean> {
            if (isCancelled()) {
                return Boolean.TRUE;
            }
            this.mDiskUsageInfo.post(new Runnable() {
            ((Activity)mContext).runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    DiskUsage du = null;