Example #1
0
 /**
  * Stop Bluetooth Voice Recognition mode, and shut down the Bluetooth audio path.
  *
  * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
  *
  * @param device Bluetooth headset
  * @return false if there is no headset connected or on error, true otherwise
  */
 public boolean stopVoiceRecognition(BluetoothDevice device) {
   if (DBG) log("stopVoiceRecognition()");
   if (mService != null && isEnabled() && isValidDevice(device)) {
     try {
       return mService.stopVoiceRecognition(device);
     } catch (RemoteException e) {
       Log.e(TAG, Log.getStackTraceString(new Throwable()));
     }
   }
   if (mService == null) Log.w(TAG, "Proxy not attached to service");
   return false;
 }