Java Code Examples for org.chromium.chrome.browser.sync.ProfileSyncService#removeSyncStateChangedListener()
The following examples show how to use
org.chromium.chrome.browser.sync.ProfileSyncService#removeSyncStateChangedListener() .
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: ChromeActivity.java From delion with Apache License 2.0 | 6 votes |
@Override public void onStopWithNative() { Tab tab = getActivityTab(); if (tab != null && !hasWindowFocus()) tab.onActivityHidden(); if (mAppMenuHandler != null) mAppMenuHandler.hideAppMenu(); if (mGSAServiceClient != null) { mGSAServiceClient.disconnect(); mGSAServiceClient = null; if (mSyncStateChangedListener != null) { ProfileSyncService syncService = ProfileSyncService.get(); if (syncService != null) { syncService.removeSyncStateChangedListener(mSyncStateChangedListener); } mSyncStateChangedListener = null; } } super.onStopWithNative(); }
Example 2
Source File: ChromeActivity.java From AndroidChromium with Apache License 2.0 | 6 votes |
@Override public void onStopWithNative() { Tab tab = getActivityTab(); if (tab != null && !hasWindowFocus()) tab.onActivityHidden(); if (mAppMenuHandler != null) mAppMenuHandler.hideAppMenu(); if (GSAState.getInstance(this).isGsaAvailable()) { GSAAccountChangeListener.getInstance().disconnect(); if (mSyncStateChangedListener != null) { ProfileSyncService syncService = ProfileSyncService.get(); if (syncService != null) { syncService.removeSyncStateChangedListener(mSyncStateChangedListener); } mSyncStateChangedListener = null; } } super.onStopWithNative(); }
Example 3
Source File: ChromeActivity.java From 365browser with Apache License 2.0 | 6 votes |
@Override public void onStopWithNative() { Tab tab = getActivityTab(); if (tab != null && !hasWindowFocus()) tab.onActivityHidden(); if (mAppMenuHandler != null) mAppMenuHandler.hideAppMenu(); if (GSAState.getInstance(this).isGsaAvailable()) { GSAAccountChangeListener.getInstance().disconnect(); if (mSyncStateChangedListener != null) { ProfileSyncService syncService = ProfileSyncService.get(); if (syncService != null) { syncService.removeSyncStateChangedListener(mSyncStateChangedListener); } mSyncStateChangedListener = null; } } super.onStopWithNative(); }
Example 4
Source File: AccountManagementFragment.java From delion with Apache License 2.0 | 5 votes |
@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 5
Source File: SignInPreference.java From delion with Apache License 2.0 | 5 votes |
/** * 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 6
Source File: AccountManagementFragment.java From AndroidChromium with Apache License 2.0 | 5 votes |
@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 7
Source File: SignInPreference.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * 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 8
Source File: AccountManagementFragment.java From 365browser with Apache License 2.0 | 5 votes |
@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 9
Source File: SignInPreference.java From 365browser with Apache License 2.0 | 5 votes |
/** * 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); } }