From b7c5ab52f6aaba3d94688ffeebbc3a3af7f53851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=BF=E6=96=87=E5=B9=BF?= Date: Wed, 7 Sep 2022 11:11:39 +0800 Subject: [PATCH] fixed 66121c7 from https://gitee.com/geng-wenguang/third_party_jsframework/pulls/668 97 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 耿文广 --- runtime/main/extend/systemplugin/napi/ohos_bundle.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runtime/main/extend/systemplugin/napi/ohos_bundle.js b/runtime/main/extend/systemplugin/napi/ohos_bundle.js index 3003706b..49d86707 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_bundle.js +++ b/runtime/main/extend/systemplugin/napi/ohos_bundle.js @@ -472,6 +472,16 @@ export function mockBundle() { }) } }, + getApplicationInfoSync: function(...args) { + console.warn("bundle.getApplicationInfoSync interface mocked in the Previewer. How this interface works on the" + + " Previewer may be different from that on a real device.") + return ApplicationInfo + }, + getBundleInfoSync: function(...args) { + console.warn("bundle.getBundleInfoSync interface mocked in the Previewer. How this interface works on the" + + " Previewer may be different from that on a real device.") + return BundleInfo + }, }; return bundle; } \ No newline at end of file