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

Commit 0eb0a64d authored by Jorge Ruesga's avatar Jorge Ruesga Committed by Gerrit Code Review
Browse files

Merge "CMFM: Properly handle async task exception" into cm-10.1

parents a0d509cd 4752556b
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -833,24 +833,28 @@ public class NavigationView extends RelativeLayout implements
                                ExceptionUtil.attachAsyncTask(
                                    ex,
                                    new AsyncTask<Object, Integer, Boolean>() {
                                        private List<FileSystemObject> mTaskFiles = null;
                                        @Override
                                        @SuppressWarnings("unchecked")
                                        @SuppressWarnings({
                                                "unchecked", "unqualified-field-access"
                                        })
                                        protected Boolean doInBackground(Object... taskParams) {
                                            final List<FileSystemObject> files =
                                                    (List<FileSystemObject>)taskParams[0];
                                            NavigationView.this.mAdapterView.post(
                                                new Runnable() {
                                            mTaskFiles = (List<FileSystemObject>)taskParams[0];
                                            return Boolean.TRUE;
                                        }

                                        @Override
                                                    public void run() {
                                        @SuppressWarnings("unqualified-field-access")
                                        protected void onPostExecute(Boolean result) {
                                            if (!result.booleanValue()){
                                                return;
                                            }
                                            onPostExecuteTask(
                                                                files, addToHistory,
                                                    mTaskFiles, addToHistory,
                                                    isNewHistory, hasChanged,
                                                    searchInfo, fNewDir, scrollTo);
                                        }
                                    });
                                            return Boolean.TRUE;
                                        }
                                    });
                                final OnRelaunchCommandResult exListener =
                                        new OnRelaunchCommandResult() {
                                    @Override