Пример #1
0
 private void startOrStopMarketRatePolling() {
   if (address != null && !pocket.isType(address)) {
     String pair = ShapeShift.getPair(pocket.getCoinType(), (CoinType) address.getParameters());
     if (timer == null) {
       startPolling(pair);
     } else {
       pollTask.updatePair(pair);
     }
   } else if (timer != null) {
     stopPolling();
   }
 }
Пример #2
0
  @Override
  public void onPause() {
    if (pocket != null) pocket.removeEventListener(transactionChangeListener);
    transactionChangeListener.removeCallbacks();

    resolver.unregisterContentObserver(addressBookObserver);

    amountCalculatorLink.setListener(null);

    stopPolling();

    super.onPause();
  }