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

Commit d7558cf8 authored by André Rivotti Casimiro's avatar André Rivotti Casimiro Committed by André Casimiro
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
parent ab08dcdf
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;
@@ -109,7 +110,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);
@@ -125,7 +126,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 =
@@ -145,7 +146,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;