Black screen appears after tapping the back key

Black screen is displayed after tapping the back key when editing SIM name.

To reproduce:
Settings->Dual SIM->tap the SIM name->tap back key.

[Expected Result]
Screen should be displayed normally.

[Actual Result]:
Black screen is displayed.

The cause is the dialog is not finished when it's dismissed.

Bug: 32934740
Change-Id: Ieddb65247cfe7b9434c8cfa7aeec2396616d9b81
This commit is contained in:
xiaocheng.x.wang
2016-01-25 10:55:13 +08:00
committed by Zoran Jovanovic
parent 917b7b863c
commit 2cea7f814b

View File

@@ -167,7 +167,6 @@ public class SimPreferenceDialog extends Activity {
mSubInfoRecord.setIconTint(tint); mSubInfoRecord.setIconTint(tint);
mSubscriptionManager.setIconTint(tint, subscriptionId); mSubscriptionManager.setIconTint(tint, subscriptionId);
dialog.dismiss(); dialog.dismiss();
finish();
} }
}); });
@@ -175,10 +174,16 @@ public class SimPreferenceDialog extends Activity {
@Override @Override
public void onClick(DialogInterface dialog, int whichButton) { public void onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss(); dialog.dismiss();
finish();
} }
}); });
mBuilder.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInListener) {
finish();
}
});
mBuilder.create().show(); mBuilder.create().show();
} }