Merge "Be the current user to get A2DP proxy" am: c3824e5d57 am: 280efb289b

am: ffb6f109a3

Change-Id: Ia4ecd35123fe0964b80482e072e327748bbc2fe1
This commit is contained in:
Cheney Ni
2018-08-22 08:01:31 -07:00
committed by android-build-merger

View File

@@ -30,6 +30,7 @@ import android.os.Binder;
import android.os.IBinder;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;
import com.android.internal.annotations.GuardedBy;
@@ -270,7 +271,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
intent.setComponent(comp);
if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
mContext.getUser())) {
UserHandle.CURRENT_OR_SELF)) {
Log.e(TAG, "Could not bind to Bluetooth A2DP Service with " + intent);
return false;
}