summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaman Tenneti <rtenneti@google.com>2020-07-07 15:31:29 -0700
committerdoc HD <doc.divxm@gmail.com>2020-08-09 11:31:42 +0300
commit34409991ace452ca882881f8195ea3aa66dbfa02 (patch)
treec84418ac87ee4510e4acba5d921d85dcada08a1f
parent997ef7053077e6db77713b35e6b364ce1b60c948 (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.java5
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 a0aec9953..af923eaa5 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();
+ }
}
}