mirror of
https://github.com/openharmony/applications_auth_widget.git
synced 2026-07-19 22:03:54 -04:00
Merge branch 'master' of gitee.com:xuanzhuo/applications_auth_widget
This commit is contained in:
@@ -161,29 +161,28 @@ struct Index {
|
||||
try {
|
||||
userAuthWidgetMgr = userAuth.getUserAuthWidgetMgr(Constants.userAuthWidgetMgrVersion);
|
||||
LogUtils.info(TAG, 'getUserAuthWidgetMgr success');
|
||||
let that = this;
|
||||
userAuthWidgetMgr.on('command', {
|
||||
sendCommand(result) {
|
||||
sendCommand: (result) => {
|
||||
LogUtils.info(TAG, 'sendCommand result: ' + result);
|
||||
const cmdDataObj: WidgetCommand = JSON.parse(result || '{}');
|
||||
that.skipLockedBiometricAuth = cmdDataObj?.skipLockedBiometricAuth ?? false
|
||||
this.skipLockedBiometricAuth = cmdDataObj?.skipLockedBiometricAuth ?? false
|
||||
cmdDataObj.cmd?.map((item) => {
|
||||
if (item.payload?.lockoutDuration !== 0 && item.payload?.remainAttempts === 0) {
|
||||
if (item.payload?.type === 'face') {
|
||||
that.isFaceLocked = true;
|
||||
this.isFaceLocked = true;
|
||||
} else if (item.payload?.type === 'fingerprint') {
|
||||
that.isFingerprintLocked = true;
|
||||
this.isFingerprintLocked = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
if (that.handleLocked()) {
|
||||
if (this.handleLocked()) {
|
||||
return;
|
||||
}
|
||||
that.cmdData = cmdDataObj?.cmd || [];
|
||||
this.cmdData = cmdDataObj?.cmd || [];
|
||||
if (cmdDataObj?.pinSubType !== null && cmdDataObj?.pinSubType !== undefined) {
|
||||
that.pinSubType = cmdDataObj?.pinSubType;
|
||||
this.pinSubType = cmdDataObj?.pinSubType;
|
||||
}
|
||||
that.handleIsUnder(cmdDataObj?.cmd || []);
|
||||
this.handleIsUnder(cmdDataObj?.cmd || []);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user