From 155c84887814d73b552c48a8de37ab537cc389ec Mon Sep 17 00:00:00 2001 From: Shen Lin Date: Fri, 6 Jan 2023 08:13:11 +0000 Subject: [PATCH] Remove deprecated call of EventLog EventLog is deprecated so we simply need to update permissions without logging anything. Test: manual Change-Id: I760d9714946c57245fe22c6ffa8625dbcb9e8eb9 --- .../settingslib/bluetooth/CachedBluetoothDevice.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 845975d853401..c8187b89b0ed1 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -35,7 +35,6 @@ import android.os.Message; import android.os.ParcelUuid; import android.os.SystemClock; import android.text.TextUtils; -import android.util.EventLog; import android.util.Log; import android.util.LruCache; import android.util.Pair; @@ -1020,14 +1019,7 @@ public class CachedBluetoothDevice implements Comparable if (BluetoothUuid.containsAnyUuid(uuids, PbapServerProfile.PBAB_CLIENT_UUIDS)) { // The pairing dialog now warns of phone-book access for paired devices. // No separate prompt is displayed after pairing. - if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_UNKNOWN) { - if (BluetoothUtils.isDeviceClassMatched(mDevice, - BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) - || BluetoothUtils.isDeviceClassMatched(mDevice, - BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET)) { - EventLog.writeEvent(0x534e4554, "138529441", -1, ""); - } - } + mDevice.getPhonebookAccessPermission(); } }