code: private void updateCustomerAndSetDefaultSourceIfNecessary(@NonNull Customer customer) {
          // An inverted early return - we don't need to talk to the CustomerSession if there is
          // already a default source selected or we have no or more than one customer sources in our
          // list.
          if (!TextUtils.isEmpty(customer.getDefaultSource()) || customer.getSources().size() != 1) {
              updateAdapterWithCustomer(customer);
              return;
          }
  
          // We only activate this if there is a single source in the list
          final CustomerSource customerSource = customer.getSources().get(0);
          if (customerSource == null || customerSource.getId() == null) {
              // If the source ID is null for the only source we have, then there is nothing
              // we can do but update the display. This should not happen. It is only possible
              // for a CustomerSource to have null ID because a Card is a customer source, and
              // before those are sent to Stripe, they haven't yet been assigned an ID.
              updateAdapterWithCustomer(customer);
              return;
          }
  
          mCustomerSession.setCustomerDefaultSource(customerSource.getId(),
                  customerSource.getSourceType(),
                  new PostUpdateCustomerRetrievalListener(this));
      }
docs: Update our currently displayed customer data. If the customer only has one
  {@link CustomerSource} and does not have a
  @link Customer#getDefaultSource()} defaultSource}, then set that one source to be the
  default source before updating displayed source data.
  
  @param customer the new {@link Customer} object whose sources should be displayed