Dismiss dialogs properly on closing.

Also make the invisible activity truly invisible (was
showing a blue line behind the dialog).

Bug: 5572140
Change-Id: I67b31f0682f189c7075011e0dd0660b0fbc543d9
This commit is contained in:
Amith Yamasani
2011-11-11 13:25:07 -08:00
parent 4b94e07385
commit c101d2d3ba
2 changed files with 6 additions and 5 deletions

View File

@@ -494,7 +494,7 @@
<activity android:name="SettingsLicenseActivity"
android:label="@string/settings_license_activity_title"
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
android:theme="@android:style/Theme.Holo.Panel"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.settings.LICENSE" />

View File

@@ -173,10 +173,13 @@ public class SettingsLicenseActivity extends Activity {
@Override
protected void onDestroy() {
super.onDestroy();
if (mTextDlg != null) {
if (mTextDlg != null && mTextDlg.isShowing()) {
mTextDlg.dismiss();
}
if (mSpinnerDlg != null && mSpinnerDlg.isShowing()) {
mSpinnerDlg.dismiss();
}
super.onDestroy();
}
private void showPageOfText(String text) {
@@ -200,9 +203,7 @@ public class SettingsLicenseActivity extends Activity {
@Override
public void onPageFinished(WebView view, String url) {
mSpinnerDlg.dismiss();
mSpinnerDlg = null;
mTextDlg.show();
mTextDlg = null;
}
});