Java Code Examples for org.chromium.net.NetworkChangeNotifier#removeConnectionTypeObserver()
The following examples show how to use
org.chromium.net.NetworkChangeNotifier#removeConnectionTypeObserver() .
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: UmaSessionStats.java From delion with Apache License 2.0 | 5 votes |
/** * Logs the current session. */ public void logAndEndSession() { if (mTabModelSelector != null) { mContext.unregisterComponentCallbacks(mComponentCallbacks); mTabModelSelectorTabObserver.destroy(); mTabModelSelector = null; } nativeUmaEndSession(sNativeUmaSessionStats); NetworkChangeNotifier.removeConnectionTypeObserver(this); ContextUtils.getAppSharedPreferences() .edit() .putLong(LAST_USED_TIME_PREF, System.currentTimeMillis()) .apply(); }
Example 2
Source File: MinidumpUploadRetry.java From delion with Apache License 2.0 | 5 votes |
@SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD") @Override public void onConnectionTypeChanged(int connectionType) { // Look for "favorable" connections. Note that we never // know what the user's crash upload preference is until // the time when we are actually uploading. if (connectionType == ConnectionType.CONNECTION_NONE) { return; } MinidumpUploadService.tryUploadAllCrashDumps(mContext); NetworkChangeNotifier.removeConnectionTypeObserver(this); sSingleton = null; }
Example 3
Source File: MinidumpUploadRetry.java From AndroidChromium with Apache License 2.0 | 5 votes |
@SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD") @Override public void onConnectionTypeChanged(int connectionType) { // Look for "favorable" connections. Note that we never // know what the user's crash upload preference is until // the time when we are actually uploading. if (connectionType == ConnectionType.CONNECTION_NONE) { return; } MinidumpUploadService.tryUploadAllCrashDumps(mContext); NetworkChangeNotifier.removeConnectionTypeObserver(this); sSingleton = null; }
Example 4
Source File: ContextualSearchTabHelper.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onDestroyed(Tab tab) { if (mNativeHelper != 0) { nativeDestroy(mNativeHelper); mNativeHelper = 0; } if (mTemplateUrlObserver != null) { TemplateUrlService.getInstance().removeObserver(mTemplateUrlObserver); } if (NetworkChangeNotifier.isInitialized()) { NetworkChangeNotifier.removeConnectionTypeObserver(this); } removeContextualSearchHooks(mBaseContentViewCore); mBaseContentViewCore = null; }
Example 5
Source File: MinidumpUploadRetry.java From 365browser with Apache License 2.0 | 5 votes |
@SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD") @Override public void onConnectionTypeChanged(int connectionType) { // Early-out if not connected at all - to avoid checking the current network state. if (connectionType == ConnectionType.CONNECTION_NONE) { return; } if (!mPermissionManager.isNetworkAvailableForCrashUploads()) { return; } MinidumpUploadService.tryUploadAllCrashDumps(); NetworkChangeNotifier.removeConnectionTypeObserver(this); sSingleton = null; }
Example 6
Source File: OfflinePageTabObserver.java From delion with Apache License 2.0 | 4 votes |
@VisibleForTesting void stopObservingNetworkChanges() { NetworkChangeNotifier.removeConnectionTypeObserver(this); }
Example 7
Source File: OfflinePageTabObserver.java From AndroidChromium with Apache License 2.0 | 4 votes |
@VisibleForTesting void stopObservingNetworkChanges() { NetworkChangeNotifier.removeConnectionTypeObserver(this); }
Example 8
Source File: OfflinePageTabObserver.java From 365browser with Apache License 2.0 | 4 votes |
@VisibleForTesting void stopObservingNetworkChanges() { NetworkChangeNotifier.removeConnectionTypeObserver(this); }