Merge "Fix force close for updating UI after activity destroyed." into main am: b083196e76 am: bc05a87483

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

Change-Id: I005b4589f5077a40a47bd58bb2d05c6c358b48fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-10-21 04:55:18 +00:00
committed by Automerger Merge Worker

View File

@@ -368,6 +368,11 @@ public class NetworkSelectSettings extends DashboardFragment {
@VisibleForTesting @VisibleForTesting
protected void scanResultHandler(NetworkScanRepository.NetworkScanResult results) { protected void scanResultHandler(NetworkScanRepository.NetworkScanResult results) {
if (isFinishingOrDestroyed()) {
Log.d(TAG, "scanResultHandler: activity isFinishingOrDestroyed, directly return");
return;
}
mCellInfoList = filterOutSatellitePlmn(results.getCellInfos()); mCellInfoList = filterOutSatellitePlmn(results.getCellInfos());
Log.d(TAG, "CellInfoList: " + CellInfoUtil.cellInfoListToString(mCellInfoList)); Log.d(TAG, "CellInfoList: " + CellInfoUtil.cellInfoListToString(mCellInfoList));
updateAllPreferenceCategory(); updateAllPreferenceCategory();