Braintree/src/main/java/com/braintreepayments/api/BraintreeFragment.java
public <T extends BraintreeListener> void removeListener(T listener) {
        if (listener instanceof ConfigurationListener) {
            mConfigurationListener = null;
        }

        if (listener instanceof BraintreeCancelListener) {
            mCancelListener = null;
        }

        if (listener instanceof PaymentMethodNoncesUpdatedListener) {
            mPaymentMethodNoncesUpdatedListener = null;
        }

        if (listener instanceof PaymentMethodNonceCreatedListener) {
            mPaymentMethodNonceCreatedListener = null;
        }

        if (listener instanceof PaymentMethodNonceDeletedListener) {
            mPaymentMethodNonceDeletedListener = null;
        }

        if (listener instanceof BraintreePaymentResultListener) {
            mBraintreePaymentResultListener = null;
        }

        if (listener instanceof BraintreeErrorListener) {
            mErrorListener = null;
        }

        if (listener instanceof UnionPayListener) {
            mUnionPayListener = null;
        }

        if (listener instanceof AmericanExpressListener) {
            mAmericanExpressListener = null;
        }
    }
public <T extends BraintreeListener> void removeListener(T listener) {
        if (listener instanceof ConfigurationListener) {
            mConfigurationListener = null;
        }

        if (listener instanceof BraintreeCancelListener) {
            mCancelListener = null;
        }

        if (listener instanceof PaymentMethodNoncesUpdatedListener) {
            mPaymentMethodNoncesUpdatedListener = null;
        }

        if (listener instanceof PaymentMethodNonceCreatedListener) {
            mPaymentMethodNonceCreatedListener = null;
        }

        if (listener instanceof PaymentMethodNonceDeletedListener) {
            mPaymentMethodNonceDeletedListener = null;
        }

        if (listener instanceof BraintreePaymentResultListener) {
            mBraintreePaymentResultListener = null;
        }

        if (listener instanceof BraintreeErrorListener) {
            mErrorListener = null;
        }

        if (listener instanceof UnionPayListener) {
            mUnionPayListener = null;
        }

        if (listener instanceof AmericanExpressListener) {
            mAmericanExpressListener = null;
        }
    }
public < T extends BraintreeListener > void removeListener ( T listener ) { if ( listener instanceof ConfigurationListener ) { mConfigurationListener = null ; } if ( listener instanceof BraintreeCancelListener ) { mCancelListener = null ; } if ( listener instanceof PaymentMethodNoncesUpdatedListener ) { mPaymentMethodNoncesUpdatedListener = null ; } if ( listener instanceof PaymentMethodNonceCreatedListener ) { mPaymentMethodNonceCreatedListener = null ; } if ( listener instanceof PaymentMethodNonceDeletedListener ) { mPaymentMethodNonceDeletedListener = null ; } if ( listener instanceof BraintreePaymentResultListener ) { mBraintreePaymentResultListener = null ; } if ( listener instanceof BraintreeErrorListener ) { mErrorListener = null ; } if ( listener instanceof UnionPayListener ) { mUnionPayListener = null ; } if ( listener instanceof AmericanExpressListener ) { mAmericanExpressListener = null ; } }
Removes a previously added listener.

@param listener the listener to remove.
Removes a previously added listener .