mirror of
https://gitee.com/openharmony/applications_screenlock
synced 2024-11-27 00:21:03 +00:00
commit "bugfix screenlock"
Signed-off-by: lwf <liweifeng10@huawei.com>
This commit is contained in:
parent
399770642c
commit
81f8775a6e
@ -25,6 +25,7 @@ import hiDebug from '@ohos.hidebug';
|
||||
import systemParameter from '@ohos.systemparameter';
|
||||
import { CommonEventPublishData } from 'commonEvent/commonEventPublishData';
|
||||
import {Callback} from '@ohos.base';
|
||||
import { UIContext } from '@ohos.arkui.UIContext';
|
||||
|
||||
const TAG = 'ScreenLock-ScreenLockService';
|
||||
const URI_DIGITALPASSWORD = 'pages/digitalPassword'
|
||||
@ -261,8 +262,10 @@ export class ScreenLockService {
|
||||
let slidestatus = AppStorage.Get('slidestatus')
|
||||
if(!slidestatus){
|
||||
AppStorage.SetOrCreate('slidestatus', true);
|
||||
const UIContext: UIContext = AppStorage.get('UIContext');
|
||||
Log.showInfo(TAG, `this.UIContext is ${UIContext}`)
|
||||
Log.showInfo(TAG, `unlockScreen Router.push`);
|
||||
Router.push({ uri: mRouterPath });
|
||||
UIContext.getRouter().pushUrl({ url: mRouterPath })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -20,6 +20,7 @@ import Log from '../../../../../../common/src/main/ets/default/Log'
|
||||
import Constants from '../../../../../../features/screenlock/src/main/ets/com/ohos/common/constants'
|
||||
import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager'
|
||||
import sTimeManager from '../../../../../../common/src/main/ets/default/TimeManager'
|
||||
import { UIContext } from '@ohos.arkui.UIContext'
|
||||
|
||||
const TAG = "ScreenLock-ServiceExtAbility"
|
||||
|
||||
@ -36,6 +37,9 @@ class ServiceExtAbility extends ServiceExtension {
|
||||
Log.showDebug(TAG, `createWindow name:${name}`)
|
||||
windowManager.create(this.context, name, windowManager.WindowType.TYPE_KEYGUARD).then((win) => {
|
||||
win.loadContent("pages/index").then(() => {
|
||||
const UIContext: UIContext = win.getUIContext();
|
||||
Log.showInfo(TAG, 'get UIContext successful,' + JSON.stringify(UIContext));
|
||||
AppStorage.SetOrCreate('UIContext', UIContext);
|
||||
Log.showInfo(TAG, name + " window loadContent in then! ")
|
||||
win.show().then(() => {
|
||||
Log.showInfo(TAG, "then begin " + name + " window show in then! ");
|
||||
|
Loading…
Reference in New Issue
Block a user