Esempio n. 1
0
  private synchronized void resetClient() {
    client = null;

    try {
      service.removeAccount(listener);
      service.registerAccount(
          prefs.getString("user", ""), prefs.getString("password", ""), listener);
    } catch (Throwable t) {
      Log.e("Patchy", "Exception in resetClient()", t);
      goBlooey(t);
    }
  }
Esempio n. 2
0
  @Override
  public void onDestroy() {
    super.onDestroy();

    locMgr.removeUpdates(onLocationChange);

    try {
      if (service != null) {
        service.removeAccount(listener);
      }
    } catch (Throwable t) {
      Log.e("Patchy", "Exception in call to removeAccount()", t);
      goBlooey(t);
    }

    unbindService(svcConn);
  }