Searched refs:mConnectivityListenerOptional (Results 1 – 2 of 2) sorted by relevance
127 Optional<ConnectivityListener> mConnectivityListenerOptional; field in MainFragment177 mConnectivityListenerOptional = Optional.empty(); in onCreate()179 mConnectivityListenerOptional = Optional.of(new ConnectivityListener( in onCreate()276 if (!mConnectivityListenerOptional.isPresent()) { in updateConnectivity()284 if (mConnectivityListenerOptional.get().isCellConnected()) { in updateConnectivity()285 final int signal = mConnectivityListenerOptional.get().getCellSignalStrength(); in updateConnectivity()304 } else if (mConnectivityListenerOptional.get().isEthernetConnected()) { in updateConnectivity()307 } else if (mConnectivityListenerOptional.get().isWifiEnabledOrEnabling()) { in updateConnectivity()308 if (mConnectivityListenerOptional.get().isWifiConnected()) { in updateConnectivity()309 final int signal = mConnectivityListenerOptional.get().getWifiSignalStrength(5); in updateConnectivity()[all …]
74 mMainFragment.mConnectivityListenerOptional = Optional.of(listener); in testUpdateConnectivity_NoNetwork()91 mMainFragment.mConnectivityListenerOptional = Optional.of(listener); in testUpdateConnectivity_hasEthernet()108 mMainFragment.mConnectivityListenerOptional = Optional.of(listener); in testUpdateConnectivity_hasEthernetConnected()125 mMainFragment.mConnectivityListenerOptional = Optional.of(listener); in testUpdateConnectivity_wifiSignal()174 mMainFragment.mConnectivityListenerOptional = Optional.of(listener); in testUpdateConnectivity_notConnected()191 mMainFragment.mConnectivityListenerOptional = Optional.of(listener); in testUpdateConnectivity_cellSignal()333 mMainFragment.mConnectivityListenerOptional = Optional.empty(); in updateConnectivity_givenConnectivityListenerNull_thenNetworkPreferenceIsNotUpdated()