!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:
openharmony_ci 2023-05-29 07:20:37 +00:00 committed by Gitee
commit 4ff5ff5faf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 21 additions and 5 deletions

View File

@ -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}`)
}
}
}

View File

@ -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}`);
}
}
/**