!312 【OpenHarmony 4.1.7.7】jscrash,栈名:onNewWant

Merge pull request !312 from fanchenxuan/OpenHarmony-4.1-Release
This commit is contained in:
openharmony_ci 2024-09-06 06:26:26 +00:00 committed by Gitee
commit 5e98a9f11d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -68,13 +68,13 @@ export default class MainAbility extends UIAbility {
if (globalThis.currentApp === 'all') {
if (globalThis.currentApp !== bundleName) {
console.log(TAG + 'MainAbility onNewWant. all -> app');
globalThis.windowStage.setUIContent(this.context, 'pages/transition', null);
globalThis.windowStage?.setUIContent(this.context, 'pages/transition', null);
globalThis.currentApp = bundleName;
GlobalContext.store('bundleName', bundleName);
this.getSperifiedApplication(bundleName);
} else {
if (globalThis.refresh === true) {
globalThis.windowStage.setUIContent(this.context, 'pages/transition', null);
globalThis.windowStage?.setUIContent(this.context, 'pages/transition', null);
this.getAllApplications();
globalThis.refresh = false;
}
@ -82,13 +82,13 @@ export default class MainAbility extends UIAbility {
} else {
if (bundleName === 'all') {
console.log(TAG + 'MainAbility onNewWant. app -> all');
globalThis.windowStage.setUIContent(this.context, 'pages/transition', null);
globalThis.windowStage?.setUIContent(this.context, 'pages/transition', null);
globalThis.currentApp = 'all';
this.getAllApplications();
} else {
if (globalThis.currentApp !== bundleName) {
console.log(TAG + 'MainAbility onNewWant. app -> app');
globalThis.windowStage.setUIContent(this.context, 'pages/transition', null);
globalThis.windowStage?.setUIContent(this.context, 'pages/transition', null);
globalThis.currentApp = bundleName;
GlobalContext.store('bundleName', bundleName);
this.getSperifiedApplication(bundleName);
@ -147,7 +147,7 @@ export default class MainAbility extends UIAbility {
initialGroups.push(info);
}
let storage: LocalStorage = new LocalStorage({ 'initialGroups': initialGroups });
globalThis.windowStage.loadContent('pages/authority-management', storage);
globalThis.windowStage?.loadContent('pages/authority-management', storage);
}).catch((error) => {
console.error(TAG + 'bundle.getAllBundleInfo failed. Cause: ' + JSON.stringify(error));
});
@ -182,7 +182,7 @@ export default class MainAbility extends UIAbility {
'language': ''
};
GlobalContext.store('applicationInfo', info);
globalThis.windowStage.setUIContent(this.context, 'pages/application-secondary', null);
globalThis.windowStage?.setUIContent(this.context, 'pages/application-secondary', null);
}).catch(() => {
console.log(TAG + 'MainAbility getSperifiedApplication failed.');
this.context.terminateSelf();