public void onServiceConnected(ComponentName className, IBinder service) {
          ConnectionManagerService.LocalBinder binder =
              (ConnectionManagerService.LocalBinder) service;
          connMgrService = binder.getService();
          Log.d(TAG, "ConnectionManagerService connected");
          // attach to remote intent service to allow it call back
          connMgrService.setConnector(ConnectorActivity.this);
          connMgrService.setSimpleConnectionInfo(devName, useSSL);

          // in case we miss it at onResume()
          // getPeerDeviceNetInfo();
        }
 void resumeLeader() {
   if (isLeader) {
     if (connMgrService != null) {
       connMgrService.setConnector(this);
     }
     // clear gui
     wifiBtn.setChecked(false);
     wifiDirectBtn.setChecked(false);
     wifiHotspotBtn.setChecked(false);
     wifiInfo.setText(wifiInfoText);
     wifiDirectInfo.setText(wifiDirectInfoText);
     wifiHotspotInfo.setText(wifiHotspotInfoText);
     // query peers
     doLeader();
     //
     /*
      * switch (chosenNType) { case NetInfo.WiFi: if (wifiBtn != null) {
      * wifiBtn.setChecked(true); } break; case NetInfo.WiFiDirect: if
      * (wifiDirectBtn != null) { wifiDirectBtn.setChecked(true); }
      * break; case NetInfo.WiFiHotspot: if (wifiHotspotBtn != null) {
      * wifiHotspotBtn.setChecked(true); } break; }
      */
   }
 }