1 package com.android.nfc.cardemulation; 2 3 import android.content.DialogInterface; 4 import android.content.Intent; 5 import android.os.Bundle; 6 import android.provider.Settings; 7 import com.android.internal.R; 8 9 import com.android.internal.app.AlertActivity; 10 import com.android.internal.app.AlertController; 11 12 public class DefaultRemovedActivity extends AlertActivity implements 13 DialogInterface.OnClickListener { 14 @Override 15 protected void onCreate(Bundle savedInstanceState) { 16 setTheme(R.style.Theme_DeviceDefault_Light_Dialog_Alert); 17 super.onCreate(savedInstanceState); 18 19 AlertController.AlertParams ap = mAlertParams; 20 21 ap.mMessage = getString(com.android.nfc.R.string.default_pay_app_removed); 22 ap.mNegativeButtonText = getString(R.string.no); 23 ap.mPositiveButtonText = getString(R.string.yes); 24 ap.mPositiveButtonListener = this; 25 setupAlert(); 26 } 27 28 @Override 29 public void onClick(DialogInterface dialog, int which) { 30 // Launch into Settings 31 Intent intent = new Intent(Settings.ACTION_NFC_PAYMENT_SETTINGS); 32 startActivity(intent); 33 } 34 }