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

Commit e28c3c88 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Stop listening root change events when the activity is destroyed.

BUG=26454244

Change-Id: I4be98f21843d6d501dd9c6fc343e905e107fc1c1
parent 32e05a45
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -176,6 +176,12 @@ public abstract class BaseActivity extends Activity {
        return true;
    }

    @Override
    protected void onDestroy() {
        mRoots.setOnCacheUpdateListener(null);
        super.onDestroy();
    }

    State buildDefaultState() {
        State state = new State();

@@ -518,7 +524,7 @@ public abstract class BaseActivity extends Activity {

        @Override
        protected void onPostExecute(DocumentInfo result) {
            if (result != null) {
            if (result != null && !isDestroyed()) {
                openContainerDocument(result);
            }
        }