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

Commit 38afb8fc authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Check isDestroyed after finishing async HandleRootsChangedTask.

HandleRootsChangedTask will be finished after the Activity is destroyed,
though we no longer to be able to change the directory at that time.

BUG=26454277

Change-Id: Ia414134c80d900ef2e6c382fdd9209a154d940af
parent 32e05a45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -630,7 +630,7 @@ public abstract class BaseActivity extends Activity {

        @Override
        protected void onPostExecute(RootInfo homeRoot) {
            if (homeRoot != null && mHome != null) {
            if (homeRoot != null && mHome != null && !isDestroyed()) {
                // Clear entire backstack and start in new root
                mState.onRootChanged(homeRoot);
                mSearchManager.update(homeRoot);