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

Commit 11b4721b authored by Raman Tenneti's avatar Raman Tenneti Committed by Michael Bestas
Browse files

AOSP/DeskClock - Call executePendingTransactions only if mFragmentManager is...

AOSP/DeskClock - Call executePendingTransactions only if mFragmentManager is not destroyed. Fixes the crash bug. Code matches internal code.

BUG: 153590150

Test: manual - Tested the DeskClock UI manually and tested the timer.

$ make -j 40

... 6117353 Jul  7 15:27 out/target/product/bonito/product/app/DeskClock/DeskClock.apk

$ adb install -r -d -t out/target/product/bonito/product/app/DeskClock/DeskClock.apk

Change-Id: I582013ebffef2c8d1ec16255ea531d874d14a968
parent cd7108e7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -137,9 +137,12 @@ class TimerPagerAdapter extends PagerAdapter implements TimerListener {
        if (mCurrentTransaction != null) {
            mCurrentTransaction.commitAllowingStateLoss();
            mCurrentTransaction = null;

            if (!mFragmentManager.isDestroyed()) {
                mFragmentManager.executePendingTransactions();
            }
        }
    }

    @Override
    public void timerAdded(Timer timer) {