title: How to Clear GoogleApiClient Default Account and Credentials
body: <p>I connect a GoogleApiClient for use with Google Drive.  I build the client like this:</p>
  
  <pre><code>        GoogleApiClient.Builder(this)
                  .addApi(Drive.API)
                  .addScope(Drive.SCOPE_FILE)
                  .addConnectionCallbacks(this)
                  .addOnConnectionFailedListener(this)
                  .build();
  </code></pre>
  
  <p>My experience has been that the <strong>first</strong> time a connection request is made for this client, the <a href="https://developers.google.com/android/reference/com/google/android/gms/common/AccountPicker" rel="noreferrer">AccountPicker</a> dialog is presented and the consent screen for Google Drive.  If the user selects an account, consents, and the connection completes successfully, the AccountManager or some related function saves the selected account as the default account, and the credentials (OAuth tokens?) for the Drive scope. On subsequent connection requests, as a convenience to the user, the saved values are used and the user does not see the UI for account selection or consent.</p>
  
  <p>For development testing, I would like to be able to clear the default account and saved credentials so that I can exercise my connection failure resolution processing.  I have not found a way to do this.  I tried this without success:</p>
  
  <pre><code>String driveScope = "https://www.googleapis.com/auth/drive.file";
  String tokenType = "oauth2:" + driveScope;
  
  AccountManager.get(this).invalidateAuthToken(
      GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE, tokenType);
  </code></pre>