Buggy code:
public class SyncAdapter extends AbstractThreadedSyncAdapter implements GlobalSessionCallback { private static final String LOG_TAG = "SyncAdapter" ; private final AccountManager mAccountManager ; private final Context mContext ; public SyncAdapter ( Context context , boolean autoInitialize ) { } private void handleException ( Exception e , SyncResult syncResult ) { } private AccountManagerFuture < Bundle > getAuthToken ( final Account account , AccountManagerCallback < Bundle > callback , Handler handler ) { } private void invalidateAuthToken ( Account account ) { } @ Override public void onSyncCanceled ( ) { } public Object syncMonitor = new Object ( ) ; private SyncResult syncResult ; @ Override public void onPerformSync ( final Account account , final Bundle extras , final String authority , final ContentProviderClient provider , final SyncResult syncResult ) { Log . i ( SyncAdapter . LOG_TAG , "Got<seq2seq4repair_space>onPerformSync:" ) ; Log . i ( SyncAdapter . LOG_TAG , ( "Account<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( account . name ) ) ) ; <START_BUG> Log . i ( "rnewman" , "XXX<seq2seq4repair_space>CLEARING<seq2seq4repair_space>AUTH<seq2seq4repair_space>TOKEN<seq2seq4repair_space>XXX" ) ; <END_BUG> invalidateAuthToken ( account ) ; final SyncAdapter self = this ; AccountManagerCallback < Bundle > callback = new AccountManagerCallback < Bundle > ( ) { @ Override public void run ( AccountManagerFuture < Bundle > future ) { Log . i ( SyncAdapter . LOG_TAG , "AccountManagerCallback<seq2seq4repair_space>invoked." ) ; try { Bundle bundle = future . getResult ( 60L , TimeUnit . SECONDS ) ; String username = bundle . getString ( OPTION_USERNAME ) ; String syncKey = bundle . getString ( OPTION_SYNCKEY ) ; String password = bundle . getString ( KEY_AUTHTOKEN ) ; if ( password == null ) { Log . e ( SyncAdapter . LOG_TAG , "No<seq2seq4repair_space>password:<seq2seq4repair_space>aborting<seq2seq4repair_space>sync." ) ; return ; } if ( syncKey == null ) { Log . e ( SyncAdapter . LOG_TAG , "No<seq2seq4repair_space>Sync<seq2seq4repair_space>Key:<seq2seq4repair_space>aborting<seq2seq4repair_space>sync." ) ; return ; } KeyBundle keyBundle = new KeyBundle ( username , syncKey ) ; self . performSync ( account , extras , authority , provider , syncResult , username , password , keyBundle ) ; } catch ( Exception e ) { self . handleException ( e , syncResult ) ; return ; } } } ; Handler handler = null ; getAuthToken ( account , callback , handler ) ; synchronized ( syncMonitor ) { try { Log . i ( SyncAdapter . LOG_TAG , "Waiting<seq2seq4repair_space>on<seq2seq4repair_space>sync<seq2seq4repair_space>monitor." ) ; syncMonitor . wait ( ) ; } catch ( InterruptedException e ) { Log . i ( SyncAdapter . LOG_TAG , "Waiting<seq2seq4repair_space>on<seq2seq4repair_space>sync<seq2seq4repair_space>monitor<seq2seq4repair_space>interrupted." , e ) ; } } } protected void performSync ( Account account , Bundle extras , String authority , ContentProviderClient provider , SyncResult syncResult , String username , String password , KeyBundle keyBundle ) throws UnsupportedEncodingException , IllegalArgumentException , NoSuchAlgorithmException , AlreadySyncingException , SyncConfigurationException { } private void notifyMonitor ( ) { } @ Override public void handleError ( GlobalSession globalSession , Exception ex ) { } private void updateStats ( GlobalSession globalSession , Exception ex ) { } @ Override public void handleSuccess ( GlobalSession globalSession ) { } @ Override public void handleStageCompleted ( Stage currentState , GlobalSession globalSession ) { } }

Fix:
Log . i ( SyncAdapter . LOG_TAG , "XXX<seq2seq4repair_space>CLEARING<seq2seq4repair_space>AUTH<seq2seq4repair_space>TOKEN<seq2seq4repair_space>XXX" ) ;