picker适配隐式拉起接口&适配通知子系统修改

Signed-off-by: lijinfengde123 <lijinfeng26@huawei.com>
This commit is contained in:
lijinfengde123
2024-03-13 09:28:56 +08:00
parent 7031830e3e
commit ee73df110f
2 changed files with 8 additions and 9 deletions
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -62,7 +62,12 @@ export class CameraBasicFunction extends BaseFunction {
public async initCamera(data, callType?: string) {
GlobalContext.get().setObject('cameraStatus', CameraStatus.CAMERA_BEGIN_INIT);
if (this.startIdentification) return;
Log.info(`${this.TAG} initCamera this.startIdentification:${JSON.stringify(this.startIdentification)} `);
if (this.startIdentification) {
const platformCapability = CameraPlatformCapability.getInstance();
this.mWorkerManager.postMessage(Action.initCameraDone(platformCapability));
return;
}
if (callType) this.startIdentification = true
Log.start(`${this.TAG} initCamera`)
this.mSessionList.push('CREATE')
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -281,7 +281,6 @@ export struct PreviewArea {
this.isForegroundInit = false;
}
if (this.state.platformCapability) {
// if (!this.state.isShowPreview) {
this.settingManager.loadAllSetting().then(() => {
this.settingManager.setCameraId(this.state.cameraPosition);
@@ -293,9 +292,6 @@ export struct PreviewArea {
let isAssGridViewShow: number = Number(this.settingManager.getAssistiveGrid());
this.mAction.assistiveGridView(isAssGridViewShow);
// GeoLocation.getInstance().on()
display.getDefaultDisplay().then((dis) => {
let screenHeight = px2vp(dis.height - 176);
let screenWidth = px2vp(dis.width);
@@ -306,11 +302,9 @@ export struct PreviewArea {
let xComponentSize = this.settingManager.getPreviewDisplaySize(this.state.mode);
Log.info(this.TAG + " PreviewArea xComponentSize = " + JSON.stringify(xComponentSize));
this.mAction.changeXComponentSize(xComponentSize.width, xComponentSize.height);
// this.isShowPreview = true
this.mAction.updateShowPreviewFlag(true);
})
})
// }
}
Log.info(`${this.TAG} onCameraInit isShowPreview = ${this.state.isShowPreview} X`);
}