コード例 #1
0
ファイル: Remote.java プロジェクト: maduhu/ga-worldwind-suite
  @Override
  protected void onResume() {
    super.onResume();

    // Performing this check in onResume() covers the case in which BT was
    // not enabled during onStart(), so we were paused to enable it...
    // onResume() will be called when ACTION_REQUEST_ENABLE activity returns.
    if (communicator != null && communicator.getState() == AndroidCommunicator.State.NONE) {
      communicator.start();
      remoteViewCommunicator.start();
    }

    updateActionBarIcon(communicator.getState());
    sensorManager.registerListener(
        sensorListener,
        sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
        SensorManager.SENSOR_DELAY_FASTEST);
  }