mirror of
https://gitee.com/openharmony/applications_screenlock
synced 2024-11-27 08:30:42 +00:00
commit
76faf1bddd
@ -53,7 +53,6 @@ export default class DigitalPSDViewModel extends BaseViewModel {
|
||||
Trace.start(Trace.CORE_METHOD_UNLOCK_SCREEN);
|
||||
Trace.start(Trace.CORE_METHOD_CALL_ACCOUNT_SYSTEM);
|
||||
service.authUser(AuthSubType.PIN_SIX, this.password, (result, extraInfo) => {
|
||||
this.clearPassword()
|
||||
if (result == 0) {
|
||||
//unlock the screen
|
||||
service.unlocking();
|
||||
@ -62,6 +61,7 @@ export default class DigitalPSDViewModel extends BaseViewModel {
|
||||
super.changePrompt(extraInfo.remainTimes, extraInfo.freezingTime, callback)
|
||||
}
|
||||
})
|
||||
this.clearPassword()
|
||||
}
|
||||
} else if (keyValue == Constants.DEL_PWD) {
|
||||
this.passwdMaskArr[this.password.length-1] = $r('app.media.ic_hollow_dot');
|
||||
|
@ -23,10 +23,12 @@ import AbilityManager from '../../../../../../common/src/main/ets/default/abilit
|
||||
import sTimeManager from '../../../../../../common/src/main/ets/default/TimeManager'
|
||||
|
||||
const TAG = "ScreenLock-ServiceExtAbility"
|
||||
const AUTO_ROTATION_RETRICTED: number = 8
|
||||
|
||||
class ServiceExtAbility extends ServiceExtension {
|
||||
private direction :number;
|
||||
|
||||
|
||||
onCreate(want) {
|
||||
Log.showInfo(TAG, 'onCreate, want:' + want.abilityName);
|
||||
AbilityManager.setContext(AbilityManager.ABILITY_NAME_SCREEN_LOCK, this.context)
|
||||
@ -65,6 +67,12 @@ class ServiceExtAbility extends ServiceExtension {
|
||||
Log.showDebug(TAG, `createWindow name:${name}`)
|
||||
windowManager.create(this.context, name, 2110).then((win) => {
|
||||
Log.showInfo(TAG, "before begin " + name + " window show!")
|
||||
win.setPreferredOrientation(AUTO_ROTATION_RETRICTED, (err) => {
|
||||
if (err.code) {
|
||||
Log.showError(TAG, "failed to set window Orientation: " + JSON.stringify(err));
|
||||
}
|
||||
Log.showInfo(TAG, "succeed to set window Orientation");
|
||||
})
|
||||
win.loadContent("pages/index").then(() => {
|
||||
win.show().then(() => {
|
||||
Log.showInfo(TAG, "window show in then!");
|
||||
|
Loading…
Reference in New Issue
Block a user