@Test public void testActivityModeChanges() { reset(mockWifiMediator, mockCellMediator, mockBtMediator); when(mockActivityModeTracker.affectsBluetooth()).thenReturn(false); when(mockActivityModeTracker.affectsWifi()).thenReturn(false); when(mockActivityModeTracker.affectsCellular()).thenReturn(false); mController.onActivityModeChanged(true); verifyNoMoreInteractions(mockWifiMediator); verifyNoMoreInteractions(mockCellMediator); verifyNoMoreInteractions(mockBtMediator); }
@Override public void onActivityModeChanged(boolean enabled) { if (mActivityModeTracker.affectsBluetooth()) { mBtMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsWifi()) { mWifiMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsCellular()) { mCellMediator.updateActivityMode(enabled); } }
WearConnectivityController implements
        ActivityModeTracker.Listener,
        WearNetworkObserver.Listener,
        WearProxyNetworkAgent.Listener { @Override public void onActivityModeChanged(boolean enabled) { if (mActivityModeTracker.affectsBluetooth()) { mBtMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsWifi()) { mWifiMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsCellular()) { mCellMediator.updateActivityMode(enabled); } } }
WearConnectivityController implements
        ActivityModeTracker.Listener,
        WearNetworkObserver.Listener,
        WearProxyNetworkAgent.Listener { @Override public void onActivityModeChanged(boolean enabled) { if (mActivityModeTracker.affectsBluetooth()) { mBtMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsWifi()) { mWifiMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsCellular()) { mCellMediator.updateActivityMode(enabled); } } WearConnectivityController(
            Context context,
            AlarmManager alarmManager,
            WearBluetoothMediator btMediator,
            WearWifiMediator wifiMediator,
            WearCellularMediator cellMediator,
            WearProxyNetworkAgent proxyNetworkAgent,
            ActivityModeTracker activityModeTracker,
            PowerTracker powerTracker); }
WearConnectivityController implements
        ActivityModeTracker.Listener,
        WearNetworkObserver.Listener,
        WearProxyNetworkAgent.Listener { @Override public void onActivityModeChanged(boolean enabled) { if (mActivityModeTracker.affectsBluetooth()) { mBtMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsWifi()) { mWifiMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsCellular()) { mCellMediator.updateActivityMode(enabled); } } WearConnectivityController(
            Context context,
            AlarmManager alarmManager,
            WearBluetoothMediator btMediator,
            WearWifiMediator wifiMediator,
            WearCellularMediator cellMediator,
            WearProxyNetworkAgent proxyNetworkAgent,
            ActivityModeTracker activityModeTracker,
            PowerTracker powerTracker); void onBootCompleted(); @Override void onProxyConnectionChange(boolean proxyConnected); @Override void onUnmeteredRequestsChanged(int numUnmeteredRequests); @Override void onHighBandwidthRequestsChanged(int numHighBandwidthRequests); @Override void onWifiRequestsChanged(int numWifiRequests); @Override void onCellularRequestsChanged(int numCellularRequests); @Override void onActivityModeChanged(boolean enabled); void dump(IndentingPrintWriter ipw); }
WearConnectivityController implements
        ActivityModeTracker.Listener,
        WearNetworkObserver.Listener,
        WearProxyNetworkAgent.Listener { @Override public void onActivityModeChanged(boolean enabled) { if (mActivityModeTracker.affectsBluetooth()) { mBtMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsWifi()) { mWifiMediator.updateActivityMode(enabled); } if (mActivityModeTracker.affectsCellular()) { mCellMediator.updateActivityMode(enabled); } } WearConnectivityController(
            Context context,
            AlarmManager alarmManager,
            WearBluetoothMediator btMediator,
            WearWifiMediator wifiMediator,
            WearCellularMediator cellMediator,
            WearProxyNetworkAgent proxyNetworkAgent,
            ActivityModeTracker activityModeTracker,
            PowerTracker powerTracker); void onBootCompleted(); @Override void onProxyConnectionChange(boolean proxyConnected); @Override void onUnmeteredRequestsChanged(int numUnmeteredRequests); @Override void onHighBandwidthRequestsChanged(int numHighBandwidthRequests); @Override void onWifiRequestsChanged(int numWifiRequests); @Override void onCellularRequestsChanged(int numCellularRequests); @Override void onActivityModeChanged(boolean enabled); void dump(IndentingPrintWriter ipw);  }