Code example for Activity

Methods: finish

0
                .getString(string.authenticator_conflict_message));
        dialog.setOnCancelListener(new OnCancelListener() {
 
            @Override 
            public void onCancel(DialogInterface dialog) {
                activity.finish();
            } 
        }); 
        dialog.setButton(BUTTON_POSITIVE,
                activity.getString(android.R.string.ok), new OnClickListener() {
 
                    @Override 
                    public void onClick(DialogInterface dialog, int which) {
                        activity.finish();
                    } 
                }); 
        dialog.show();
    } 
 
    /** 
     * Is the given {@link Exception} due to a 401 Unauthorized API response?