* getAlias() needs BLUETOOTH_CONNECT * we are missing checks if we have that permission resulting in the InCallScreen crashing with the phone call still going on - no possibility to hang up Change-Id: Ib9c7988c32bab95060b5f4a35bf9a3498610c3f8
18 lines
455 B
Java
18 lines
455 B
Java
/*
|
|
* SPDX-FileCopyrightText: The LineageOS Project
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
package com.android.incallui.util;
|
|
|
|
import android.bluetooth.BluetoothDevice;
|
|
|
|
public class BluetoothUtil {
|
|
public static String getAliasName(BluetoothDevice bluetoothDevice) {
|
|
try {
|
|
return bluetoothDevice == null ? "" : bluetoothDevice.getAlias();
|
|
} catch (SecurityException ignored) {
|
|
return "";
|
|
}
|
|
}
|
|
}
|