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

Commit 5c4f2bb3 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Fix delegate.onStop/onStart not always being called

Fix: 354656722
Test: tested manually by adding logs to onStop/onStart in a delegate
Flag: EXEMPT trivial change
Change-Id: Icd9f44819e8b2301b1092d5682388b4e8aafa695
parent 78297ef2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -341,6 +341,7 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
        mSysUiState.setFlag(QuickStepContract.SYSUI_STATE_DIALOG_SHOWING, true)
                .commitUpdate(mContext.getDisplayId());

        mDelegate.onStart(this);
        start();
    }

@@ -349,7 +350,8 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
     * should override this method instead.
     */
    protected void start() {
        mDelegate.onStart(this);
        // IMPORTANT: Please do not add anything here, since subclasses are likely to override this.
        // Instead, add things to onStop above.
    }

    @Override
@@ -365,6 +367,7 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
        mSysUiState.setFlag(QuickStepContract.SYSUI_STATE_DIALOG_SHOWING, false)
                .commitUpdate(mContext.getDisplayId());

        mDelegate.onStop(this);
        stop();
    }

@@ -373,7 +376,8 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
     * should override this method instead.
     */
    protected void stop() {
        mDelegate.onStop(this);
        // IMPORTANT: Please do not add anything here, since subclasses are likely to override this.
        // Instead, add things to onStop above.
    }

    @Override