From 26ef2c343609dafd20a0f2569736d089b27284a7 Mon Sep 17 00:00:00 2001 From: Jeevaka Badrappan Date: Fri, 1 Jun 2012 10:57:31 +0300 Subject: [PATCH] Settings: Fix crash seen when setting the radio band When the user presses back before the set radio band result dialog is shown, crash is seen as the activity associated with this is already finishing. Check the activity status before displaying the set radio band result alert dialog. Change-Id: I34104773f5cce0be6d0021823b2889aad0fdb945 Author: Jeevaka Badrappan Signed-off-by: Xiaokang Qin Signed-off-by: Bruce Beare Signed-off-by: Jack Ren Author-tracking-BZ: 39317 --- src/com/android/settings/BandMode.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/BandMode.java b/src/com/android/settings/BandMode.java index 4c7663ede70..0a0f77fdb20 100644 --- a/src/com/android/settings/BandMode.java +++ b/src/com/android/settings/BandMode.java @@ -207,7 +207,9 @@ public class BandMode extends Activity { Window.FEATURE_INDETERMINATE_PROGRESS, Window.PROGRESS_VISIBILITY_OFF); - displayBandSelectionResult(ar.exception); + if (!isFinishing()) { + displayBandSelectionResult(ar.exception); + } break; } }