/** * Initiate resume from an suspended A2DP sink. Listen for SINK_STATE_CHANGED_ACTION to find out * when resume is completed. * * @param device Remote BT device. * @return false on immediate error, true otherwise * @hide */ public boolean resumeSink(BluetoothDevice device) { try { return mService.resumeSink(device); } catch (RemoteException e) { Log.e(TAG, "", e); return false; } }
/** * Initiate resume from a suspended A2DP sink. * * <p>This API will return false in scenarios like the A2DP device is not in suspended state etc. * When this API returns, true, it is guaranteed that {@link #ACTION_SINK_STATE_CHANGED} intent * will be broadcasted with the state. Users can get the state of the A2DP device from this * intent. * * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} * * @param device Remote A2DP sink * @return false on immediate error, true otherwise * @hide */ public boolean resumeSink(BluetoothDevice device) { if (mService != null && isEnabled() && isValidDevice(device)) { try { return mService.resumeSink(device); } catch (RemoteException e) { Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); return false; } } if (mService == null) Log.w(TAG, "Proxy not attached to service"); return false; }