diff options
author | Raman Tenneti <rtenneti@google.com> | 2020-07-07 15:31:29 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-08 19:39:11 +0200 |
commit | dcefd879853aeaf2b50ec1b4292195d576e9ccda (patch) | |
tree | 4c55470b8085f1cecfeb0b7d9ba7c7d023d61759 | |
parent | 8376293eef4f17a0f5f9bb8de999d0d5880bf9a4 (diff) |
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
-rw-r--r-- | src/com/android/deskclock/timer/TimerPagerAdapter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/deskclock/timer/TimerPagerAdapter.java b/src/com/android/deskclock/timer/TimerPagerAdapter.java index 5255f16b6..224d71d16 100644 --- a/src/com/android/deskclock/timer/TimerPagerAdapter.java +++ b/src/com/android/deskclock/timer/TimerPagerAdapter.java @@ -137,7 +137,10 @@ class TimerPagerAdapter extends PagerAdapter implements TimerListener { if (mCurrentTransaction != null) { mCurrentTransaction.commitAllowingStateLoss(); mCurrentTransaction = null; - mFragmentManager.executePendingTransactions(); + + if (!mFragmentManager.isDestroyed()) { + mFragmentManager.executePendingTransactions(); + } } } |