Merge "Fix ANR issue for SimSlotChangeReceiver" into sc-dev am: 1125a7600f

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13459631

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I349139dbda57455e27a74a9dea2457d3981dc588
This commit is contained in:
Jiashen Wang
2021-02-03 00:47:12 +00:00
committed by Automerger Merge Worker

View File

@@ -52,10 +52,9 @@ public class SimSlotChangeReceiver extends BroadcastReceiver {
ThreadUtils.postOnBackgroundThread(
() -> {
synchronized (mLock) {
if (!shouldHandleSlotChange(context)) {
return;
if (shouldHandleSlotChange(context)) {
mSlotChangeHandler.onSlotsStatusChange(context.getApplicationContext());
}
mSlotChangeHandler.onSlotsStatusChange(context.getApplicationContext());
}
ThreadUtils.postOnMainThread(pendingResult::finish);
});