public NetworkChangeNotifierAutoDetect(Observer observer, Context context) {
   mObserver = observer;
   mContext = context.getApplicationContext();
   mConnectivityManagerDelegate = new ConnectivityManagerDelegate(context);
   mConnectionType = getCurrentConnectionType();
   ActivityStatus.registerStateListener(this);
 }
Exemplo n.º 2
0
 /** Creates an instance using {@code context} to send intents. */
 @VisibleForTesting
 InvalidationController(Context context) {
   mContext = Preconditions.checkNotNull(context.getApplicationContext());
   ActivityStatus.registerStateListener(this);
 }