4月1日进行12小时测试,出现jscrash问题,应用:com.ohos.systemu

Signed-off-by: 杨江涛 <yangjiangtao001@chinasoftinc.com>
This commit is contained in:
杨江涛
2024-04-09 10:18:48 +08:00
parent 94eff5ed81
commit e3864ab2ea
@@ -39,14 +39,14 @@ class AirplaneVM implements AirplaneServiceListener {
constructor() {
this.context = AbilityManager.getContext(AbilityManager.getContextName(AbilityManager.ABILITY_NAME_CONTROL_PANEL));
if (this.context == undefined || this.context == null) {
Log.showInfo(TAG, `constructor: ${context}`);
Log.showInfo(TAG, `constructor: ${this.context}`);
return;
}
try {
this.mAirplaneStatus =
settings.getValueSync(this.context, Constants.KEY_AIRPLANE_MODE_STATUS, AIRPLANE_MODE_STATUS.OFF) === AIRPLANE_MODE_STATUS.ON
} catch (err) {
Log.showError(TAG, `AirplaneVM: ${context}, ${JSON.stringify(err)}`);
Log.showError(TAG, `AirplaneVM: ${this.context}, ${JSON.stringify(err)}`);
}
AppStorage.SetOrCreate('Airplane_Status', this.mAirplaneStatus);
}