Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Commit 9bdb966

Browse files
Merge pull request #155 from react-native-oh-library/sig_llh
修改权限申请分类不准确问题
2 parents 428d685 + ae11118 commit 9bdb966

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

harmony/rn_webview/src/main/ets/RNCWebView.ets

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export struct RNCWebView {
407407
let permissionDialogMessage = ''
408408
permissionDialogMessage = event.request.getAccessibleResource().toString()
409409
switch (permissionDialogMessage) {
410-
case (ProtectedResourceType.VIDEO_CAPTURE + "," + ProtectedResourceType.AUDIO_CAPTURE):
410+
case ProtectedResourceType.VIDEO_CAPTURE:
411411
permissionDialogMessage = this.resourceToString($r('app.string.use_your_camera'))
412412
break;
413413
case ProtectedResourceType.AUDIO_CAPTURE:
@@ -416,6 +416,9 @@ export struct RNCWebView {
416416
case ProtectedResourceType.MidiSysex:
417417
permissionDialogMessage = this.resourceToString($r('app.string.midi_sysex_resources'))
418418
break;
419+
case ProtectedResourceType.VIDEO_CAPTURE + "," + ProtectedResourceType.AUDIO_CAPTURE:
420+
permissionDialogMessage = this.resourceToString($r('app.string.use_your_camera_and_microphone'))
421+
break;
419422
}
420423
return permissionDialogMessage;
421424
}

harmony/rn_webview/src/main/resources/base/element/string.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
},
1515
{
1616
"name": "use_your_camera",
17-
"value": "使用你的相机"
17+
"value": "使用你的摄像头"
1818
},
1919
{
2020
"name": "use_your_microphone",
2121
"value": "使用你的麦克风?"
2222
},
23+
{
24+
"name": "use_your_camera_and_microphone",
25+
"value": "使用你的摄像头和麦克风?"
26+
},
2327
{
2428
"name": "midi_sysex_resources",
2529
"value": "访问 MIDI SYSEX 资源?"

harmony/rn_webview/src/main/resources/en_US/element/string.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
"name": "use_your_microphone",
2121
"value": "use your microphone?"
2222
},
23+
{
24+
"name": "use_your_camera_and_microphone",
25+
"value": "use your camera and microphone?"
26+
},
2327
{
2428
"name": "midi_sysex_resources",
2529
"value": "MIDI SYSEX Resources?"

harmony/rn_webview/src/main/resources/zh_CN/element/string.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
},
1515
{
1616
"name": "use_your_camera",
17-
"value": "使用你的相机"
17+
"value": "使用你的摄像头"
1818
},
1919
{
2020
"name": "use_your_microphone",
2121
"value": "使用你的麦克风?"
2222
},
23+
{
24+
"name": "use_your_camera_and_microphone",
25+
"value": "使用你的摄像头和麦克风?"
26+
},
2327
{
2428
"name": "midi_sysex_resources",
2529
"value": "访问 MIDI SYSEX 资源?"

0 commit comments

Comments
 (0)