コード例 #1
0
  void setUseSSL(boolean useSSL) {
    Log.d(TAG, "setUseSSL: " + useSSL);

    // update shared preference
    SharedPreferences.Editor editor = settings.edit();
    editor.putBoolean(ConnectionManager.PREF_KEY_USE_SSL, useSSL);
    editor.commit();
    // notif router service
    if (connMgrService != null) {
      connMgrService.setSimpleConnectionInfo(null, useSSL);
    }
  }
コード例 #2
0
        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();
        }