コード例 #1
0
 @Override
 public void onClick(View v) {
   if (v.equals(statusImage)) {
     if (!binder.isServerUp()) {
       binder.startServer();
     } else {
       binder.stopServer();
     }
   }
 }
コード例 #2
0
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (resultCode == MicroWebServerSettingsActivity.OK) {
      if (binder.isServerUp()) binder.restartServer();
    }

    if (requestCode == LogSettingsActivity.SET && resultCode == LogSettingsActivity.SET) {

      int minlevel = data.getIntExtra(LogSettingsActivity.MINLEVEL, -1);
      int maxlevel = data.getIntExtra(LogSettingsActivity.MAXLEVEL, -1);

      System.err.println("loglevel filter " + minlevel + " -> " + maxlevel);

      lea.filter(minlevel, maxlevel);
    }
  }