Merge "replace CURRENT_OR_SELF with non hidden API" am: 9c2d1e673f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1901950

Change-Id: Ifc1264ccc312618f0ac22700fcf947dd24c16cdd
This commit is contained in:
Treehugger Robot
2021-12-09 00:12:20 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 3 deletions

View File

@@ -23,7 +23,6 @@ import android.annotation.SdkConstant;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.bluetooth.annotations.RequiresBluetoothConnectPermission; import android.bluetooth.annotations.RequiresBluetoothConnectPermission;
import android.bluetooth.annotations.RequiresLegacyBluetoothPermission;
import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage;
import android.content.Attributable; import android.content.Attributable;
import android.content.AttributionSource; import android.content.AttributionSource;
@@ -170,7 +169,7 @@ public class BluetoothPbap implements BluetoothProfile {
mContext.getPackageManager(), 0); mContext.getPackageManager(), 0);
intent.setComponent(comp); intent.setComponent(comp);
if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
UserHandle.CURRENT_OR_SELF)) { UserHandle.CURRENT)) {
Log.e(TAG, "Could not bind to Bluetooth Pbap Service with " + intent); Log.e(TAG, "Could not bind to Bluetooth Pbap Service with " + intent);
return false; return false;
} }

View File

@@ -103,7 +103,7 @@ public abstract class BluetoothProfileConnector<T> {
mContext.getPackageManager(), 0); mContext.getPackageManager(), 0);
intent.setComponent(comp); intent.setComponent(comp);
if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
UserHandle.CURRENT_OR_SELF)) { UserHandle.CURRENT)) {
logError("Could not bind to Bluetooth Service with " + intent); logError("Could not bind to Bluetooth Service with " + intent);
return false; return false;
} }