mirror of
https://gitee.com/openharmony/applications_settings
synced 2024-11-27 00:20:59 +00:00
!411 OH设备蓝牙界面,点击对应的蓝牙耳机连接,当OH设备蓝牙耳机显示栏显示的状态正在连接时,OH设备关闭不了蓝牙,蓝牙界面界面点击开关按钮,界面无响应,有时还会出现界面闪退
Merge pull request !411 from sunwei06/master
This commit is contained in:
commit
12686f8f09
@ -423,11 +423,15 @@ export class BluetoothModel extends BaseModel {
|
||||
let result = [];
|
||||
for (let i = 0;i < this.profiles.length; i++) {
|
||||
if (this.profiles[i]) {
|
||||
let state = this.profiles[i].getDeviceState(deviceId);
|
||||
result.push({
|
||||
profileId: i,
|
||||
profileConnectionState: state
|
||||
});
|
||||
try {
|
||||
let state = this.profiles[i].getDeviceState(deviceId);
|
||||
result.push({
|
||||
profileId: i,
|
||||
profileConnectionState: state
|
||||
});
|
||||
} catch (BusinessError) {
|
||||
LogUtil.error("Bluetooth getDeviceState failed , BusinessError is " + JSON.stringify(BusinessError))
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user