mirror of
https://gitee.com/openharmony/applications_settings
synced 2024-11-23 06:20:01 +00:00
!426 【OpenHarmony 4.0.7.2】【RK3568】【压力测试】【ToC】【低概率2/10】【wukong】出现2次, 进程com.ohos.settings 下出现jscrash问题,栈名:disableLocation
Merge pull request !426 from chenlang/master
This commit is contained in:
commit
4ff5ff5faf
@ -50,13 +50,23 @@ export class LocationService {
|
||||
|
||||
enableLocation() {
|
||||
LogUtil.info(ConfigData.TAG + 'enable location')
|
||||
geolocation.enableLocation()
|
||||
.then((res) => LogUtil.info(ConfigData.TAG + `enable location, result: ${JSON.stringify(res)}`));
|
||||
try{
|
||||
geolocation.enableLocation()
|
||||
.then((res) => LogUtil.info(ConfigData.TAG + `enable location, result: ${JSON.stringify(res)}`))
|
||||
.catch(error=> LogUtil.info(ConfigData.TAG + `enable location, result: ${error}`))
|
||||
}catch(err){
|
||||
LogUtil.info(ConfigData.TAG + `enable location, result: ${err}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
disableLocation() {
|
||||
LogUtil.info(ConfigData.TAG + 'disable location')
|
||||
geolocation.disableLocation();
|
||||
try{
|
||||
geolocation.disableLocation()
|
||||
}catch(err){
|
||||
LogUtil.info(ConfigData.TAG + `disenable location, result: ${err}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -448,7 +448,7 @@ struct AvailableDeviceComponent {
|
||||
@StorageLink("pinRequiredParam") @Watch("pinRequiredParamChange") pinRequiredParam: {deviceId: string; pinCode: string} = {deviceId: '',pinCode: ''} ;
|
||||
pairDialog: CustomDialogController = new CustomDialogController({
|
||||
builder: PairDialog({
|
||||
deviceName: this.pairingDevice?this.pairingDevice.deviceName:"",
|
||||
deviceName: (this.pairingDevice && this.pairingDevice.hasOwnProperty('deviceName'))?this.pairingDevice.deviceName:undefined,
|
||||
pinCode: this.pairPinCode,
|
||||
action: (accept: boolean) => {
|
||||
this.confirmPairing(accept);
|
||||
@ -600,7 +600,13 @@ struct AvailableDeviceComponent {
|
||||
@Log
|
||||
confirmPairing(accept: boolean) {
|
||||
LogUtil.info(this.TAG_PAGE + 'confirmPairing pairingDevice');
|
||||
this.controller.confirmPairing(this.pairingDevice.deviceId, accept);
|
||||
try{
|
||||
if(this.pairingDevice && this.pairingDevice.deviceId!=null ){
|
||||
this.controller.confirmPairing(this.pairingDevice.deviceId, accept);
|
||||
}
|
||||
}catch(err){
|
||||
LogUtil.info(this.TAG_PAGE + `confirmPairing pairingDevice error ${err}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user