Example usage for android.accounts AccountManager removeOnAccountsUpdatedListener

List of usage examples for android.accounts AccountManager removeOnAccountsUpdatedListener

Introduction

In this page you can find the example usage for android.accounts AccountManager removeOnAccountsUpdatedListener.

Prototype

public void removeOnAccountsUpdatedListener(OnAccountsUpdateListener listener) 

Source Link

Document

Removes an OnAccountsUpdateListener previously registered with #addOnAccountsUpdatedListener .

Usage

From source file:com.cerema.cloud2.files.services.FileDownloader.java

/**
 * Service clean up//w w  w. j a va 2s  . c o  m
 */
@Override
public void onDestroy() {
    Log_OC.v(TAG, "Destroying service");
    mBinder = null;
    mServiceHandler = null;
    mServiceLooper.quit();
    mServiceLooper = null;
    mNotificationManager = null;

    // remove AccountsUpdatedListener
    AccountManager am = AccountManager.get(getApplicationContext());
    am.removeOnAccountsUpdatedListener(this);

    super.onDestroy();
}