Nfc Payment Preference check if the dialog is non-null before dismissing
Test: monkey test Bug: 64758793 Change-Id: I3905096889b2dc6ef468afc76e9767f63b4163ad
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.nfc;
|
|||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.support.v7.preference.PreferenceViewHolder;
|
import android.support.v7.preference.PreferenceViewHolder;
|
||||||
@@ -209,7 +210,9 @@ public class NfcPaymentPreference extends CustomDialogPreference implements
|
|||||||
if (!appInfo.isDefault) {
|
if (!appInfo.isDefault) {
|
||||||
mPaymentBackend.setDefaultPaymentApp(appInfo.componentName);
|
mPaymentBackend.setDefaultPaymentApp(appInfo.componentName);
|
||||||
}
|
}
|
||||||
getDialog().dismiss();
|
Dialog dialog = getDialog();
|
||||||
|
if (dialog != null)
|
||||||
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user