Java Code Examples for org.chromium.chrome.browser.profiles.ProfileDownloader#removeObserver()

The following examples show how to use org.chromium.chrome.browser.profiles.ProfileDownloader#removeObserver() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AccountManagementFragment.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public void onPause() {
    super.onPause();
    SigninManager.get(getActivity()).removeSignInStateObserver(this);
    ProfileDownloader.removeObserver(this);
    ProfileSyncService syncService = ProfileSyncService.get();
    if (syncService != null) {
        syncService.removeSyncStateChangedListener(this);
    }
}
 
Example 2
Source File: SignInPreference.java    From delion with Apache License 2.0 5 votes vote down vote up
/**
 * Stops listening for updates to the sign-in and sync state. Every call to registerForUpdates()
 * must be matched with a call to this method.
 */
public void unregisterForUpdates() {
    SigninManager manager = SigninManager.get(getContext());
    manager.removeSignInAllowedObserver(this);
    ProfileDownloader.removeObserver(this);
    AndroidSyncSettings.unregisterObserver(getContext(), this);
    ProfileSyncService syncService = ProfileSyncService.get();
    if (syncService != null) {
        syncService.removeSyncStateChangedListener(this);
    }
}
 
Example 3
Source File: AccountManagementFragment.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public void onPause() {
    super.onPause();
    SigninManager.get(getActivity()).removeSignInStateObserver(this);
    ProfileDownloader.removeObserver(this);
    ProfileSyncService syncService = ProfileSyncService.get();
    if (syncService != null) {
        syncService.removeSyncStateChangedListener(this);
    }
}
 
Example 4
Source File: SignInPreference.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Stops listening for updates to the sign-in and sync state. Every call to registerForUpdates()
 * must be matched with a call to this method.
 */
public void unregisterForUpdates() {
    SigninManager manager = SigninManager.get(getContext());
    manager.removeSignInAllowedObserver(this);
    ProfileDownloader.removeObserver(this);
    AndroidSyncSettings.unregisterObserver(getContext(), this);
    ProfileSyncService syncService = ProfileSyncService.get();
    if (syncService != null) {
        syncService.removeSyncStateChangedListener(this);
    }
}
 
Example 5
Source File: AccountManagementFragment.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void onPause() {
    super.onPause();
    SigninManager.get(getActivity()).removeSignInStateObserver(this);
    ProfileDownloader.removeObserver(this);
    ProfileSyncService syncService = ProfileSyncService.get();
    if (syncService != null) {
        syncService.removeSyncStateChangedListener(this);
    }
}
 
Example 6
Source File: SignInPreference.java    From 365browser with Apache License 2.0 5 votes vote down vote up
/**
 * Stops listening for updates to the sign-in and sync state. Every call to registerForUpdates()
 * must be matched with a call to this method.
 */
public void unregisterForUpdates() {
    SigninManager manager = SigninManager.get(getContext());
    manager.removeSignInAllowedObserver(this);
    ProfileDownloader.removeObserver(this);
    AndroidSyncSettings.unregisterObserver(getContext(), this);
    ProfileSyncService syncService = ProfileSyncService.get();
    if (syncService != null) {
        syncService.removeSyncStateChangedListener(this);
    }
}
 
Example 7
Source File: ProfileDataCache.java    From delion with Apache License 2.0 4 votes vote down vote up
public void destroy() {
    ProfileDownloader.removeObserver(this);
    mObserver = null;
}
 
Example 8
Source File: ProfileDataCache.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
public void destroy() {
    ProfileDownloader.removeObserver(this);
    mObserver = null;
}
 
Example 9
Source File: ProfileDataCache.java    From 365browser with Apache License 2.0 4 votes vote down vote up
public void destroy() {
    ProfileDownloader.removeObserver(this);
    mObservers.clear();
}