!831 嵌入式身份认证控件告警清理

Merge pull request !831 from 李蜜/master
This commit is contained in:
openharmony_ci 2024-04-15 02:28:17 +00:00 committed by Gitee
commit 9ddc8f2f2f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 12 additions and 11 deletions

View File

@ -27,7 +27,7 @@ const FINGERPRINT_ICON_RESOURCE = 'sys.media.ohos_user_auth_icon_fingerprint';
export class UserAuthIcon extends ViewPU {
constructor(b1, c1, d1, e1 = -1, f1 = undefined, g1) {
super(b1, d1, e1, g1);
if (typeof f1 === "function") {
if (typeof f1 === 'function') {
this.paramsGenerator_ = f1;
}
this.authParam = {
@ -39,9 +39,9 @@ export class UserAuthIcon extends ViewPU {
title: ''
};
this.iconHeight = 64;
this.iconColor = { "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_activated'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" };
this.iconColor = { 'id': -1, 'type': 10001, params: ['sys.color.ohos_id_color_activated'], 'bundleName': '__harDefaultBundleName__', 'moduleName': '__harDefaultModuleName__' };
this.authFlag = ICON_UNAVAILABLE;
this.__imageSource = new ObservedPropertySimplePU('', this, "imageSource");
this.__imageSource = new ObservedPropertySimplePU('', this, 'imageSource');
this.onAuthResult = (j1) => { };
this.onIconClick = () => { };
this.setInitiallyProvidedValue(c1);
@ -164,7 +164,7 @@ export class UserAuthIcon extends ViewPU {
Column.create();
}, Column);
this.observeComponentCreation2((d, e) => {
Image.create({ "id": this.imageSource, params: [], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
Image.create({ 'id': this.imageSource, params: [], 'bundleName': '__harDefaultBundleName__', 'moduleName': '__harDefaultModuleName__' });
Image.width(this.iconHeight);
Image.height(this.iconHeight);
Image.fillColor(this.iconColor);

View File

@ -14,7 +14,7 @@
*/
export default class BuildProfile {
static readonly HAR_VERSION = '1.0.0';
static readonly BUILD_MODE_NAME = 'release';
static readonly DEBUG = false;
public static readonly HAR_VERSION = '1.0.0';
public static readonly BUILD_MODE_NAME = 'release';
public static readonly DEBUG = false;
}

View File

@ -107,7 +107,7 @@ export struct UserAuthIcon {
return;
}
if ((!authTypes.includes(userAuth.UserAuthType.FACE)) &&
authTypes.includes(userAuth.UserAuthType.FINGERPRINT)){
authTypes.includes(userAuth.UserAuthType.FINGERPRINT)) {
// Handle the situation where the authTypes parameter contains fingerprint type but not contains face type.
this.authFlag = ICON_AVAILABLE;
this.imageSource = FINGERPRINT_ICON_RESOURCE;
@ -115,7 +115,7 @@ export struct UserAuthIcon {
}
if (authTypes.includes(userAuth.UserAuthType.FACE) &&
authTypes.includes(userAuth.UserAuthType.FINGERPRINT) &&
authTypes.includes(userAuth.UserAuthType.PIN)){
authTypes.includes(userAuth.UserAuthType.PIN)) {
// Handle the situation where the authTypes parameter contains face, fingerprint, and PIN types at the same time.
this.handleAllAuthTypeCase(authTrustLevel);
return;
@ -186,13 +186,14 @@ export struct UserAuthIcon {
.fillColor(this.iconColor)
.onClick(() => {
this.info('start handle click event.');
if(this.onIconClick !== undefined){
if(this.onIconClick !== undefined) {
this.info('click event has response.');
this.onIconClick();
}
if (this.authFlag === ICON_AVAILABLE) {
try {
let userAuthInstance: userAuth.UserAuthInstance = userAuth.getUserAuthInstance(this.authParam,this.widgetParam);
let userAuthInstance: userAuth.UserAuthInstance =
userAuth.getUserAuthInstance(this.authParam,this.widgetParam);
let timer: number = setTimeout(() => {
this.error('auth timeout.');
userAuthInstance.cancel();