!73 稳定性问题

Merge pull request !73 from abc123/master
This commit is contained in:
openharmony_ci 2022-11-07 08:38:11 +00:00 committed by Gitee
commit 76faf1bddd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 9 additions and 1 deletions

View File

@ -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');

View File

@ -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!");