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
......@@ -137,7 +137,10 @@ class TimerPagerAdapter extends PagerAdapter implements TimerListener {
if (mCurrentTransaction != null) {
mCurrentTransaction.commitAllowingStateLoss();
mCurrentTransaction = null;
mFragmentManager.executePendingTransactions();
if (!mFragmentManager.isDestroyed()) {
mFragmentManager.executePendingTransactions();
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment