diff --git a/Mindspore.AI/AppScope/app.json5 b/Mindspore.AI/AppScope/app.json5 index b43ccfd450b7b5545cdcb2a49005f826f18557a2..83832f4f4ded63de1cd7da6e4b676657db2f2930 100644 --- a/Mindspore.AI/AppScope/app.json5 +++ b/Mindspore.AI/AppScope/app.json5 @@ -16,8 +16,8 @@ "app": { "bundleName": "com.ohos.mindspore.ai", "vendor": "ohos", - "versionCode": 1000000, - "versionName": "1.0.0", + "versionCode": 1000001, + "versionName": "1.0.1", "icon": "$media:app_icon", "label": "$string:app_name" } diff --git a/Mindspore.AI/Shell/Install.bat b/Mindspore.AI/Shell/Install.bat new file mode 100644 index 0000000000000000000000000000000000000000..d0e0de4e60f5ce7f05edf8549c75dc31a0a138d1 --- /dev/null +++ b/Mindspore.AI/Shell/Install.bat @@ -0,0 +1,13 @@ +set objectDetection_replace_folder=entry\build\default\outputs\default\entry-default-signed.hap + +cd .. + +set hdc=hdc.exe + +%hdc% shell "mount -o rw,remount /" +%hdc% shell "rm -rf /system/app/com.ohos.mindspore.ai/ObjectDetection.hap" + +%hdc% file send %objectDetection_replace_folder% /system/app/com.ohos.mindspore.ai/ObjectDetection.hap + +%hdc% shell "rm -rf /data/*" +%hdc% shell "reboot" \ No newline at end of file diff --git a/Mindspore.AI/Shell/hdc.exe b/Mindspore.AI/Shell/hdc.exe new file mode 100644 index 0000000000000000000000000000000000000000..a696610f97569989364297b340414f9abc9ced4e Binary files /dev/null and b/Mindspore.AI/Shell/hdc.exe differ diff --git a/Mindspore.AI/build-profile.json5 b/Mindspore.AI/build-profile.json5 index b798c37822e76ff76ea0b18c4148873c97aa395c..69a21f9209b189694b4a9eec77e0b3211adc0aed 100644 --- a/Mindspore.AI/build-profile.json5 +++ b/Mindspore.AI/build-profile.json5 @@ -1,19 +1,19 @@ -/* - * Copyright 2024 Unionman Technology 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ { "app": { + "signingConfigs": [ + { + "name": "default", + "material": { + "certpath": "signature/objectDetection.cer", + "storePassword": "0000001BD2861065DC5B2CE896C2AFA1EC81CEBEC333E2602BDE8B61E45A76A1781C2AAC45B82B95A1F706", + "keyAlias": "debugKey", + "keyPassword": "0000001B860D078934E23FC7A26781E37EB2160074BEE162BA06B2AD06710D7B1085A59BCE909E04BA13AB", + "profile": "signature/objectDetection.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "signature/objectDetection.p12" + } + } + ], "products": [ { "name": "default", diff --git a/Mindspore.AI/entry/src/main/ets/model/CameraModel.ets b/Mindspore.AI/entry/src/main/ets/model/CameraModel.ets index 996299ea533c14a57faaff32dd22bdc38b020327..41802646e6968cf27401ede3289e7d761fd9fa85 100644 --- a/Mindspore.AI/entry/src/main/ets/model/CameraModel.ets +++ b/Mindspore.AI/entry/src/main/ets/model/CameraModel.ets @@ -272,7 +272,12 @@ export default class CameraService { await this.videoOutput.release(); } if (this.capSession) { - await this.capSession.release(); + try { + await this.capSession.release(); + Logger.info(TAG, ' Callback invoked to indicate that the CaptureSession instance is released successfully.'); + } catch (err) { + Logger.error(TAG, `Failed to release the CaptureSession instance ${err.code}`); + } } } } diff --git a/Mindspore.AI/signature/material/ac/edb1225f0ef54b4fafa7e96cdbb60f5b b/Mindspore.AI/signature/material/ac/edb1225f0ef54b4fafa7e96cdbb60f5b new file mode 100644 index 0000000000000000000000000000000000000000..133e4990eabfd0bae6776292d611485023e029a4 --- /dev/null +++ b/Mindspore.AI/signature/material/ac/edb1225f0ef54b4fafa7e96cdbb60f5b @@ -0,0 +1 @@ +;!]dJ"y3 \ No newline at end of file diff --git a/Mindspore.AI/signature/material/ce/a2937a051bd346b69b4846836c011353 b/Mindspore.AI/signature/material/ce/a2937a051bd346b69b4846836c011353 new file mode 100644 index 0000000000000000000000000000000000000000..5024514a1abc228431ba756c3235044ff72c8858 Binary files /dev/null and b/Mindspore.AI/signature/material/ce/a2937a051bd346b69b4846836c011353 differ diff --git a/Mindspore.AI/signature/material/fd/0/4facd4e460fc46bba3dac4b330b82bbd b/Mindspore.AI/signature/material/fd/0/4facd4e460fc46bba3dac4b330b82bbd new file mode 100644 index 0000000000000000000000000000000000000000..bca5493477982612cb4c81153e9e5218c84a5dcc Binary files /dev/null and b/Mindspore.AI/signature/material/fd/0/4facd4e460fc46bba3dac4b330b82bbd differ diff --git a/Mindspore.AI/signature/material/fd/1/25451abada7f4682b91669f02455d710 b/Mindspore.AI/signature/material/fd/1/25451abada7f4682b91669f02455d710 new file mode 100644 index 0000000000000000000000000000000000000000..b3666c92e5526dde4b432d013e743c9aa802ab76 --- /dev/null +++ b/Mindspore.AI/signature/material/fd/1/25451abada7f4682b91669f02455d710 @@ -0,0 +1 @@ +c0Scg \ No newline at end of file diff --git a/Mindspore.AI/signature/material/fd/2/e4d1b03ddfba44069b311560ead8ac6b b/Mindspore.AI/signature/material/fd/2/e4d1b03ddfba44069b311560ead8ac6b new file mode 100644 index 0000000000000000000000000000000000000000..5934f7598192fbf136db545727d7f233e6d355bb --- /dev/null +++ b/Mindspore.AI/signature/material/fd/2/e4d1b03ddfba44069b311560ead8ac6b @@ -0,0 +1 @@ +$l9_5Q \ No newline at end of file diff --git a/Mindspore.AI/signature/objectDetection.cer b/Mindspore.AI/signature/objectDetection.cer new file mode 100644 index 0000000000000000000000000000000000000000..09b0b9b56fded33c872ae8126c17c67e8043bd0c --- /dev/null +++ b/Mindspore.AI/signature/objectDetection.cer @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE----- +MIICFTCCAZugAwIBAgIIJzEtyFEYBucwCgYIKoZIzj0EAwMwYzELMAkGA1UEBhMC +Q04xFDASBgNVBAoTC09wZW5IYXJtb255MRkwFwYDVQQLExBPcGVuSG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5+lBJScE4xqf89N0g0OuqAb2re8nGsvWkw26 +uDekfnBYicd+G3Cydqa2zFIwV7Talyg2ULW3r8KbGpyl84mJEPPRmCGJ+H9gtCsf ++OrJ4Y76LVWjYzBhMB8GA1UdIwQYMBaAFBc6EKGrGXzlAE+s0Zgnsphadw7NMA8G +A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTbhrciFtUL +oUu33SV7ufEFfaItRzAMBggqhkjOPQQDAwUAA2gAMGUCMG3cXjiDmXTvf7D4Omhf +qcc2nuO+EMfWE+N9ZhBP5UhV34mAGWi3SfLU6rcV0urWEQIxAMYIb3epOnKhUrcm +Lfu1WKzFlpYQwmw73RaCHP2I3k6NcuWOYeNwWXSNZ8o0nzvaLg== +-----END CERTIFICATE----- diff --git a/Mindspore.AI/signature/objectDetection.csr b/Mindspore.AI/signature/objectDetection.csr new file mode 100644 index 0000000000000000000000000000000000000000..93949cc6f89bc075dc7174d613b4e5b606ecdb4c --- /dev/null +++ b/Mindspore.AI/signature/objectDetection.csr @@ -0,0 +1,9 @@ +-----BEGIN NEW CERTIFICATE REQUEST----- +MIIBNTCB3AIBADBKMRUwEwYDVQQDDAxpZGVfZGVtb19hcHAxDTALBgNVBAsTBFVu +aXQxFTATBgNVBAoTDE9yZ2FuaXphdGlvbjELMAkGA1UEBhMCQ04wWTATBgcqhkjO +PQIBBggqhkjOPQMBBwNCAARvdnAbUJ88KyoYsTyd+VF1S6mSKRno2F+vh8epIxxb +i+NH07epThc/zCrLLzARcU8FGpiC9DPt8UERzyTW8fVnoDAwLgYJKoZIhvcNAQkO +MSEwHzAdBgNVHQ4EFgQUwfcDi6SgLT/NEL6PSrDTRVPdwWEwCgYIKoZIzj0EAwID +SAAwRQIgeZn2CtKjvs7veBWGxfzAwrBOKgEMxXoAh5qBP1o+iQsCIQD4rxp9rhjJ +LJrhf8Fl0+Es0bIJp6FJN1fuvoJX4tBhpw== +-----END NEW CERTIFICATE REQUEST----- diff --git a/Mindspore.AI/signature/objectDetection.p12 b/Mindspore.AI/signature/objectDetection.p12 new file mode 100644 index 0000000000000000000000000000000000000000..d0850901c172bec311cd425b565c77ae0ab20374 Binary files /dev/null and b/Mindspore.AI/signature/objectDetection.p12 differ diff --git a/Mindspore.AI/signature/objectDetection.p7b b/Mindspore.AI/signature/objectDetection.p7b new file mode 100644 index 0000000000000000000000000000000000000000..7f815a2fec7094fd7d61b7628455e91583c85025 Binary files /dev/null and b/Mindspore.AI/signature/objectDetection.p7b differ