update product/phone/src/main/ets/MainAbility/MainAbility.ts.

Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
liujuan 2024-03-05 02:44:59 +00:00 committed by Gitee
parent eb5a87e83f
commit 31431fb173
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -171,7 +171,7 @@ export default class MainAbility extends Ability {
this.isOnDestroy = true; this.isOnDestroy = true;
let statusBarColorController: StatusBarColorController = StatusBarColorController.getInstance(); let statusBarColorController: StatusBarColorController = StatusBarColorController.getInstance();
statusBarColorController.release(); statusBarColorController.release();
AppStorage.Delete('entryFromHap'); AppStorage.delete('entryFromHap');
MediaObserver.getInstance().unregisterForAllPhotos(); MediaObserver.getInstance().unregisterForAllPhotos();
MediaObserver.getInstance().unregisterForAllAlbums(); MediaObserver.getInstance().unregisterForAllAlbums();
UserFileManagerAccess.getInstance().onDestroy(); UserFileManagerAccess.getInstance().onDestroy();
@ -181,7 +181,7 @@ export default class MainAbility extends Ability {
// Main window is created, set main page for this ability // Main window is created, set main page for this ability
Log.info(TAG, 'Application onWindowStageCreate'); Log.info(TAG, 'Application onWindowStageCreate');
AppStorage.setOrCreate('photosWindowStage', windowStage); AppStorage.setOrCreate('photosWindowStage', windowStage);
AppStorage.SetOrCreate('deviceType', AppStorage.setOrCreate('deviceType',
deviceInfo.deviceType == ('phone' || 'default') ? Constants.DEFAULT_DEVICE_TYPE : Constants.PAD_DEVICE_TYPE); deviceInfo.deviceType == ('phone' || 'default') ? Constants.DEFAULT_DEVICE_TYPE : Constants.PAD_DEVICE_TYPE);
ScreenManager.getInstance().on(ScreenManager.ON_LEFT_BLANK_CHANGED, data => { ScreenManager.getInstance().on(ScreenManager.ON_LEFT_BLANK_CHANGED, data => {
Log.info(TAG, `onleftBlankChanged: ${data}`); Log.info(TAG, `onleftBlankChanged: ${data}`);