Пример #1
0
 public void onDiscoveryStateChanged(CalibreService.DiscoveryState discoveryState) {
   ConnectionFragment frag = (ConnectionFragment) tab_connection.getFragment();
   if (frag != null) {
     frag.setDiscoveryState(discoveryState);
     switch (discoveryState) {
       case NO_SERVER:
         if (frag.isResumed() && mFragmentManager.findFragmentByTag("dlg-connect") == null) {
           NoServerDialogFragment instNSDF = new NoServerDialogFragment();
           instNSDF.show(mFragmentManager, "dlg-no-server");
         }
         break;
     }
   }
 }
Пример #2
0
 @Override
 public void onErrorReported(CalibreService.ErrorType e) {
   ConnectionFragment frag = (ConnectionFragment) tab_connection.getFragment();
   if (frag != null) frag.setErrorMessage(e);
 }
Пример #3
0
 public void onConnectionStateChanged(CalibreService.ConnectionState connectionState) {
   ConnectionFragment frag = (ConnectionFragment) tab_connection.getFragment();
   if (frag != null) frag.setConnectionState(connectionState);
 }