frameworks/base
Revision | 000e1d202ce57b6357b65c3d0a5b227f8dcc8d6e (tree) |
---|---|
Zeit | 2019-11-06 04:10:53 |
Autor | Zongheng Wang <wangzongheng@goog...> |
Commiter | Vasyl Gello |
Set default phonebook access to ACCESS_REJECTED when user didn't choose one
When there's no users' choice to tell us whether to share their
phonebook information to the Bluetooth device, set the phonebook access
permission to ACCESS_REJECTED.
Bug: 138529441
Test: Manual test
Change-Id: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
Merged-In: Iefabeb731b941f09fe1272ac7b7cd2feba75c8df
(cherry picked from commit 9b3cb0f06b7c4907c293aa65e68c7ed6e4962d4b)
@@ -25,6 +25,7 @@ import android.content.SharedPreferences; | ||
25 | 25 | import android.os.ParcelUuid; |
26 | 26 | import android.os.SystemClock; |
27 | 27 | import android.text.TextUtils; |
28 | +import android.util.EventLog; | |
28 | 29 | import android.util.Log; |
29 | 30 | import android.bluetooth.BluetoothAdapter; |
30 | 31 |
@@ -838,10 +839,9 @@ public final class CachedBluetoothDevice implements Comparable<CachedBluetoothDe | ||
838 | 839 | == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE || |
839 | 840 | mDevice.getBluetoothClass().getDeviceClass() |
840 | 841 | == BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET) { |
841 | - setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED); | |
842 | - } else { | |
843 | - setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED); | |
842 | + EventLog.writeEvent(0x534e4554, "138529441", -1, ""); | |
844 | 843 | } |
844 | + setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED); | |
845 | 845 | } |
846 | 846 | } |
847 | 847 | } |