From f0ff67154255e72b2b7f6dab3f143f00c787fdf8 Mon Sep 17 00:00:00 2001 From: fanchenxuan Date: Tue, 26 Jul 2022 16:09:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86=E5=8D=87?= =?UTF-8?q?=E7=BA=A7stage=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fanchenxuan --- .../com.ohos.permissionmanager/.gitignore | 6 +- .../app.ets => AppScope/app.json5} | 21 +- .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes .../pages/second.ets => build-profile.json5} | 70 +- .../entry/.gitignore | 3 +- .../app.ets => entry/build-profile.json5} | 21 +- .../entry/build.gradle | 21 - .../entry/hvigorfile.js | 2 + .../entry/package-lock.json | 5 + .../entry/package.json | 14 + .../entry/proguard-rules.pro | 1 - .../entry/src/main/config.json | 67 - .../src/main/ets/Application/AbilityStage.ts | 7 + .../src/main/ets/MainAbility/MainAbility.ts | 34 + .../entry/src/main/ets/pages/index.ets | 32 + .../pages/index.ets => module.json5} | 72 +- .../main/resources/base/element/string.json | 12 +- .../resources/base/profile/main_pages.json | 5 + .../gradle.properties | 28 - frameworks/com.ohos.permissionmanager/gradlew | 183 -- .../com.ohos.permissionmanager/gradlew.bat | 103 -- .../com.ohos.permissionmanager/hvigorfile.js | 2 + .../package-lock.json | 1643 +++++++++++++++++ .../com.ohos.permissionmanager/package.json | 19 +- .../permissionmanager/.gitignore | 3 +- .../build-profile.json5} | 21 +- .../permissionmanager/build.gradle | 23 - .../permissionmanager/hvigorfile.js | 2 + .../permissionmanager/package-lock.json | 5 + .../permissionmanager/package.json | 14 + .../permissionmanager/proguard-rules.pro | 1 - .../permissionmanager/src/main/config.json | 109 -- .../src/main/ets/Application/AbilityStage.ts} | 10 +- .../common/model/permissionGroup.ets | 355 ---- .../GrantAbility/common/utils/constant.ets | 77 - .../ets/GrantAbility/common/utils/utils.ets | 48 - .../ets/GrantAbility/pages/dialogPlus.ets | 86 - .../src/main/ets/MainAbility/MainAbility.ts} | 68 +- .../common/model/permissionGroup.ets | 464 ----- .../ets/MainAbility/common/utils/constant.ets | 272 --- .../resources/default/media/icon_actived.png | Bin 1671 -> 0 bytes .../resources/default/media/icon_normal.png | Bin 1107 -> 0 bytes .../resources/default/properties/string.json | 19 - .../ServiceExtAbility/ServiceExtAbility.ts | 79 + .../common/components/alphabeticalIndex.ets | 2 +- .../common/components/backBar.ets | 4 +- .../common/components/dialog.ets | 2 +- .../common/components/search.ets | 2 +- .../common/model/bundle.ets | 0 .../main/ets/common/model/permissionGroup.ets | 512 +++++ .../src/main/ets/common/utils/constant.ets | 338 ++++ .../{MainAbility => }/common/utils/utils.ets | 25 +- .../pages/application-secondary.ets | 6 +- .../pages/application-tertiary.ets | 12 +- .../pages/authority-management.ets | 156 +- .../pages/authority-secondary.ets | 6 +- .../pages/authority-tertiary-groups.ets | 22 +- .../pages/authority-tertiary.ets | 22 +- .../dialog.ets => pages/dialogPlus.ets} | 408 ++-- .../pages/other-permissions.ets | 10 +- .../pages/permission-access-record.ets | 147 +- .../permissionmanager/src/main/module.json5 | 71 + .../ar/profile}/string.json | 0 .../main/resources/base/element/string.json | 24 +- .../resources/base/media/ic_call_logs.svg | 2 +- .../main/resources/base/media/noRecord.svg | 20 + .../resources/base/profile/main_pages.json | 13 + .../dark/profile}/string.json | 0 .../en/profile}/string.json | 0 .../light/profile}/string.json | 0 .../zh/profile}/string.json | 0 .../main/resources/zh_CN/element/string.json | 22 +- 73 files changed, 3493 insertions(+), 2368 deletions(-) rename frameworks/com.ohos.permissionmanager/{permissionmanager/src/main/ets/MainAbility/app.ets => AppScope/app.json5} (65%) create mode 100644 frameworks/com.ohos.permissionmanager/AppScope/resources/base/element/string.json create mode 100644 frameworks/com.ohos.permissionmanager/AppScope/resources/base/media/app_icon.png rename frameworks/com.ohos.permissionmanager/{entry/src/main/ets/MainAbility/pages/second.ets => build-profile.json5} (43%) rename frameworks/com.ohos.permissionmanager/{permissionmanager/src/main/ets/GrantAbility/app.ets => entry/build-profile.json5} (75%) delete mode 100644 frameworks/com.ohos.permissionmanager/entry/build.gradle create mode 100644 frameworks/com.ohos.permissionmanager/entry/hvigorfile.js create mode 100644 frameworks/com.ohos.permissionmanager/entry/package-lock.json create mode 100644 frameworks/com.ohos.permissionmanager/entry/package.json delete mode 100644 frameworks/com.ohos.permissionmanager/entry/proguard-rules.pro delete mode 100644 frameworks/com.ohos.permissionmanager/entry/src/main/config.json create mode 100644 frameworks/com.ohos.permissionmanager/entry/src/main/ets/Application/AbilityStage.ts create mode 100644 frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/MainAbility.ts create mode 100644 frameworks/com.ohos.permissionmanager/entry/src/main/ets/pages/index.ets rename frameworks/com.ohos.permissionmanager/entry/src/main/{ets/MainAbility/pages/index.ets => module.json5} (39%) create mode 100644 frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/profile/main_pages.json delete mode 100644 frameworks/com.ohos.permissionmanager/gradle.properties delete mode 100644 frameworks/com.ohos.permissionmanager/gradlew delete mode 100644 frameworks/com.ohos.permissionmanager/gradlew.bat create mode 100644 frameworks/com.ohos.permissionmanager/hvigorfile.js create mode 100644 frameworks/com.ohos.permissionmanager/package-lock.json rename frameworks/com.ohos.permissionmanager/{entry/src/main/ets/MainAbility/app.ets => permissionmanager/build-profile.json5} (74%) delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/build.gradle create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/hvigorfile.js create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/package-lock.json create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/package.json delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/proguard-rules.pro delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/config.json rename frameworks/com.ohos.permissionmanager/{settings.gradle => permissionmanager/src/main/ets/Application/AbilityStage.ts} (71%) delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/model/permissionGroup.ets delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/utils.ets delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/pages/dialogPlus.ets rename frameworks/com.ohos.permissionmanager/{build.gradle => permissionmanager/src/main/ets/MainAbility/MainAbility.ts} (35%) delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/model/permissionGroup.ets delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/media/icon_actived.png delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/media/icon_normal.png delete mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/properties/string.json create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/common/components/alphabeticalIndex.ets (98%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/common/components/backBar.ets (95%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/common/components/dialog.ets (96%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/common/components/search.ets (98%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{GrantAbility => }/common/model/bundle.ets (100%) create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/model/permissionGroup.ets create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/constant.ets rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/common/utils/utils.ets (98%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/application-secondary.ets (98%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/application-tertiary.ets (97%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/authority-management.ets (84%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/authority-secondary.ets (98%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/authority-tertiary-groups.ets (96%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/authority-tertiary.ets (95%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{GrantAbility/common/components/dialog.ets => pages/dialogPlus.ets} (43%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/other-permissions.ets (95%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/{MainAbility => }/pages/permission-access-record.ets (79%) create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/module.json5 rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/{ets/MainAbility/resources/ar/properties => resources/ar/profile}/string.json (100%) create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/noRecord.svg create mode 100644 frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/profile/main_pages.json rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/{ets/MainAbility/resources/dark/properties => resources/dark/profile}/string.json (100%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/{ets/MainAbility/resources/en/properties => resources/en/profile}/string.json (100%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/{ets/MainAbility/resources/light/properties => resources/light/profile}/string.json (100%) rename frameworks/com.ohos.permissionmanager/permissionmanager/src/main/{ets/MainAbility/resources/zh/properties => resources/zh/profile}/string.json (100%) diff --git a/frameworks/com.ohos.permissionmanager/.gitignore b/frameworks/com.ohos.permissionmanager/.gitignore index ec5fe0172..39187ebed 100644 --- a/frameworks/com.ohos.permissionmanager/.gitignore +++ b/frameworks/com.ohos.permissionmanager/.gitignore @@ -1,6 +1,4 @@ -/build /node_modules -/.gradle +/local.properties /.idea -local.properties -package-lock.json +**/build \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/app.ets b/frameworks/com.ohos.permissionmanager/AppScope/app.json5 similarity index 65% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/app.ets rename to frameworks/com.ohos.permissionmanager/AppScope/app.json5 index 8bcb0dfd7..22b0ce94e 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/app.ets +++ b/frameworks/com.ohos.permissionmanager/AppScope/app.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 @@ -12,16 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import featureAbility from '@ohos.ability.featureAbility' -export default { - onCreate() { - console.info('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') - }, - onHide() { - featureAbility.terminateSelf() +{ + "app": { + "bundleName": "com.ohos.permissionmanager", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true } } diff --git a/frameworks/com.ohos.permissionmanager/AppScope/resources/base/element/string.json b/frameworks/com.ohos.permissionmanager/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..4fe2f8594 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "权限管理" + } + ] +} diff --git a/frameworks/com.ohos.permissionmanager/AppScope/resources/base/media/app_icon.png b/frameworks/com.ohos.permissionmanager/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52RpX*&JHMR<^lVdm8ypJ}0R(SD(51j;6@ni$6bQ+2XL+R^|NnSp5}(kzvMZ^(@4fD_{QVu$(&K6H|C37TG1Am9Re{<<3gd zh@`>;BqkXMW&p0T6rt|iB$)~CvFe(XC)F9WgAZn*0@t$oZo;!*}r@_`h?KKH&6A@3= zISXoQB+~`op>NP-buiA*^0n{@i{_?MRG)&k)c)k_F+-2Lud!S9pc+i`s74NpBCaGF zXN+pHkubw*msGBTY27BKHv)RRh3;nMg4&$fD_6X9Vt~;_4D+5XPH~#Kn-yjcy!$}1 zigv#FNY>TqMhtIBb@UoF!cE~Q8~;!Pek>SQQwHnHuWKoVBosAiOr}q>!>aE*Krc)V zBUMEcJ5NU0g8}-h6i1zpMY9>m4ne?=U2~`w7K7Q0gB_=p@$5K7p6}thw z-~3dMj?YNX2X$lZ+7ngQ$=s}3mizNN@kE%OtB)?c&i~2L55z8^=yz;xMHLmlY>&Q# zJj?!)M#q_SyfkQh)k?j8IfLtB)ZCp|*vf4_B zos?73yd^h-Ac+;?E4*bpf=o*^3x3-`TVjbY4n6!EN10K6o@fxdyps05Vo3PU)otB} z`3kR+2w7_C#8Z!q`J)p{Vh!+m9-UP!$STp+Hb}}#@#_u^SsUQg<}59< zTvH3%XS4G+6FF^(m6bVF&nSUIXcl;nw{=H$%fgeJ>CgDYiLdpDXr{;-AnG z8dvcrHYVMI&`R6;GWekI@Ir3!uo)oz4^{6q0m^}@f2tM9&=YHNi6-?rh0-{+k@cQm zdp`g#YdQn%MDVg2GR>wZ`n2<0l4)9nx1Wfr&!Dvz=bPwU!h2S?ez6MVc5APE4-xLB zi&W9Q8k2@0w!C53g?iAIQ}~p*3O(@zja6KQ=M3zfW*_6o5SwR-)6VBh~m7{^-=MC-owYH5-u40a}a0liho3QZZ5L{bS_xM1)4}19)zTU$$MY zq3eZML1WC{K%YFd`Be0M-rkO^l?h{kM{$2oK1*A@HVJ57*yhDkUF!2WZ&oA4Y-sK( zCY69%#`mBCi6>6uw(x4gbFaP0+FD*JKJ-q!F1E?vLJ+d35!I5d7@^eU?(CS|C^tmI5?lv@s{{*|1F zFg|OzNpZ0hxljdjaW%45O0MOttRrd(Z?h{HYbB-KFUx&9GfFL3b8NwZ$zNu)WbBD` zYkj$^UB5%3Pj1MDr>S2Ejr9pUcgA!;ZG!@{uAy12)vG=*^9-|dNQBc8&`oxBlU~#y zs!anJX&T?57Jdr^sb>e+V`MVfY>Y0ESg7MG<7W0g&bR-ZYzzZ%2H&Etcp zcd6QeXO1D!5A#zM0lx*GH}`M)2~ZFLE;sP^RSB5wVMNfiZXPd(cmO>j=OSA3`o5r& zna(|^jGXbdN7PK)U8b7^zYtYkkeb%<%F~=OqB~kXMQkq}ii|skh@WSRt>5za;cjP0 zZ~nD%6)wzedqE}BMLt~qKwlvTr33))#uP~xyw#*Eaa|DbMQ_%mG0U8numf8)0DX`r zRoG2bM;#g|p-8gWnwRV5SCW0tLjLO&9Z?K>FImeIxlGUgo0Zk`9Qzhj1eco~7XZy+hXc@YF&ZQ=? zn*^1O56yK^x{y}q`j7}blGCx%dydV!c7)g~tJzmHhV=W~jbWRRR{1<^oDK+1clprm zz$eCy7y9+?{E|YgkW~}}iB#I4XoJ*xr8R?i_Hv$=Cof5bo-Nj~f`-DLebH}&0% zfQj9@WGd4;N~Y?mzQsHJTJq6!Qzl^-vwol(+fMt#Pl=Wh#lI5Vmu@QM0=_r+1wHt` z+8WZ~c2}KQQ+q)~2Ki77QvV&`xb|xVcTms99&cD$Zz4+-^R4kvUBxG8gDk7Y`K*)JZ^2rL(+ZWV~%W(@6 z)0bPArG#BROa_PHs~&WplQ_UIrpd)1N1QGPfv!J(Z9jNT#i%H?CE6|pPZb9hJ1JW4 z^q;ft#!HRNV0YgPojzIYT`8LuET2rUe-J|c!9l4`^*;4WtY@Ew@pL>wkjmMgGfN7 ze}}GtmU0@<_#08~I-Suk=^*9GLW=H4xhsml;vAV{%hy5Eegl@!6qKqbG024%n2HHw zCc@ivW_$@5ZoHP70(7D+(`PvgjW1Pd`wsiuv-aCukMrafwDm)B!xXVy*j2opohhoU zcJz%ADmj>i3`-3-$7nQKBQQuGY;2Qt&+(L~C>vSGFj5{Mlv?T_^dql;{zkpe4R1}R z%XfZyQ}wr*sr>jrKgm*PWLjuVc%6&&`Kbf1SuFpHPN&>W)$GmqC;pIoBC`=4-hPY8 zT*>%I2fP}vGW;R=^!1be?ta2UQd2>alOFFbVl;(SQJ4Jk#)4Z0^wpWEVvY4=vyDk@ zqlModi@iVPMC+{?rm=4(n+<;|lmUO@UKYA>EPTS~AndtK^Wy^%#3<;(dQdk3WaUkRtzSMC9}7x2||CNpF#(3T4C)@ z$~RWs`BNABKX|{cmBt>Q=&gkXl&x!!NK_%5hW0LS)Z4PB>%sV?F-{Wyj#s7W%$F{D zXdK^Fp3wvy+48+GP6F_|^PCRx=ddcTO3sG;B23A49~Qaw31SZ0Rc~`r4qqt%#OGW{ zCA_(LG5^N>yzUn&kAgVmxb=EA8s&tBXC}S1CZ(KoW)(%^JjLTPo^fs`Va;`=YlVPgmB$!yB}<(4ym6OeZ3xAJJ#;)2+B%p3P1Wt+d$eo`vz`T zXfUP2))kBDPoscH;Jc7I3NU<({|@wM$&GaDt`n7WLgIY3IA7A6-_R?z8N3mz|}*i z(zl5ot--Oq@f2-nv{X(ujT2T(k1vY_qh93pK@>H-qc%2Xta)IP0Q%zt%bqYgI`o!wv!0QerB`nCN^1n|@$sVOQ!V0teVG!I z_fD%JvfDeT1cK#-{o6Gv7}& zY0#NWin~kVaf$aufV&;63Hbs|`QVZWpDX6IMk1Hj2G}fiH9e-^6u2zf^FIr^BwD<6zjw63+{yUe8PUFvk8v{sJ=R{d#`O!sz`Q13~< zPT$JS(w=yQfU2`zPCNfSw=&zup@DXc(98afjhv@1w_f!m2Z>rMJ19AB&dB%P#Ls3b z=lK7OILM+SQ&VEd=1GN6o&>YVVtIzoZ%=Z_SdqJN2}E43{bE`>w+A;=y->@^k{oCC z$F*WTY&?34;kfyFV?b*Xb1Pq`Z=%OgwEg)Rz)tx=`f%5#w_INP=x&z5!jI;#;N$ma zhO)+MDm;SxOEVL15; zGq(v2pL3&P1Sl)8P*;G-fd{l1QJsv@e@d8)1PK4w2m*M%V3j-V~L^$i|&C@b?D?9tfwE{B^}Z$k8e5FmQ>v7Xz)sG32g9t}YBt zyR$+*_00RmPx+0mW+vVG4mxd(n$(eQf3-w>JPl2UJpafrPaL5@2j}%{VE-) zBI%6Qpj*dsdH<;g!S!avA~bv^0E+ zfyJbSjPb+j;J52U)<|cIcntQBI2T#>2;tOxu{%D?kML476AErF(qN9hPva5Nkc@BF zC-tLF@3ZFb%Kpj)M<{)x*l|*Ia@ECeXo2E4h2f!aV=cHAhi_E_mfUth(sM4^hJq7B zQsGWqdZUm9S%F`$nQ*_#NcuD`&)Ek%_s{&^78{9Hm ztri&rYLOxgFdG>O@+XHy z9#;|&vBCPXH5Mon^I`jSuR$&~ZWtyB67ujzFSj!51>#C}C17~TffQ{c-!QFQkTQ%! zIR^b1`zHx|*1GU?tbBx23weFLz5H?y_Q%N&t$}k?w+``2A=aotj0;2v$~AL z{scF-cL{wsdrmPvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { - router.back() - }) +{ + "app": { + "compileSdkVersion": 9, + "compatibleSdkVersion": 9, + "products": [ + { + "name": "default", + "signingConfig": "default" + } + ], + "signingConfigs": [ + { + "name": "default", + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + }, + { + "name": "permissionmanager", + "srcPath": "./permissionmanager", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] } - .width('100%') - .height('100%') - } + ] } \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/.gitignore b/frameworks/com.ohos.permissionmanager/entry/.gitignore index 7d5b7a94f..4f9a97381 100644 --- a/frameworks/com.ohos.permissionmanager/entry/.gitignore +++ b/frameworks/com.ohos.permissionmanager/entry/.gitignore @@ -1,2 +1,3 @@ -/build /node_modules +/.preview +/build \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/app.ets b/frameworks/com.ohos.permissionmanager/entry/build-profile.json5 similarity index 75% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/app.ets rename to frameworks/com.ohos.permissionmanager/entry/build-profile.json5 index 9ae634daa..8d4191ee3 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/app.ets +++ b/frameworks/com.ohos.permissionmanager/entry/build-profile.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 @@ -13,11 +13,16 @@ * limitations under the License. */ -export default { - onCreate() { - console.info('Application onCreate') +{ + "apiType": 'stageMode', + "buildOption": { }, - onDestroy() { - console.info('Application onDestroy') - }, -} + "targets": [ + { + "name": "default", + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/build.gradle b/frameworks/com.ohos.permissionmanager/entry/build.gradle deleted file mode 100644 index 05a33cd3a..000000000 --- a/frameworks/com.ohos.permissionmanager/entry/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -apply plugin: 'com.huawei.ohos.hap' -//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 -ohos { - compileSdkVersion 8 - defaultConfig { - compatibleSdkVersion 8 - } - buildTypes { - release { - proguardOpt { - proguardEnabled false - rulesFiles 'proguard-rules.pro' - } - } - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) - testImplementation 'junit:junit:4.13.1' -} diff --git a/frameworks/com.ohos.permissionmanager/entry/hvigorfile.js b/frameworks/com.ohos.permissionmanager/entry/hvigorfile.js new file mode 100644 index 000000000..d7720ee6a --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/hvigorfile.js @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks diff --git a/frameworks/com.ohos.permissionmanager/entry/package-lock.json b/frameworks/com.ohos.permissionmanager/entry/package-lock.json new file mode 100644 index 000000000..15bc7145b --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "entry", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/frameworks/com.ohos.permissionmanager/entry/package.json b/frameworks/com.ohos.permissionmanager/entry/package.json new file mode 100644 index 000000000..c7685ac4e --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/package.json @@ -0,0 +1,14 @@ +{ + "license": "ISC", + "devDependencies": {}, + "name": "entry", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": {} +} diff --git a/frameworks/com.ohos.permissionmanager/entry/proguard-rules.pro b/frameworks/com.ohos.permissionmanager/entry/proguard-rules.pro deleted file mode 100644 index f7666e475..000000000 --- a/frameworks/com.ohos.permissionmanager/entry/proguard-rules.pro +++ /dev/null @@ -1 +0,0 @@ -# config module specific ProGuard rules here. \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/config.json b/frameworks/com.ohos.permissionmanager/entry/src/main/config.json deleted file mode 100644 index c49d18bd7..000000000 --- a/frameworks/com.ohos.permissionmanager/entry/src/main/config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "app": { - "bundleName": "com.ohos.permissionmanager", - "vendor": "ohos", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.ohos.permissionmanager", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": false - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "orientation": "unspecified", - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "icon": "$media:icon", - "description": "$string:description_mainability", - "formsEnabled": false, - "label": "$string:entry_MainAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/index", - "pages/second" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/Application/AbilityStage.ts b/frameworks/com.ohos.permissionmanager/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 000000000..32dfe93cc --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,7 @@ +import AbilityStage from "@ohos.application.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + } +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/MainAbility.ts b/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 000000000..edb913073 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,34 @@ +import Ability from '@ohos.application.Ability' + +export default class MainAbility extends Ability { + onCreate(want, launchParam) { + console.log("[Demo] MainAbility onCreate") + globalThis.abilityWant = want; + } + + onDestroy() { + console.log("[Demo] MainAbility onDestroy") + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("[Demo] MainAbility onWindowStageCreate") + + windowStage.setUIContent(this.context, "pages/index", null) + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + console.log("[Demo] MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + console.log("[Demo] MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + console.log("[Demo] MainAbility onBackground") + } +}; diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/pages/index.ets b/frameworks/com.ohos.permissionmanager/entry/src/main/ets/pages/index.ets new file mode 100644 index 000000000..54bfa30ae --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/src/main/ets/pages/index.ets @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022 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 + * + * 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. + */ + +@Entry +@Component +struct Index { + @State message: string = 'Hello World' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/pages/index.ets b/frameworks/com.ohos.permissionmanager/entry/src/main/module.json5 similarity index 39% rename from frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/pages/index.ets rename to frameworks/com.ohos.permissionmanager/entry/src/main/module.json5 index a438be437..8f7a7509a 100644 --- a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/pages/index.ets +++ b/frameworks/com.ohos.permissionmanager/entry/src/main/module.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 @@ -13,41 +13,39 @@ * limitations under the License. */ -import router from '@system.router'; - -async function routePage() { - let options = { - uri: 'pages/second' - } - try { - await router.push(options) - } catch (err) { - console.error(`fail callback, code: ${err.code}, msg: ${err.msg}`) - } -} - -@Entry -@Component -struct Index { - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text('Hello World') - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(25) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .onClick(() => { - routePage() - }) - } - .width('100%') - .height('100%') +{ + "module": { + "name": "entry", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:entry_desc", + "mainElement": "MainAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "abilities": [ + { + "name": "MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:MainAbility_desc", + "icon": "$media:icon", + "label": "$string:MainAbility_label", + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] } } \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/element/string.json b/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/element/string.json index b93f540e2..490210a39 100644 --- a/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/element/string.json +++ b/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/element/string.json @@ -1,12 +1,16 @@ { "string": [ { - "name": "entry_MainAbility", - "value": "entry_MainAbility" + "name": "entry_desc", + "value": "description" }, { - "name": "description_mainability", - "value": "eTS_Empty Ability" + "name": "MainAbility_desc", + "value": "description" + }, + { + "name": "MainAbility_label", + "value": "label" } ] } \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/profile/main_pages.json b/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 000000000..feec276e1 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/index" + ] +} diff --git a/frameworks/com.ohos.permissionmanager/gradle.properties b/frameworks/com.ohos.permissionmanager/gradle.properties deleted file mode 100644 index eff9877ed..000000000 --- a/frameworks/com.ohos.permissionmanager/gradle.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2021-2022 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 -# -# 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. -# - -# Project-wide Gradle settings. -# IDE (e.g. DevEco Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# If the Chinese output is garbled, please configure the following parameter. -# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false. -# more information see https://docs.gradle.org/current/userguide/performance.html -# org.gradle.parallel=false -# org.gradle.jvmargs=-Dfile.encoding=GBK \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/gradlew b/frameworks/com.ohos.permissionmanager/gradlew deleted file mode 100644 index 29df50864..000000000 --- a/frameworks/com.ohos.permissionmanager/gradlew +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright (c) 2021-2022 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 -# -# 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. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/frameworks/com.ohos.permissionmanager/gradlew.bat b/frameworks/com.ohos.permissionmanager/gradlew.bat deleted file mode 100644 index 9db1ef2e2..000000000 --- a/frameworks/com.ohos.permissionmanager/gradlew.bat +++ /dev/null @@ -1,103 +0,0 @@ -@rem -@rem Copyright (c) 2021-2022 Huawei Device Co., Ltd. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/frameworks/com.ohos.permissionmanager/hvigorfile.js b/frameworks/com.ohos.permissionmanager/hvigorfile.js new file mode 100644 index 000000000..5f2735e3d --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/hvigorfile.js @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +module.exports = require('@ohos/hvigor-ohos-plugin').appTasks \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/package-lock.json b/frameworks/com.ohos.permissionmanager/package-lock.json new file mode 100644 index 000000000..638b41024 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/package-lock.json @@ -0,0 +1,1643 @@ +{ + "name": "permissionmanager", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ohos/hvigor": { + "version": "1.0.6", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.0.6.tgz", + "integrity": "sha512-jjp7vpvUOMW1Nf7TdyhOtonwWHoSyBJLUiZTQqIx/GJV4UJyIqsiURUOqFwncQ4L7PDdeHuWly4uEelknYeWhg==", + "requires": { + "@ohos/hvigor-base": "1.0.6", + "interpret": "1.4.0", + "liftoff": "4.0.0", + "mute-stdout": "1.0.0", + "pretty-hrtime": "1.0.0", + "v8flags": "3.2.0", + "yargs": "7.1.0" + } + }, + "@ohos/hvigor-base": { + "version": "1.0.6", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.0.6.tgz", + "integrity": "sha512-cRDnWICTxmpNiFb9clIioqP5Oik1seLCICztXVhZqultrHuxwTheCRUZrHwlpyWdkSB2Al+FFBqmSwzIgZX4IQ==", + "requires": { + "json5": "2.2.0", + "log4js": "6.4.1", + "undertaker": "1.2.1" + } + }, + "@ohos/hvigor-ohos-plugin": { + "version": "1.0.6", + "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.0.6.tgz", + "integrity": "sha512-MAAi8uJxMzODUoSSNfBr+fU4HQ20dfQtkje9I+X4asc7qY2kAplW/q9f5XS8IOvv8zhC8OcSgsAXOAJuLMstOQ==", + "requires": { + "@ohos/hvigor-base": "1.0.6", + "@ohos/sdkmanager-common": "1.1.3", + "ajv": "8.10.0", + "archiver": "5.3.0", + "execa": "5.1.1", + "fs-extra": "10.0.0", + "glob": "7.2.0", + "iconv-lite": "0.6.3", + "json5": "2.2.0", + "lodash": "4.17.21", + "pretty-hrtime": "1.0.3", + "resolve-package-path": "4.0.3" + }, + "dependencies": { + "fs-extra": { + "version": "10.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + } + } + }, + "@ohos/sdkmanager-common": { + "version": "1.1.3", + "resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-1.1.3.tgz", + "integrity": "sha512-d2uhVauDDJZIUvyyaWWoavG4N/jLyfF5IH5kEXKV6R8HNf3606H1zDQzA+UZtOfwwJFXhD9djRjnVFNB8xc7aw==" + }, + "ajv": { + "version": "8.10.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "archiver": { + "version": "5.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/archiver/-/archiver-5.3.0.tgz", + "integrity": "sha512-iUw+oDwK0fgNpvveEsdQ0Ase6IIKztBJU2U0E9MzszMfmVVUyv1QJhS2ITW9ZCqx8dktAxVAjWWkKehuZE8OPg==", + "requires": { + "archiver-utils": "^2.1.0", + "async": "^3.2.0", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "requires": { + "make-iterator": "^1.0.0" + } + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "requires": { + "is-number": "^4.0.0" + } + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, + "async": { + "version": "3.2.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" + }, + "async-done": { + "version": "1.3.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + } + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "requires": { + "async-done": "^1.2.2" + } + }, + "bach": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bl": { + "version": "4.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://repo.huaweicloud.com/repository/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://repo.huaweicloud.com/repository/npm/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "compress-commons": { + "version": "4.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/compress-commons/-/compress-commons-4.1.1.tgz", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, + "crc32-stream": { + "version": "4.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/crc32-stream/-/crc32-stream-4.0.2.tgz", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "requires": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "date-format": { + "version": "4.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/date-format/-/date-format-4.0.6.tgz", + "integrity": "sha512-B9vvg5rHuQ8cbUXE/RMWMyX2YA5TecT3jKF5fLtGNlzPlU7zblSPmAm2OImDbWL+LDOQ6pUm+4LOFz+ywS41Zw==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.59", + "resolved": "https://repo.huaweicloud.com/repository/npm/es5-ext/-/es5-ext-0.10.59.tgz", + "integrity": "sha512-cOgyhW0tIJyQY1Kfw6Kr0viu9ZlUctVchRMZ7R0HiH3dxTSp5zJDLecwxUqPUrGKMsgBI1wd1FL+d9Jxfi4cLw==", + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "ext": { + "version": "1.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/ext/-/ext-1.6.0.tgz", + "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", + "requires": { + "type": "^2.5.0" + }, + "dependencies": { + "type": { + "version": "2.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + } + }, + "flagged-respawn": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" + }, + "flatted": { + "version": "3.2.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "^1.0.1" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-extra": { + "version": "10.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "graceful-fs": { + "version": "4.2.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://repo.huaweicloud.com/repository/npm/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "hypium": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/hypium/-/hypium-1.0.0.tgz", + "integrity": "sha512-nl+RQVv2AU/5FvFRhsXyWO5wh+2huhdqRZ3bszBWZzW+kpNI3AT4ydvVRYIfaQbYwV4UlX/rSc7BtFjLAezhow==" + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "liftoff": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "requires": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" + }, + "log4js": { + "version": "6.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", + "requires": { + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stdout": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mute-stdout/-/mute-stdout-1.0.0.tgz", + "integrity": "sha1-WzLqB+tDyd7WEwQ0z5JvRrKn/U0=" + }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "requires": { + "once": "^1.3.2" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pretty-hrtime": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", + "integrity": "sha1-9ualItPmBwRSK/Db5oVu0g515Nw=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdir-glob": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "requires": { + "resolve": "^1.20.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "resolve": { + "version": "1.22.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "requires": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-package-path": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-package-path/-/resolve-package-path-4.0.3.tgz", + "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", + "requires": { + "path-root": "^0.1.1" + } + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "streamroller": { + "version": "3.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/streamroller/-/streamroller-3.0.6.tgz", + "integrity": "sha512-Qz32plKq/MZywYyhEatxyYc8vs994Gz0Hu2MSYXXLD233UyPeIeRBZARIIGwFer4Mdb8r3Y2UqKkgyDghM6QCg==", + "requires": { + "date-format": "^4.0.6", + "debug": "^4.3.4", + "fs-extra": "^10.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + }, + "dependencies": { + "is-number": { + "version": "7.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + } + } + }, + "type": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "undertaker": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=" + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "requires": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + }, + "zip-stream": { + "version": "4.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "requires": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + } + } + } +} diff --git a/frameworks/com.ohos.permissionmanager/package.json b/frameworks/com.ohos.permissionmanager/package.json index 0967ef424..eff7afc86 100644 --- a/frameworks/com.ohos.permissionmanager/package.json +++ b/frameworks/com.ohos.permissionmanager/package.json @@ -1 +1,18 @@ -{} +{ + "license":"ISC", + "devDependencies":{}, + "name":"permissionmanager", + "ohos":{ + "org":"huawei", + "directoryLevel":"project", + "buildTool":"hvigor" + }, + "description":"example description", + "repository":{}, + "version":"1.0.0", + "dependencies":{ + "@ohos/hvigor-ohos-plugin":"1.0.6", + "hypium":"^1.0.0", + "@ohos/hvigor":"1.0.6" + } +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/.gitignore b/frameworks/com.ohos.permissionmanager/permissionmanager/.gitignore index 7d5b7a94f..4f9a97381 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/.gitignore +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/.gitignore @@ -1,2 +1,3 @@ -/build /node_modules +/.preview +/build \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/app.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/build-profile.json5 similarity index 74% rename from frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/app.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/build-profile.json5 index 1007addd5..8d4191ee3 100644 --- a/frameworks/com.ohos.permissionmanager/entry/src/main/ets/MainAbility/app.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/build-profile.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 @@ -12,12 +12,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - export default { - onCreate() { - console.info('Application onCreate') - }, - onDestroy() { - console.info('Application onDestroy') + +{ + "apiType": 'stageMode', + "buildOption": { }, + "targets": [ + { + "name": "default", + }, + { + "name": "ohosTest", + } + ] } \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/build.gradle b/frameworks/com.ohos.permissionmanager/permissionmanager/build.gradle deleted file mode 100644 index a59c134a1..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -apply plugin: 'com.huawei.ohos.hap' -//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 -ohos { - compileSdkVersion 8 - defaultConfig { - compatibleSdkVersion 8 - } - buildTypes { - release { - proguardOpt { - proguardEnabled false - rulesFiles 'proguard-rules.pro' - } - } - } - entryModules "entry" -} - -dependencies { - entryImplementation project(':entry') - implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) - testImplementation 'junit:junit:4.13.1' -} diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/hvigorfile.js b/frameworks/com.ohos.permissionmanager/permissionmanager/hvigorfile.js new file mode 100644 index 000000000..d7720ee6a --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/hvigorfile.js @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/package-lock.json b/frameworks/com.ohos.permissionmanager/permissionmanager/package-lock.json new file mode 100644 index 000000000..af634257b --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "permissionmanager", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/package.json b/frameworks/com.ohos.permissionmanager/permissionmanager/package.json new file mode 100644 index 000000000..980ccad2b --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/package.json @@ -0,0 +1,14 @@ +{ + "license": "ISC", + "devDependencies": {}, + "name": "permissionmanager", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": {} +} diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/proguard-rules.pro b/frameworks/com.ohos.permissionmanager/permissionmanager/proguard-rules.pro deleted file mode 100644 index f7666e475..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/proguard-rules.pro +++ /dev/null @@ -1 +0,0 @@ -# config module specific ProGuard rules here. \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/config.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/config.json deleted file mode 100644 index b0e05013b..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/config.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "app": { - "bundleName": "com.ohos.permissionmanager", - "vendor": "ohos", - "version": { - "code": 1, - "name": "1.0.0" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.ohos.permissionmanager", - "name": ".MyApplication", - "mainAbility": ".MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "permissionmanager", - "moduleType": "feature", - "installationFree": false - }, - "abilities": [ - { - "visible": true, - "srcPath": "MainAbility", - "name": ".MainAbility", - "srcLanguage": "ets", - "description": "$string:description_mainability", - "label": "$string:permissionmanager_MainAbility", - "type": "page", - "launchType": "singleton" - }, - { - "visible": true, - "srcPath": "GrantAbility", - "name": ".GrantAbility", - "srcLanguage": "ets", - "description": "$string:description_grantability", - "label": "$string:permissionmanager_GrantAbility", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/authority-management", - "pages/application-secondary", - "pages/application-tertiary", - "pages/authority-secondary", - "pages/authority-tertiary", - "pages/authority-tertiary-groups", - "pages/other-permissions", - "pages/permission-access-record" - ], - "name": ".MainAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - }, - { - "mode": { - "syntax": "ets", - "type": "pageAbility" - }, - "pages": [ - "pages/dialogPlus" - ], - "name": ".GrantAbility", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.GET_SENSITIVE_PERMISSIONS", - "reason": "get sensitive permissions" - }, - { - "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason": "grant sensitive permissions" - }, - { - "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS", - "reason": "revoke sensitive permissions" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "get applicationInfo" - }, - { - "name": "ohos.permission.GET_BUNDLE_INFO", - "reason": "get applicationInfo" - }, - { - "name": "ohos.permission.PERMISSION_USED_STATS" - } - ] - } -} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/settings.gradle b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/Application/AbilityStage.ts similarity index 71% rename from frameworks/com.ohos.permissionmanager/settings.gradle rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/Application/AbilityStage.ts index e34e79a3b..c5840e536 100644 --- a/frameworks/com.ohos.permissionmanager/settings.gradle +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/Application/AbilityStage.ts @@ -13,4 +13,12 @@ * limitations under the License. */ -include ':entry', ':permissionmanager' +import AbilityStage from "@ohos.application.AbilityStage" + +var TAG = "PermissionManager_MainAbility:" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log(TAG + "MyAbilityStage onCreate.") + } +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/model/permissionGroup.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/model/permissionGroup.ets deleted file mode 100644 index 54699affc..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/model/permissionGroup.ets +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) 2021-2022 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 - * - * 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. - */ - -export const permissionGroups: any[] = [ - { - "permissionName": "ohos.permission.LOCATION_IN_BACKGROUND", - "groupName": "LOCATION", - "label": "后台定位权限", - "description": "允许应用在后台运行时获取位置信息。", - "groupId": 0 - }, - { - "permissionName": "ohos.permission.LOCATION", - "groupName": "LOCATION", - "label": "前台定位权限", - "description": "允许应用在前台运行时获取位置信息。", - "groupId": 0 - }, - { - "permissionName": "ohos.permission.CAMERA", - "groupName": "CAMERA", - "label": "拍摄照片和录制视频", - "description": "允许应用拍摄照片和视频。", - "groupId": 1 - }, - { - "permissionName": "ohos.permission.MICROPHONE", - "groupName": "MICROPHONE", - "label": "录制音频", - "description": "允许应用打开或关闭录音通路。", - "groupId": 2 - }, - { - "permissionName": "ohos.permission.ANSWER_CALL", - "groupName": "PHONE", - "label": "接听电话", - "description": "允许应用接听电话。", - "groupId": 3 - }, - { - "permissionName": "ohos.permission.MANAGE_VOICEMAIL", - "groupName": "PHONE", - "label": "语音信箱", - "description": "允许应用管理语音信箱。", - "groupId": 3 - }, - { - "permissionName": "ohos.permission.READ_CELL_MESSAGES", - "groupName": "SMS", - "label": "读取小区广播", - "description": "允许应用读取设备接收的小区广播信息。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.READ_MESSAGES", - "groupName": "SMS", - "label": "读取短彩信", - "description": "允许应用读取设备接收的短彩信信息。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.RECEIVE_MMS", - "groupName": "SMS", - "label": "接收彩信", - "description": "允许应用接收彩信。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.RECEIVE_SMS", - "groupName": "SMS", - "label": "接收短信", - "description": "允许应用接收短信。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.RECEIVE_WAP_MESSAGES", - "groupName": "SMS", - "label": "接收WAP消息", - "description": "允许应用接收和处理WAP消息。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.SEND_MESSAGES", - "groupName": "SMS", - "label": "发送短彩信", - "description": "允许应用发送短彩信", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.READ_CONTACTS", - "groupName": "CONTACTS", - "label": "读取通讯录", - "description": "允许应用读取设备上存储的联系人信息。", - "groupId": 5 - }, - { - "permissionName": "ohos.permission.WRITE_CONTACTS", - "groupName": "CONTACTS", - "label": "新建/修改/删除通讯录", - "description": "允许应用新建/修改/删除设备上存储的联系人信息。", - "groupId": 5 - }, - { - "permissionName": "ohos.permission.READ_CALL_LOG", - "groupName": "CALL_LOG", - "label": "读取通话记录", - "description": "允许应用读取设备上的通话记录信息。", - "groupId": 6 - }, - { - "permissionName": "ohos.permission.WRITE_CALL_LOG", - "groupName": "CALL_LOG", - "label": "新建/修改/删除通话记录", - "description": "允许新建/修改/删除设备上的通话记录信息。", - "groupId": 6 - }, - { - "permissionName": "ohos.permission.MEDIA_LOCATION", - "groupName": "MEDIA", - "label": "允许应用访问拍摄位置", - "description": "应用访问用户媒体文件中的拍摄位置信息如经纬度信息。", - "groupId": 7 - }, - { - "permissionName": "ohos.permission.READ_MEDIA", - "groupName": "MEDIA", - "label": "允许应用读取媒体文件", - "description": "允许应用访问户媒体文件,如视频、音频、图片等。", - "groupId": 7 - }, - { - "permissionName": "ohos.permission.WRITE_MEDIA", - "groupName": "MEDIA", - "label": "允许应用读写媒体文件", - "description": "允许应用读写户媒体文件,如视频、音频、图片等。", - "groupId": 7 - }, - { - "permissionName": "ohos.permission.READ_CALENDAR", - "groupName": "CALENDAR", - "label": "读取日历", - "description": "允许应用读取日历。", - "groupId": 8 - }, - { - "permissionName": "ohos.permission.WRITE_CALENDAR", - "groupName": "CALENDAR", - "label": "新建/修改/删除日历", - "description": "允许应用新建/修改/删除日历。", - "groupId": 8 - }, - { - "permissionName": "ohos.permission.ACTIVITY_MOTION", - "groupName": "SPORT", - "label": "读取用户的运动状态", - "description": "允许应用程序读取用户的运动状态。", - "groupId": 9 - }, - { - "permissionName": "ohos.permission.READ_HEALTH_DATA", - "groupName": "HEALTH", - "label": "读取用户的健康数据", - "description": "允许应用程序读取用户的健康数据。", - "groupId": 10 - }, - { - "permissionName": "ohos.permission.DISTRIBUTED_DATASYNC", - "groupName": "OTHER", - "icon": $r("app.media.ic_multi_device_vector"), - "label": "使用多设备协同?", - "description": "发现并访问其他设备。", - "groupId": 11 - } -] - -export const groups: any[] = [ - { - "name": "LOCATION", - "groupName": "位置信息", - "icon": $r('app.media.ic_public_gps'), - "label": "访问位置信息?", - "description": "", - "permissions": [ - "ohos.permission.LOCATION_IN_BACKGROUND", - "ohos.permission.LOCATION" - ] - }, - { - "name": "CAMERA", - "groupName": "相机", - "icon": $r('app.media.ic_public_camera'), - "label": "使用相机?", - "description": "", - "permissions": [ - "ohos.permission.CAMERA" - ] - }, - { - "name": "MICROPHONE", - "groupName": "麦克风", - "icon": $r('app.media.ic_public_voice'), - "label": "使用麦克风?", - "description": "", - "permissions": [ - "ohos.permission.MICROPHONE" - ] - }, - { - "name": "PHONE", - "groupName": "电话", - "icon": $r('app.media.ic_public_phone'), - "label": "使用拨打电话?", - "description": "", - "permissions": [ - "ohos.permission.ANSWER_CALL", - "ohos.permission.MANAGE_VOICEMAIL" - ] - }, - { - "name": "SMS", - "groupName": "信息", - "icon": $r('app.media.ic_public_message'), - "label": "访问信息?", - "description": "", - "permissions": [ - "ohos.permission.READ_CELL_MESSAGES", - "ohos.permission.READ_MESSAGES", - "ohos.permission.RECEIVE_MMS", - "ohos.permission.RECEIVE_SMS", - "ohos.permission.RECEIVE_WAP_MESSAGES", - "ohos.permission.SEND_MESSAGES" - ] - }, - { - "name": "CONTACTS", - "groupName": "通讯录", - "icon": $r('app.media.ic_public_contacts_group'), - "label": "访问通讯录?", - "description": "", - "permissions": [ - "ohos.permission.READ_CONTACTS", - "ohos.permission.WRITE_CONTACTS" - ] - }, - { - "name": "CALL_LOG", - "groupName": "通话记录", - "icon": $r('app.media.ic_call_logs'), - "label": "访问通话记录?", - "description": "", - "permissions": [ - "ohos.permission.READ_CALL_LOG", - "ohos.permission.WRITE_CALL_LOG" - ] - }, - { - "name": "MEDIA", - "groupName": "媒体和文件", - "icon": $r('app.media.ic_public_folder'), - "label": "访问媒体和文件?", - "description": "", - "permissions": [ - "ohos.permission.MEDIA_LOCATION", - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA" - ] - }, - { - "name": "CALENDAR", - "groupName": "日历", - "icon": $r('app.media.ic_public_calendar'), - "label": "访问日历?", - "description": "", - "permissions": [ - "ohos.permission.READ_CALENDAR", - "ohos.permission.WRITE_CALENDAR" - ] - }, - { - "name": "SPORT", - "groupName": "健身运动", - "icon": $r('app.media.ic_sport'), - "label": "访问健身运动?", - "description": "", - "permissions": [ - "ohos.permission.ACTIVITY_MOTION" - ] - }, - { - "name": "HEALTH", - "groupName": "身体传感器", - "icon": $r('app.media.ic_ssensor'), - "label": "使用身体传感器?", - "description": "", - "permissions": [ - "ohos.permission.READ_HEALTH_DATA" - ] - }, - { - "name": "OTHER", - "groupName": "其他权限", - "icon": $r('app.media.ic_more'), - "description": "", - "permissions": [ - "ohos.permission.DISTRIBUTED_DATASYNC" - ] - } -] - -export const userGrantPermissions: string[] = [ - "ohos.permission.LOCATION_IN_BACKGROUND", - "ohos.permission.LOCATION", - "ohos.permission.CAMERA", - "ohos.permission.MICROPHONE", - "ohos.permission.ANSWER_CALL", - "ohos.permission.MANAGE_VOICEMAIL", - "ohos.permission.READ_CELL_MESSAGES", - "ohos.permission.READ_MESSAGES", - "ohos.permission.RECEIVE_MMS", - "ohos.permission.RECEIVE_SMS", - "ohos.permission.RECEIVE_WAP_MESSAGES", - "ohos.permission.SEND_MESSAGES", - "ohos.permission.READ_CONTACTS", - "ohos.permission.WRITE_CONTACTS", - "ohos.permission.READ_CALL_LOG", - "ohos.permission.WRITE_CALL_LOG", - "ohos.permission.MEDIA_LOCATION", - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA", - "ohos.permission.READ_CALENDAR", - "ohos.permission.WRITE_CALENDAR", - "ohos.permission.ACTIVITY_MOTION", - "ohos.permission.READ_HEALTH_DATA", - "ohos.permission.DISTRIBUTED_DATASYNC" -] - -export const showSubpermissionsGrop: string[] = [ - "电话", - "日历", - "信息", - "通讯录", - "通话记录" -]; diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets deleted file mode 100644 index 74e2d764a..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/constant.ets +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2021-2022 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 - * - * 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. - */ - -export default class Constants { - // icon of dialog - static DIALOG_ICON_WIDTH = 26; - static DIALOG_ICON_HEIGHT = 24; - static DIALOG_ICON_MARGIN_TOP = 23; - - // label text of dialog - static DIALOG_LABEL_FONT_SIZE = 10; - static DIALOG_LABEL_MARGIN_TOP = 2; - static DIALOG_LABEL_LINE_HEIGHT = 14; - - // request text of dialog - static DIALOG_REQ_FONT_SIZE = 16; - static DIALOG_REQ_MARGIN_TOP = 16; - static DIALOG_REQ_MARGIN_LEFT = 24; - static DIALOG_REQ_LINE_HEIGHT = 22; - - // description text of dialog - static DIALOG_DESP_FONT_SIZE = 14; - static DIALOG_DESP_MARGIN_TOP = 2; - static DIALOG_DESP_MARGIN_LEFT = 24; - static DIALOG_DESP_MARGIN_RIGHT = 24; - static DIALOG_DESP_MARGIN_BOTTOM = 8; - static DIALOG_DESP_LINE_HEIGHT = 19; - - static BUTTON_FONT_SIZE = 16; - static BUTTON_DIVIDER_FONT_SIZE = 24; - static BUTTON_MARGIN_TOP = 8; - static BUTTON_MARGIN_BOTTOM = 16; - static BUTTON_MARGIN_LEFT = 16; - static BUTTON_MARGIN_RIGHT = 16; - static BUTTON_HEIGHT = 40; - static BUTTON_WIDTH = 177; - - static DIALOG_BORDER_RADIUS = 32; - static DIALOG_HEIGHT = 186; - static DIALOG_WIDTH = 395; - static DIALOG_PADDING_BOTTOM = 16; - - // initial check status - static INIT_NEED_TO_WAIT = 0 - static INIT_NEED_TO_VERIFY = 1 - static INIT_NEED_TO_TERMINATED = 2 - - static RESULT_SUCCESS = 1 - static RESULT_FAILURE = 0 - - // - static SETTING_OPER = -1 - static PASS_OPER = 0 - static DYNAMIC_OPER = 1 - static INVALID_OPER = 2 - - // - static PARMETER_BUNDLE_FLAG = 16 - static INITIAL_INDEX = 10 - - static BUNDLE_NAME = 'com.ohos.permissionmanager' - - static START_SUBSCRIPT = 0 - static END_SUBSCRIPT = 500 -} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/utils.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/utils.ets deleted file mode 100644 index 6c4de00a8..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/utils/utils.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2021-2022 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 - * - * 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. - */ -import { permissionGroups, groups } from "../model/permissionGroup.ets" - -const TAG = 'PermissionManager_Log'; - -export function getPermissionGroup(permission: string) { - for (var i = 0; i < permissionGroups.length; i++) { - if (permissionGroups[i].permissionName == permission) { - if(permissionGroups[i].groupName == 'OTHER') { - return { - "name": permissionGroups[i].groupName, - "groupName": permissionGroups[i].groupName, - "label": permissionGroups[i].label, - "icon": permissionGroups[i].icon, - "description": "", - "permissions": [ - permissionGroups[i].permissionName - ] - } - }else { - return groups[permissionGroups[i].groupId] - } - } - } -} - -export class Log { - static info(log) { - console.info(`Info: ${TAG} ${log}`) - } - - static error(log) { - console.error(`Error: ${TAG} ${log}`) - } -} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/pages/dialogPlus.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/pages/dialogPlus.ets deleted file mode 100644 index 8076ebb45..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/pages/dialogPlus.ets +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2021-2022 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 - * - * 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. - */ - -import { privacyDialog } from "../common/components/dialog.ets" -import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; -import { Log } from '../common/utils/utils.ets' -import { showSubpermissionsGrop } from '../common/model/permissionGroup.ets' - -@Entry -@Component -struct dialogPlusPage { - @State count: number = 0 - @State result: Array = [] - privacyDialogController: CustomDialogController = new CustomDialogController({ - builder: privacyDialog({ cancel: this.privacyCancel, confirm: this.privacyAccept, count:$count, result: $result }), - cancel: this.privacyExist, - autoCancel: false, - alignment: DialogAlignment.Center, - customStyle: true - }) - async privacyAccept(group, accessTokenId, permissionList, userFixedFlag) { - var acManager = abilityAccessCtrl.createAtManager() - var num = 0 - group.permissions.forEach(async permission => { - let result - if(showSubpermissionsGrop.indexOf(group.groupName) == -1) { - result = await acManager.grantUserGrantedPermission(accessTokenId, permission, userFixedFlag) - }else { - if(permissionList.includes(permission)) { - result = await acManager.grantUserGrantedPermission(accessTokenId, permission, userFixedFlag) - } - } - num ++ - Log.info("grant permission result:" + result + "permission" + permission) - if (result == abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED) { - permissionList.forEach((req, idx) => { - if(req == permission) { - this.result[idx] = abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED; - } - }) - Log.info("grant permission success:" + permission) - } else { - Log.error("failed to grant permission:" + permission + " ret:" + result) - } - if(num == group.permissions.length) { - this.count ++ - } - }) - } - async privacyCancel(group, accessTokenId, permissionList, userFixedFlag) { - var acManager = abilityAccessCtrl.createAtManager() - group.permissions.forEach(async permission => { - let result - if(showSubpermissionsGrop.indexOf(group.groupName) == -1) { - result = await acManager.revokeUserGrantedPermission(accessTokenId, permission, userFixedFlag) - }else { - if(permissionList.includes(permission)) { - result = await acManager.revokeUserGrantedPermission(accessTokenId, permission, userFixedFlag) - } - } - Log.info("revoke permission result:" + result + "permission" + permission); - }) - this.count ++ - } - privacyExist() { - Log.info("exist") - } - aboutToAppear() { - this.privacyDialogController.open() - } - build() { - } -} - diff --git a/frameworks/com.ohos.permissionmanager/build.gradle b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/MainAbility.ts similarity index 35% rename from frameworks/com.ohos.permissionmanager/build.gradle rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/MainAbility.ts index 35a87ae70..fd4781d89 100644 --- a/frameworks/com.ohos.permissionmanager/build.gradle +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/MainAbility.ts @@ -13,37 +13,43 @@ * limitations under the License. */ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -apply plugin: 'com.huawei.ohos.app' - -//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 -ohos { - compileSdkVersion 8 - supportSystem "standard" -} - -buildscript { - repositories { - maven { - url 'https://repo.huaweicloud.com/repository/maven/' - } - maven { - url 'https://developer.huawei.com/repo/' - } +import Ability from '@ohos.application.Ability'; + +var TAG = "PermissionManager_MainAbility:"; + +export default class MainAbility extends Ability { + onCreate(want, launchParam) { + console.log(TAG + "MainAbility onCreate, ability name is " + want.abilityName + "."); + globalThis.context = this.context; } - dependencies { - classpath 'com.huawei.ohos:hap:3.0.5.2' - classpath 'com.huawei.ohos:decctest:1.2.7.2' + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log(TAG + "MainAbility onWindowStageCreate."); + + globalThis.context = this.context; + + windowStage.setUIContent(this.context, "pages/authority-management", null); + } + + onForeground() { + // Ability has brought to foreground + console.log(TAG + "MainAbility onForeground."); } -} - -allprojects { - repositories { - maven { - url 'https://repo.huaweicloud.com/repository/maven/' - } - maven { - url 'https://developer.huawei.com/repo/' - } + + onBackground() { + // Ability has back to background + console.log(TAG + "MainAbility onBackground."); + +// this.context.terminateSelf(); + } + + onDestroy() { + console.log(TAG + "MainAbility onDestroy."); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + console.log(TAG + "MainAbility onWindowStageDestroy."); } -} +}; diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/model/permissionGroup.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/model/permissionGroup.ets deleted file mode 100644 index 027377d25..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/model/permissionGroup.ets +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Copyright (c) 2021-2022 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 - * - * 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. - */ - -export const permissionGroups: any[] = [ - { - "permissionName": "ohos.permission.LOCATION_IN_BACKGROUND", - "groupName": "LOCATION", - "label": "后台定位权限", - "description": "允许应用在后台运行时获取位置信息。", - "groupId": 0 - }, - { - "permissionName": "ohos.permission.LOCATION", - "groupName": "LOCATION", - "label": "前台定位权限", - "description": "允许应用在前台运行时获取位置信息。", - "groupId": 0 - }, - { - "permissionName": "ohos.permission.CAMERA", - "groupName": "CAMERA", - "label": "拍摄照片和录制视频", - "description": "允许应用拍摄照片和视频。", - "groupId": 1 - }, - { - "permissionName": "ohos.permission.MICROPHONE", - "groupName": "MICROPHONE", - "label": "录制音频", - "description": "允许应用打开或关闭录音通路。", - "groupId": 2 - }, - { - "permissionName": "ohos.permission.ANSWER_CALL", - "groupName": "PHONE", - "label": "接听电话", - "description": "允许应用接听电话。", - "groupId": 3 - }, - { - "permissionName": "ohos.permission.MANAGE_VOICEMAIL", - "groupName": "PHONE", - "label": "语音信箱", - "description": "允许应用管理语音信箱。", - "groupId": 3 - }, - { - "permissionName": "ohos.permission.READ_CELL_MESSAGES", - "groupName": "SMS", - "label": "读取小区广播", - "description": "允许应用读取设备接收的小区广播信息。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.READ_MESSAGES", - "groupName": "SMS", - "label": "读取短彩信", - "description": "允许应用读取设备接收的短彩信信息。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.RECEIVE_MMS", - "groupName": "SMS", - "label": "接收彩信", - "description": "允许应用接收彩信。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.RECEIVE_SMS", - "groupName": "SMS", - "label": "接收短信", - "description": "允许应用接收短信。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.RECEIVE_WAP_MESSAGES", - "groupName": "SMS", - "label": "接收WAP消息", - "description": "允许应用接收和处理WAP消息。", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.SEND_MESSAGES", - "groupName": "SMS", - "label": "发送短彩信", - "description": "允许应用发送短彩信", - "groupId": 4 - }, - { - "permissionName": "ohos.permission.READ_CONTACTS", - "groupName": "CONTACTS", - "label": "读取通讯录", - "description": "允许应用读取设备上存储的联系人信息。", - "groupId": 5 - }, - { - "permissionName": "ohos.permission.WRITE_CONTACTS", - "groupName": "CONTACTS", - "label": "新建/修改/删除通讯录", - "description": "允许应用新建/修改/删除设备上存储的联系人信息。", - "groupId": 5 - }, - { - "permissionName": "ohos.permission.READ_CALL_LOG", - "groupName": "CALL_LOG", - "label": "读取通话记录", - "description": "允许应用读取设备上的通话记录信息。", - "groupId": 6 - }, - { - "permissionName": "ohos.permission.WRITE_CALL_LOG", - "groupName": "CALL_LOG", - "label": "新建/修改/删除通话记录", - "description": "允许新建/修改/删除设备上的通话记录信息。", - "groupId": 6 - }, - { - "permissionName": "ohos.permission.MEDIA_LOCATION", - "groupName": "MEDIA", - "label": "允许应用访问拍摄位置", - "description": "应用访问用户媒体文件中的拍摄位置信息如经纬度信息。", - "groupId": 7 - }, - { - "permissionName": "ohos.permission.READ_MEDIA", - "groupName": "MEDIA", - "label": "允许应用读取媒体文件", - "description": "允许应用访问户媒体文件,如视频、音频、图片等。", - "groupId": 7 - }, - { - "permissionName": "ohos.permission.WRITE_MEDIA", - "groupName": "MEDIA", - "label": "允许应用读写媒体文件", - "description": "允许应用读写户媒体文件,如视频、音频、图片等。", - "groupId": 7 - }, - { - "permissionName": "ohos.permission.READ_CALENDAR", - "groupName": "CALENDAR", - "label": "读取日历", - "description": "允许应用读取日历。", - "groupId": 8 - }, - { - "permissionName": "ohos.permission.WRITE_CALENDAR", - "groupName": "CALENDAR", - "label": "新建/修改/删除日历", - "description": "允许应用新建/修改/删除日历。", - "groupId": 8 - }, - { - "permissionName": "ohos.permission.ACTIVITY_MOTION", - "groupName": "SPORT", - "label": "读取用户的运动状态", - "description": "允许应用程序读取用户的运动状态。", - "groupId": 9 - }, - { - "permissionName": "ohos.permission.READ_HEALTH_DATA", - "groupName": "HEALTH", - "label": "读取用户的健康数据", - "description": "允许应用程序读取用户的健康数据。", - "groupId": 10 - }, - { - "permissionName": "ohos.permission.DISTRIBUTED_DATASYNC", - "groupName": "OTHER", - "icon": $r("app.media.ic_multi_device_vector"), - "label": "多设备协同", - "description": "发现并访问其他设备。", - "groupId": 11 - } -]; - -export const groups: any[] = [ - { - "name": "LOCATION", - "groupName": "位置信息", - "icon": $r('app.media.ic_public_gps'), - "description": "访问您的位置信息", - "permissions": [ - "ohos.permission.LOCATION_IN_BACKGROUND", - "ohos.permission.LOCATION" - ], - "isShow":true - }, - { - "name": "CAMERA", - "groupName": "相机", - "icon": $r('app.media.ic_public_camera'), - "description": "访问您的相机", - "permissions": [ - "ohos.permission.CAMERA" - ], - "isShow":true - }, - { - "name": "MICROPHONE", - "groupName": "麦克风", - "icon": $r('app.media.ic_public_voice'), - "description": "访问您的麦克风", - "permissions": [ - "ohos.permission.MICROPHONE" - ], - "isShow":true - }, - { - "name": "PHONE", - "groupName": "电话", - "icon": $r('app.media.ic_public_phone'), - "description": "拨打电话和管理通话", - "permissions": [ - "ohos.permission.ANSWER_CALL", - "ohos.permission.MANAGE_VOICEMAIL" - ], - "isShow":false - }, - { - "name": "SMS", - "groupName": "信息", - "icon": $r('app.media.ic_public_message'), - "description": "发送和查看短信", - "permissions": [ - "ohos.permission.READ_CELL_MESSAGES", - "ohos.permission.READ_MESSAGES", - "ohos.permission.RECEIVE_MMS", - "ohos.permission.RECEIVE_SMS", - "ohos.permission.RECEIVE_WAP_MESSAGES", - "ohos.permission.SEND_MESSAGES" - ], - "isShow":false - }, - { - "name": "CONTACTS", - "groupName": "通讯录", - "icon": $r('app.media.ic_public_contacts_group'), - "description": "访问您的通讯录", - "permissions": [ - "ohos.permission.READ_CONTACTS", - "ohos.permission.WRITE_CONTACTS" - ], - "isShow":false - }, - { - "name": "CALL_LOG", - "groupName": "通话记录", - "icon": $r('app.media.ic_call_logs'), - "description": "读取和写入手机通话记录", - "permissions": [ - "ohos.permission.READ_CALL_LOG", - "ohos.permission.WRITE_CALL_LOG" - ], - "isShow":false - }, - { - "name": "MEDIA", - "groupName": "媒体和文件", - "icon": $r('app.media.ic_public_folder'), - "description": "访问您的媒体和文件", - "permissions": [ - "ohos.permission.MEDIA_LOCATION", - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA" - ], - "isShow":true - }, - { - "name": "CALENDAR", - "groupName": "日历", - "icon": $r('app.media.ic_public_calendar'), - "description": "访问日历和活动", - "permissions": [ - "ohos.permission.READ_CALENDAR", - "ohos.permission.WRITE_CALENDAR" - ], - "isShow":true - }, - { - "name": "SPORT", - "groupName": "健身运动", - "icon": $r('app.media.ic_sport'), - "description": "访问您的运动状态", - "permissions": [ - "ohos.permission.ACTIVITY_MOTION" - ], - "isShow":true - }, - { - "name": "HEALTH", - "groupName": "身体传感器", - "icon": $r('app.media.ic_ssensor'), - "description": "访问您的健康数据", - "permissions": [ - "ohos.permission.READ_HEALTH_DATA" - ], - "isShow":true - }, - { - "name": "OTHER", - "groupName": "其他权限", - "icon": $r('app.media.ic_more'), - "description": "访问您的其它权限", - "permissions": [ - "ohos.permission.DISTRIBUTED_DATASYNC" - ], - "isShow":false - } -]; - -export const permissionGroupPermissions: object = { - "LOCATION": ["ohos.permission.LOCATION_IN_BACKGROUND","ohos.permission.LOCATION"], - "CAMERA": ["ohos.permission.CAMERA"], - "MICROPHONE": ["ohos.permission.MICROPHONE"], - "PHONE": ["ohos.permission.ANSWER_CALL","ohos.permission.MANAGE_VOICEMAIL"], - "SMS": ["ohos.permission.READ_CELL_MESSAGES", "ohos.permission.READ_MESSAGES", "ohos.permission.RECEIVE_MMS", "ohos.permission.RECEIVE_SMS", "ohos.permission.RECEIVE_WAP_MESSAGES", "ohos.permission.SEND_MESSAGES"], - "CONTACTS": ["ohos.permission.READ_CONTACTS", "ohos.permission.WRITE_CONTACTS"], - "CALL_LOG": ["ohos.permission.READ_CALL_LOG", "ohos.permission.WRITE_CALL_LOG"], - "MEDIA": ["ohos.permission.MEDIA_LOCATION", "ohos.permission.READ_MEDIA", "ohos.permission.WRITE_MEDIA"], - "CALENDAR": ["ohos.permission.READ_CALENDAR", "ohos.permission.WRITE_CALENDAR"], - "SPORT": ["ohos.permission.ACTIVITY_MOTION"], - "HEALTH": ["ohos.permission.READ_HEALTH_DATA"], - "OTHER": ["ohos.permission.DISTRIBUTED_DATASYNC"] -}; - - -export const userGrantPermissions: string[] = [ - "ohos.permission.LOCATION_IN_BACKGROUND", - "ohos.permission.LOCATION", - "ohos.permission.CAMERA", - "ohos.permission.MICROPHONE", - "ohos.permission.ANSWER_CALL", - "ohos.permission.MANAGE_VOICEMAIL", - "ohos.permission.READ_CELL_MESSAGES", - "ohos.permission.READ_MESSAGES", - "ohos.permission.RECEIVE_MMS", - "ohos.permission.RECEIVE_SMS", - "ohos.permission.RECEIVE_WAP_MESSAGES", - "ohos.permission.SEND_MESSAGES", - "ohos.permission.READ_CONTACTS", - "ohos.permission.WRITE_CONTACTS", - "ohos.permission.READ_CALL_LOG", - "ohos.permission.WRITE_CALL_LOG", - "ohos.permission.MEDIA_LOCATION", - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA", - "ohos.permission.READ_CALENDAR", - "ohos.permission.WRITE_CALENDAR", - "ohos.permission.ACTIVITY_MOTION", - "ohos.permission.READ_HEALTH_DATA", - "ohos.permission.DISTRIBUTED_DATASYNC" -]; - -export const permissionDescriptions: object = { - "位置信息": "允许应用在后台运行时获取位置信息。" , - "相机": "允许应用拍摄照片和视频。" , - "麦克风": "允许应用打开或关闭录音通路。" , - "电话": "允许应用接听电话。" , - "信息": "允许应用发送短彩信。" , - "通讯录": "允许应用新建/修改/删除设备上存储的联系人信息。" , - "通话记录": "允许新建/修改/删除设备上的通话记录信息。" , - "媒体和文件": "允许应用访问户媒体文件,如视频、音频、图片等。" , - "日历": "允许应用新建/修改/删除日历。" , - "健身运动": "允许应用程序读取用户的运动状态。" , - "身体传感器": "允许应用程序读取用户的健康数据。" , - "其他权限": "允许应用与远程设备交换用户数据(如图片、音乐、视频、及应用数据等)。" -}; - -export const permissionPermissionGroup: object = { - "ohos.permission.LOCATION_IN_BACKGROUND": "LOCATION", - "ohos.permission.LOCATION": "LOCATION", - "ohos.permission.CAMERA": "CAMERA", - "ohos.permission.MICROPHONE": "MICROPHONE", - "ohos.permission.ANSWER_CALL": "PHONE", - "ohos.permission.MANAGE_VOICEMAIL": "PHONE", - "ohos.permission.READ_CELL_MESSAGES": "SMS", - "ohos.permission.READ_MESSAGES": "SMS", - "ohos.permission.RECEIVE_MMS": "SMS", - "ohos.permission.RECEIVE_SMS": "SMS", - "ohos.permission.RECEIVE_WAP_MESSAGES": "SMS", - "ohos.permission.SEND_MESSAGES": "SMS", - "ohos.permission.READ_CONTACTS": "CONTACTS", - "ohos.permission.WRITE_CONTACTS": "CONTACTS", - "ohos.permission.READ_CALL_LOG": "CALL_LOG", - "ohos.permission.WRITE_CALL_LOG": "CALL_LOG", - "ohos.permission.MEDIA_LOCATION": "MEDIA", - "ohos.permission.READ_MEDIA": "MEDIA", - "ohos.permission.WRITE_MEDIA": "MEDIA", - "ohos.permission.READ_CALENDAR": "CALENDAR", - "ohos.permission.WRITE_CALENDAR": "CALENDAR", - "ohos.permission.ACTIVITY_MOTION": "SPORT", - "ohos.permission.READ_HEALTH_DATA": "HEALTH", - "ohos.permission.DISTRIBUTED_DATASYNC": "OTHER" -}; - -export const permissionGroupIds: object = { - "ohos.permission.LOCATION_IN_BACKGROUND": "0", - "ohos.permission.LOCATION": "0", - "ohos.permission.CAMERA": "1", - "ohos.permission.MICROPHONE": "2", - "ohos.permission.ANSWER_CALL": "3", - "ohos.permission.MANAGE_VOICEMAIL": "3", - "ohos.permission.READ_CELL_MESSAGES": "4", - "ohos.permission.READ_MESSAGES": "4", - "ohos.permission.RECEIVE_MMS": "4", - "ohos.permission.RECEIVE_SMS": "4", - "ohos.permission.RECEIVE_WAP_MESSAGES": "4", - "ohos.permission.SEND_MESSAGES": "4", - "ohos.permission.READ_CONTACTS": "5", - "ohos.permission.WRITE_CONTACTS": "5", - "ohos.permission.READ_CALL_LOG": "6", - "ohos.permission.WRITE_CALL_LOG": "6", - "ohos.permission.MEDIA_LOCATION": "7", - "ohos.permission.READ_MEDIA": "7", - "ohos.permission.WRITE_MEDIA": "7", - "ohos.permission.READ_CALENDAR": "8", - "ohos.permission.WRITE_CALENDAR": "8", - "ohos.permission.ACTIVITY_MOTION": "9", - "ohos.permission.READ_HEALTH_DATA": "10", - "ohos.permission.DISTRIBUTED_DATASYNC": "11" -}; - -export const orderGroup: string[] = [ - "位置信息", - "相机", - "麦克风", - "电话", - "信息", - "通讯录", - "通话记录", - "媒体和文件", - "日历", - "健身运动", - "身体传感器", - "其他权限" -]; - -export const otherPermissionsLabel: object = { - "ohos.permission.DISTRIBUTED_DATASYNC": "多设备协同" -}; - -export const noNeedDisplayApp: string[] = [ - "com.ohos.launcher" -]; - -export const showSubpermissionsGrop: string[] = [ - "电话", - "日历", - "信息", - "通讯录", - "通话记录" -]; diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets deleted file mode 100644 index 631a48858..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/constant.ets +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 2021-2022 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 - * - * 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. - */ - -export default class Constants { - // alphabetIndexer - static ALPHABETINDEXER_SELECTEDFONT_SIZE = 12; - static ALPHABETINDEXER_POPUPFONT_SIZE = 30; - static ALPHABETINDEXER_ITEMSIZE = 16; - static ALPHABETINDEXER_HEIGHT = 448; - static ALPHABETINDEXER_WIDTH = 36; - - // backBar - static BACKBAR_HEIGHT = 56; - static BACKBAR_MINHEIGHT = 56; - - // image of backBar - static BACKBAR_IMAGE_HEIGHT = 24; - static BACKBAR_IMAGE_WIDTH = 24; - static BACKBAR_IMAGE_MARGIN_TOP = 17; - static BACKBAR_IMAGE_MARGIN_LEFT = 12; - static BACKBAR_IMAGE_MARGIN_RIGHT = 15; - - // text of backBar - static BACKBAR_TEXT_FONT_SIZE = 20; - static BACKBAR_TEXT_FLEX_GROW = 1; - static BACKBAR_TEXT_MARGIN_TOP = 17; - - // dialog - static DIALOG_BORDER_RADIUS = 24; - static DIALOG_HEIGHT = 70; - static DIALOG_WIDTH = 336; - - // text of dialog - static DIALOG_TEXT_FONT_SIZE = 20; - static DIALOG_TEXT_MARGIN_TOP = 25; - - // search textInput - static TEXTINPUT_PADDING_LEFT = 36; - static TEXTINPUT_BORDER_RADIUS = 20; - static TEXTINPUT_BORDER_WIDTH = 1.5; - static TEXTINPUT_PLACEHOLDER_Font_SIZE = 16; - static TEXTINPUT_HEIGHT = 40; - static TEXTINPUT_IMAGE_WIDTH = 16; - static TEXTINPUT_IMAGE_HEIGHT = 16; - static TEXTINPUT_IMAGE_MARGIN_LEFT = 12; - static TEXTINPUT_IMAGE_MARGIN_TOP = 12; - - // grid useSizeType - static GRID_MARGIN = '0vp'; - static GUTTER = 0; - static LEFT_XS_SPAN = 0; - static LEFT_XS_OFFSET = 0; - static LEFT_SM_SPAN = 0; - static LEFT_SM_OFFSET = 0; - static LEFT_MD_SPAN = 0; - static LEFT_MD_OFFSET = 0; - static LEFT_LG_SPAN = 2; - static LEFT_LG_OFFSET = 0; - static MIDDLE_XS_SPAN = 2; - static MIDDLE_XS_OFFSET = 0; - static MIDDLE_SM_SPAN = 4; - static MIDDLE_SM_OFFSET = 0; - static MIDDLE_MD_SPAN = 8; - static MIDDLE_MD_OFFSET = 0; - static MIDDLE_LG_SPAN = 8; - static MIDDLE_LG_OFFSET = 2; - static RIGHT_XS_SPAN = 0; - static RIGHT_XS_OFFSET = 2; - static RIGHT_SM_SPAN = 0; - static RIGHT_SM_OFFSET = 4; - static RIGHT_MD_SPAN = 0; - static RIGHT_MD_OFFSET = 8; - static RIGHT_LG_SPAN = 2; - static RIGHT_LG_OFFSET = 10; - - // 100% width,height - static FULL_WIDTH = '100%'; - static FULL_HEIGHT = '100%'; - - // public property style - static PERMISSION = 1; - static APPLICATION = 0; - static LAYOUT_WEIGHT = 1; - static FLEX_GROW = 1; - static TEXT_DECORATION_HEIGHT = 1; - static TEXT_MIDDLE_FONT_SIZE = 16; - static TEXT_SMAL_FONT_SIZE = 14; - static TEXT_SMALLER_FONT_SIZE = 12; - static TEXT_LINE_HEIGHT = 22; - static TEXT_SMALL_LINE_HEIGHT = 19; - static CONSTRAINTSIZE_MINHEIGHT = 48; - static LISTITEM_ROW_HEIGHT = 48; - static LISTITEM_PADDING_LEFT = 24; - static LISTITEM_PADDING_LEFT_RECORD = 32; - static LISTITEM_MARGIN_BOTTOM = 12; - static LISTITEM_MARGIN_BOTTOM_PERMISSION = 14; - static LISTITEM_MARGIN_BOTTOM_APPLICATION = 18; - static LISTITEM_HEIGHT_PERMISSION = 72; - static LISTITEM_HEIGHT_APPLICATION = 80; - static LIST_PADDING_LEFT = 12 - static LISTITEM_PADDING_RIGHT = 24; - static IMAGE_HEIGHT = 24; - static IMAGE_WIDTH = 12; - static IMAGE_HEIGHT_RECORD = 12; - static IMAGE_WIDTH_RECORD = 24; - static IMAGE_HEIGHT_RECORD_APPLICATION = 16; - static IMAGE_WIDTH_RECORD_APPLICATION = 16; - static BORDER_RADIUS = 24; - static TITLE_MARGIN_BOTTOM = 16; - - // application-secondary, authority-secondary - static FLEX_MARGIN_TOP = 8; - static FLEX_MARGIN_BOTTOM = 8; - static LIST_PADDING_TOP = 4; - static LIST_PADDING_BOTTOM = 4; - static LIST_MARGIN_BOTTOM = 12; - static ROW_MARGIN_TOP = 9; - static SECONDARY_TEXT_MARGIN_TOP = 19.5; - static SECONDARY_TEXT_MARGIN_LEFT = 24; - static SECONDARY_LIST_PADDING_LEFT = 12; - static SECONDARY_LIST_PADDING_RIGHT = 12; - - // application-tertiary - static TERTIARY_IMAGE_WIDTH = 64; - static TERTIARY_IMAGE_HEIGHT = 64; - static TERTIARY_IMAGE_MARGIN_LEFT = 12; - static TERTIARY_IMAGE_MARGIN_RIGHT = 12; - static TERTIARY_LABEL_MARGIN_BOTTOM = 2; - static TERTIARY_MARGIN_LEFT = 12; - static TERTIARY_TEXT_MARGIN_LEFT = 24; - static TERTIARY_HALF_WIDTH = '50%'; - static TERTIARY_ROW_MARGIN_TOP = 24; - static TERTIARY_PERMISSION_ROW_MARGIN_TOP = 12; - static TERTIARY_RADIO_IMAGE_WIDTH = 24; - static TERTIARY_RADIO_IMAGE_HEIGHT = 24; - static TERTIARY_RADIO_IMAGE_MARGIN_TOP = 4; - static TERTIARY_LISTITEM_PADDING_LEFT = 24; - static TERTIARY_LISTITEM_PADDING_RIGHT = 24; - static TERTIARY_LISTITEM_MARGIN_TOP = 1; - static TERTIARY_LIST_PADDING_LEFT = 12; - static TERTIARY_LIST_PADDING_RIGHT = 12; - static TERTIARY_LIST_PADDING_TOP = 3; - static TERTIARY_LIST_PADDING_BOTTOM = 4; - - // authority-tertiary - static AUTHORITY_IMAGE_WIDTH = 40; - static AUTHORITY_IMAGE_HEIGHT = 40; - static AUTHORITY_IMAGE_MARGIN_RIGHT = 16; - static AUTHORITY_TOGGLE_WIDTH = 36; - static AUTHORITY_TOGGLE_HEIGHT = 20; - static AUTHORITY_ROW_HEIGHT = 72; - static AUTHORITY_CONSTRAINTSIZE_MINHEIGHT = 72; - static AUTHORITY_LISTITEM_PADDING_LEFT = 12; - static AUTHORITY_LISTITEM_PADDING_RIGHT = 12; - static AUTHORITY_TEXTINPUT_PADDING_LEFT = 12; - static AUTHORITY_TEXTINPUT_PADDING_RIGHT = 24; - static AUTHORITY_TEXT_MARGIN_TOP = 24; - static AUTHORITY_TEXT_MARGIN_LEFT = 0; - static AUTHORITY_ROW_MARGIN_TOP = 24; - static SEARCHNORESULT_IMAGE_WIDTH = 200; - static SEARCHNORESULT_IMAGE_HEIGHT = 200; - static AUTHORITY_COLUMN_HEIGHT = '95%'; - static AUTHORITY_ALPHABETINDEX_WIDTH = 24; - static AUTHORITY_ALPHABETINDEX_PADDING_TOP = 16; - static AUTHORITY_TEXT_DECORATION_WIDTH = '86%'; - static AUTHORITY_TEXT_DECORATION_MARGIN_LEFT = 53; - - // authority-management - static MANAGEMENT_IMAGE_WIDTH = 24; - static MANAGEMENT_IMAGE_HEIGHT = 24; - static MANAGEMENT_IMAGE_MARGIN_RIGHT = 16; - static MANAGEMENT_IMAGE_MARGIN_RIGHT_RECORD = 24; - static MANAGEMENT_IMAGE_MARGIN_LEFT = 8; - static MANAGEMENT_ROW_HEIGHT = 56; - static MANAGEMENT_TEXT_DECORATION_WIDTH = '95%'; - static MANAGEMENT_TEXT_DECORATION_MARGIN_LEFT = 40; - static MANAGEMENT_LODING_IMAGE_WIDTH = 48; - static MANAGEMENT_LODING_IMAGE_HEIGHT = 48; - static MANAGEMENT_LODING_ROW_HEIGHT = '90%'; - static MANAGEMENT_ROW_PADDING_LEFT = 12; - static MANAGEMENT_ROW_PADDING_RIGHT = 12; - static MANAGEMENT_ROW_PADDING_TOP = 8; - static MANAGEMENT_ROW_MARGIN_TOP = 12; - static MANAGEMENT_TRANSPARENCY = 0.8; - static APPLICATION_IMAGE_WIDTH = 40; - static APPLICATION_IMAGE_HEIGHT = 40; - static APPLICATION_IMAGE_MARGIN_RIGHT = 16; - static APPLICATION_TEXT_MARGIN_RIGHT = 4; - static APPLICATION_LIST_PADDING_LEFT = 12; - static APPLICATION_LIST_PADDING_RIGHT = 12; - static APPLICATION_LIST_MARGIN_BOTTOM = 50; - static APPLICATION_LISTITEM_PADDING_LEFT = 12; - static APPLICATION_LISTITEM_PADDING_RIGHT = 12; - static APPLICATION_TEXTINPUT_PADDING_LEFT = 12; - static APPLICATION_TEXTINPUT_PADDING_TOP = 8; - static APPLICATION_TEXTINPUT_PADDING_RIGHT = 24; - static APPLICATION_COLUMN_HEIGHT = '93%'; - static APPLICATION_ALPHABETINDEX_MARGIN_TOP = 12; - static APPLICATION_ALPHABETINDEX_WIDTH = 24; - static APPLICATION_TEXT_DECORATION_WIDTH = '90%'; - static APPLICATION_TEXT_DECORATION_MARGIN_LEFT = 68; - - // slice - static SLICE_START = 0; - static SLICE_END = -1; - static SLICE_START_INDEX = 0; - static SLICE_END_INDEX = 1; - - //group number - static FIXED_GROUP = 1; - static CHANGE_GROUP = 2; - static OTHER_GROUP = 3; - - // tabBar - static BAR_WIDTH = 285; - - // setTimeout - static DELAY_TIME = 1000; - static DELAY_TIME_MAX = 2000; - - // radio - static RADIO_ALLOW_NAME = '允许'; - static RADIO_ALLOW_INDEX = 0; - static RADIO_ALLOW_GROUP_NAME = 'radio'; - static RADIO_BAN_NAME = '禁止'; - static RADIO_BAN_INDEX = 1; - static RADIO_BAN_GROUP_NAME = 'radio'; - - //shape - static SHAPE_DIA = 24; - static SHAPE_BAN_DIA = 23; - static SHAPE_BIG_DIA = 48; - static SHAPE_OFFSET_X = -24; - static SHAPE_BAN_OFFSET = .5; - static SHAPE_ALLOW_DIA = 16; - static SHAPE_ALLOW_OFFSET = 4; - static SHAPE_ZINDEX = 10; - - // utils - static CHAR_CODE = 0; - static UNI_MAX = 40869; - static UNI_MIN = 19968; - - static PARMETER_BUNDLE_FLAG = 16; - static USERID = 100; - - static PERMISSION_INDEX = 0; - - static PERMISSION_NUM = 0; - - static PERMISSION_FLAG = 2; - static API_VERSION_SUPPORT_STAGE = 9; - - static PRE_AUTHORIZATION_NOT_MODIFIED = 4; - - static BUNDLE_NAME = 'com.ohos.permissionmanager' - - static START_SUBSCRIPT = 0 - static END_SUBSCRIPT = 500 -} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/media/icon_actived.png b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/media/icon_actived.png deleted file mode 100644 index 49991d108d51f1803ff3dcadc8870d69977908e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1671 zcmV;226*|2P)FV00001b5ch_0Itp) z=>Px*K}keGRA>e5S!-++RS=%p`$R&uO$0?K@<;FU50F43#8!FH$C>oSPVef0lnOn9!yL?k)bY zlich%XJ)=L-`PE{xd1~lGy)Zk09NF!I8R=jnN~1h5t7wF0HYD`URIChUy|$H{Om@e zE=1#OEQb5qTas;xd)dW`2ux|pOwALmVUWc{biYm%Oz<2U&_ZBr>u62>sN<{JmPKI7 zQW{sV%nby%8i))PP``|XNZS*M^joKPV3)4H7J*qWQ=;c`W+M>10YE9;&VudHWFng< zj!kd)Y71t9Z3ncG2~2OIktUftiQusT_rWhA!r?Tgn|^A=%TdrH5vXs@&dB8pyBV-H z3TUM^hSP#JC;^$M1&a<7(1obKcl)6dgZvN)S1p(Y5W|xm@8*@bTix=L1j@xnVigX0w@}`9-FE{Cu158;P)XWgO~iozNX!1Y17K z!*7>4ByGV=GMTC?wNI3M1KF(kemTKERFAM}eZmvG#4ChECpP**sa(!{uauvMKwVSz z0RViylyOj7)o_5UC@_qP(A*odvJ$gW@CoM~|Tc?cj_t9bOahiT>f7zY;aCN?YB zR$KVUk}J?lZa)tJvY^>*6s10MvIol7ZI*_u3W5ZS)Vh=%y~>Wu>+g8CQIvYkUE!l| zVq328Y9u$kesK`suefXi7cLQe{&jd@Vk5TY3dbnd z)P8ZV+GF}PWfWSzEx=#@5Ug1egWK%law*Sxs~te6*r>MG}VuSOt*gq-|VFW?D(pa2Js=+6hqEvdMUHvnYt z9W*-V2tJgpdm#=F);Sh46~AOzh`zEc4s)kluz7nPu4&8-NsOtWj-I))S5*d;t9hnu zd^MpRyoxEr1w*i+ie&XvThBYMTWs>48hjp-WAO*CCty4$5C=ofT_kw(qa5V&!Dy1r z>)4Z?pjtWJfGGGN{iSM9s{G=j*q{Y3_%aZJ877j7blZ3cBx3k6Ao@;(T3*}dH->lS z?kKD-n1byuJbgKj>ehP*w6~;A@oMy`+t98*_jC+`y0PtapMojaej@qPQb}MB0RiAd z>pOg{lwH{&!*~yz!^`0962X=}yn?1Af4%Ll3yp11y!|75XxHuMgfR%RVcjkfZ0W-- zlJqT=kq|rI;j9{&dYhpRsbHr%3AXOagH`@vQiXGr1yiu44^<@DD;aCGO)Y!rDq2bF zUC)|Fxv5rZhS{7NS-&a)>57hh1Bhl8VAHl79Buame}OaAbAmF}fdr%rxhLoI)jJ?@JtrFrf6^Q46;1&%@t6P9sU~#tdu>%TR|B5ZGddT9Uja@}v{_ zn_c=;3?wU&^37m6gUjRqj`NXw7vCQ`e|3)fEz7P%Jhmh(GcC4}2#DdWKR8;MM5EN* zlH}lp#LOuOqiPUp_`FkdXCM5Ps{~hi2>!T2aQrm?IQT4+C?)K1Xm~QctZfJWSxWD2 zi%dWqC1Wi~Um{$`d$#Mq?1t8@^Rmq=pDZ57wxSO`FQyg&+r2OOEBRANLF#AmY@Fhg zcYWD7W$*D@DjoK&N?8PK49TNPDpIm}VFy6l$9~GeOwL_$bdlZPZr6QQL_qCKRx3%2 zNp6Y%H|1P(ap@hyS5)~l diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/media/icon_normal.png b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/media/icon_normal.png deleted file mode 100644 index cdf5bb49392dfce97ea9fa1be0ace95715903498..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1107 zcmV-Z1g!gsP)FV00001b5ch_0Itp) z=>Px(4M{{nRA>e5n0ap$F$~4aeUm-VoFq@wM0-OltrqH0TZSvN#0@VoM~bD%1vm{Dyc`;;+DIJsyeV{HnoTx+s1Sf0PCr5&%v=7LS&UP52$Z z*kA9(>`IgZAZ?iWgLGcQEkJso7pYXedmG^QYJX_5_njI(5*O8Yo@wNDq5~F2SEP;+(+SVs)*T4rP1S)9qVdJE{wT)CR!{qW@M*z|vUYcuVRq0H<>a$an#k^r%Xm{pbbI;yi=X6ZNeq z-vf|AwgnwMF94Rg1vMvhjcn`-O=AKZ0O`XfY(Y(0)X2uZ;9HVLHUJKeR@9Wq8d>X4 zvI;f;Tl%bW?)R76NAs;l)~M!Jpf!CM4NeXfaA{ z=9stkVp{}6TEVL#`=!&I>0JrQ3fSI-bATBf3iNM@^iOuib2dUSoT}`Xn$_TjMtUw_ z2d$YAW}DWT8&fOL#YS%BtnH+V*#Ovd$r4%Z0Iu;07#>~jCWLQNZ;M`KK)$9*VXFq%_I$#ZEzgiAj2xR~*HIYLZae1OSKb)(P;POt=Rjp{Iu_8i>FkTF1{i(>LxriO} z1ZaUd_4rF8b{4}NDCm1juGfQsofo3LBQW+8kxsT3u~WT5`oNL@K#bEV$P)n7gHv^= zJ!YKLpk!Oe^=gstn|gMt4j*F-9S|KZ68FWv)&X1W4Tvo5LAZRdcW9@1vZBz<>E*X) zdLmmyO#m39YVpq+r)I6LRI(r-Dj(&tFSw3@RwqcM4UsN%3hc=UXOCMda|5&n5NvXB zAqXm!w?BfM_rzKHF7^SZe-p+A5D!W){4vI+CK$*bARWl(K%B+#W~Ze)W1fL|2L6{B Z_ye>Cr2VxM_(lK#002ovPDHLkV1jHc1@-^{ diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/properties/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/properties/string.json deleted file mode 100644 index 127f01aeb..000000000 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/default/properties/string.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "strings": { - "app_name": "CategoryPage", - "describe": "describe", - "category": "Category", - "itemChild": "ItemChild", - "item": "Item", - "search": "search...", - "you_search": "You search ", - "you_clicked": "You clicked ", - "tab": "Tab", - "more": "more >" - }, - "colors": { - "colorSubBackground": "#f1f3f5", - "appbar_subtitle_color": "#99000000", - "text_color": "#000000" - } -} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts new file mode 100644 index 000000000..9f39d3a15 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2021-2022 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 + * + * 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. + */ + +import extension from '@ohos.application.ServiceExtensionAbility'; +import window from '@ohos.window'; +import display from '@ohos.display'; + +var TAG = "PermissionManager_Log:"; + +export default class ServiceExtensionAbility extends extension { + /** + * Lifecycle function, called back when a service extension is started for initialization. + */ + onCreate(want) { + console.info(TAG + "ServiceExtensionAbility onCreate, ability name is " + want.abilityName); + + globalThis.extensionContext = this.context; + globalThis.windowNum = 0 + } + + /** + * Lifecycle function, called back when a service extension is started or recall. + */ + onRequest(want, startId) { + globalThis.abilityWant = want + console.info(TAG + "ServiceExtensionAbility onRequest. start id is " + startId); + console.info(TAG + "want: " + JSON.stringify(want)) + + display.getDefaultDisplay().then(dis => { + let navigationBarRect = { + left: 0.5 * dis.width - 395, + top: 0.5 * dis.height - 500, + width: 790, + height: 1000 + } + this.createWindow("permissionDialog" + startId, window.WindowType.TYPE_DIALOG, navigationBarRect) + }) + } + + /** + * Lifecycle function, called back before a service extension is destroyed. + */ + onDestroy() { + console.info(TAG + "ServiceExtensionAbility onDestroy."); + } + + private async createWindow(name: string, windowType: number, rect) { + console.info(TAG + "create window") + try { + const win = await window.create(globalThis.extensionContext, name, windowType) + globalThis.extensionWin = win + await win.bindDialogTarget(globalThis.abilityWant.parameters['ohos.ability.params.token'].value, () => { + win.destroy() + globalThis.windowNum -- + if(globalThis.windowNum == 0) this.context.terminateSelf() + }) + await win.moveTo(rect.left, rect.top) + await win.resetSize(rect.width, rect.height) + await win.loadContent('pages/dialogPlus') + await win.setBackgroundColor('#00000000') + await win.show() + globalThis.windowNum ++ + } catch { + console.info(TAG + "window create failed!") + } + } +}; \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/alphabeticalIndex.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/alphabeticalIndex.ets similarity index 98% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/alphabeticalIndex.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/alphabeticalIndex.ets index e87fd9eab..a8270d1ee 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/alphabeticalIndex.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/alphabeticalIndex.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Constants from '../utils/constant.ets'; +import Constants from '../utils/constant'; @Component export struct alphabetIndexerComponent { diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/backBar.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/backBar.ets similarity index 95% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/backBar.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/backBar.ets index 4e1f3f416..2be57896c 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/backBar.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/backBar.ets @@ -15,7 +15,7 @@ import router from '@system.router'; import Resmgr from '@ohos.resourceManager' -import Constants from '../utils/constant.ets'; +import Constants from '../utils/constant'; @Component export struct backBar { @@ -68,7 +68,7 @@ export struct backBar { } aboutToAppear() { - Resmgr.getResourceManager(Constants.BUNDLE_NAME).then(item => { + Resmgr.getResourceManager(globalThis.context, Constants.BUNDLE_NAME).then(item => { item.getString($r("app.string.permission_access_record").id, (err, val) => { this.record = val }) diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/dialog.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/dialog.ets similarity index 96% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/dialog.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/dialog.ets index aecf0cf5f..8e86dd6ab 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/dialog.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/dialog.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Constants from '../utils/constant.ets'; +import Constants from '../utils/constant'; @CustomDialog export struct authorizeDialog { diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/search.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/search.ets similarity index 98% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/search.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/search.ets index 585968a91..72fa15f01 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/components/search.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/components/search.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Constants from '../utils/constant.ets'; +import Constants from '../utils/constant'; @Component export struct textInput { diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/model/bundle.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/model/bundle.ets similarity index 100% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/model/bundle.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/model/bundle.ets diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/model/permissionGroup.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/model/permissionGroup.ets new file mode 100644 index 000000000..7ae983ac5 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/model/permissionGroup.ets @@ -0,0 +1,512 @@ +/* + * Copyright (c) 2021-2022 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 + * + * 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. + */ + +export const permissionGroups: any[] = [ + { + "permissionName": "ohos.permission.LOCATION_IN_BACKGROUND", + "groupName": "LOCATION", + "label": "后台定位权限", + "description": "允许应用在后台运行时获取位置信息。", + "groupId": 0 + }, + { + "permissionName": "ohos.permission.LOCATION", + "groupName": "LOCATION", + "label": "前台定位权限", + "description": "允许应用在前台运行时获取位置信息。", + "groupId": 0 + }, + { + "permissionName": "ohos.permission.CAMERA", + "groupName": "CAMERA", + "label": "拍摄照片和录制视频", + "description": "允许应用拍摄照片和视频。", + "groupId": 1 + }, + { + "permissionName": "ohos.permission.MICROPHONE", + "groupName": "MICROPHONE", + "label": "录制音频", + "description": "允许应用打开或关闭录音通路。", + "groupId": 2 + }, + { + "permissionName": "ohos.permission.ANSWER_CALL", + "groupName": "PHONE", + "label": "接听电话", + "description": "允许应用接听电话。", + "groupId": 3 + }, + { + "permissionName": "ohos.permission.MANAGE_VOICEMAIL", + "groupName": "PHONE", + "label": "语音信箱", + "description": "允许应用管理语音信箱。", + "groupId": 3 + }, + { + "permissionName": "ohos.permission.READ_CELL_MESSAGES", + "groupName": "SMS", + "label": "读取小区广播", + "description": "允许应用读取设备接收的小区广播信息。", + "groupId": 4 + }, + { + "permissionName": "ohos.permission.READ_MESSAGES", + "groupName": "SMS", + "label": "读取短彩信", + "description": "允许应用读取设备接收的短彩信信息。", + "groupId": 4 + }, + { + "permissionName": "ohos.permission.RECEIVE_MMS", + "groupName": "SMS", + "label": "接收彩信", + "description": "允许应用接收彩信。", + "groupId": 4 + }, + { + "permissionName": "ohos.permission.RECEIVE_SMS", + "groupName": "SMS", + "label": "接收短信", + "description": "允许应用接收短信。", + "groupId": 4 + }, + { + "permissionName": "ohos.permission.RECEIVE_WAP_MESSAGES", + "groupName": "SMS", + "label": "接收WAP消息", + "description": "允许应用接收和处理WAP消息。", + "groupId": 4 + }, + { + "permissionName": "ohos.permission.SEND_MESSAGES", + "groupName": "SMS", + "label": "发送短彩信", + "description": "允许应用发送短彩信", + "groupId": 4 + }, + { + "permissionName": "ohos.permission.READ_CONTACTS", + "groupName": "CONTACTS", + "label": "读取通讯录", + "description": "允许应用读取设备上存储的联系人信息。", + "groupId": 5 + }, + { + "permissionName": "ohos.permission.WRITE_CONTACTS", + "groupName": "CONTACTS", + "label": "新建/修改/删除通讯录", + "description": "允许应用新建/修改/删除设备上存储的联系人信息。", + "groupId": 5 + }, + { + "permissionName": "ohos.permission.READ_CALL_LOG", + "groupName": "CALL_LOG", + "label": "读取通话记录", + "description": "允许应用读取设备上的通话记录信息。", + "groupId": 6 + }, + { + "permissionName": "ohos.permission.WRITE_CALL_LOG", + "groupName": "CALL_LOG", + "label": "新建/修改/删除通话记录", + "description": "允许新建/修改/删除设备上的通话记录信息。", + "groupId": 6 + }, + { + "permissionName": "ohos.permission.MEDIA_LOCATION", + "groupName": "MEDIA", + "label": "允许应用访问拍摄位置", + "description": "应用访问用户媒体文件中的拍摄位置信息如经纬度信息。", + "groupId": 7 + }, + { + "permissionName": "ohos.permission.READ_MEDIA", + "groupName": "MEDIA", + "label": "允许应用读取媒体文件", + "description": "允许应用访问户媒体文件,如视频、音频、图片等。", + "groupId": 7 + }, + { + "permissionName": "ohos.permission.WRITE_MEDIA", + "groupName": "MEDIA", + "label": "允许应用读写媒体文件", + "description": "允许应用读写户媒体文件,如视频、音频、图片等。", + "groupId": 7 + }, + { + "permissionName": "ohos.permission.READ_CALENDAR", + "groupName": "CALENDAR", + "label": "读取日历", + "description": "允许应用读取日历。", + "groupId": 8 + }, + { + "permissionName": "ohos.permission.WRITE_CALENDAR", + "groupName": "CALENDAR", + "label": "新建/修改/删除日历", + "description": "允许应用新建/修改/删除日历。", + "groupId": 8 + }, + { + "permissionName": "ohos.permission.ACTIVITY_MOTION", + "groupName": "SPORT", + "label": "读取用户的运动状态", + "description": "允许应用程序读取用户的运动状态。", + "groupId": 9 + }, + { + "permissionName": "ohos.permission.READ_HEALTH_DATA", + "groupName": "HEALTH", + "label": "读取用户的健康数据", + "description": "允许应用程序读取用户的健康数据。", + "groupId": 10 + }, + { + "permissionName": "ohos.permission.DISTRIBUTED_DATASYNC", + "groupName": "OTHER", + "icon": $r("app.media.ic_multi_device_vector"), + "text": "使用多设备协同?", + "label": "多设备协同", + "description": "发现并访问其他设备。", + "groupId": 11 + } +] + +export const groups: any[] = [ + { + "name": "LOCATION", + "groupName": "位置信息", + "icon": $r('app.media.ic_public_gps'), + "description": "", + "label": "访问位置信息?", + "permissions": [ + "ohos.permission.LOCATION_IN_BACKGROUND", + "ohos.permission.LOCATION" + ], + "isShow":true + }, + { + "name": "CAMERA", + "groupName": "相机", + "icon": $r('app.media.ic_public_camera'), + "label": "使用相机?", + "description": "", + "permissions": [ + "ohos.permission.CAMERA" + ], + "isShow":true + }, + { + "name": "MICROPHONE", + "groupName": "麦克风", + "icon": $r('app.media.ic_public_voice'), + "label": "使用麦克风?", + "description": "", + "permissions": [ + "ohos.permission.MICROPHONE" + ], + "isShow":true + }, + { + "name": "PHONE", + "groupName": "电话", + "icon": $r('app.media.ic_public_phone'), + "label": "使用拨打电话?", + "description": "", + "permissions": [ + "ohos.permission.ANSWER_CALL", + "ohos.permission.MANAGE_VOICEMAIL" + ], + "isShow":false + }, + { + "name": "SMS", + "groupName": "信息", + "icon": $r('app.media.ic_public_message'), + "label": "访问信息?", + "description": "", + "permissions": [ + "ohos.permission.READ_CELL_MESSAGES", + "ohos.permission.READ_MESSAGES", + "ohos.permission.RECEIVE_MMS", + "ohos.permission.RECEIVE_SMS", + "ohos.permission.RECEIVE_WAP_MESSAGES", + "ohos.permission.SEND_MESSAGES" + ], + "isShow":false + }, + { + "name": "CONTACTS", + "groupName": "通讯录", + "icon": $r('app.media.ic_public_contacts_group'), + "label": "访问通讯录?", + "description": "", + "permissions": [ + "ohos.permission.READ_CONTACTS", + "ohos.permission.WRITE_CONTACTS" + ], + "isShow":false + }, + { + "name": "CALL_LOG", + "groupName": "通话记录", + "icon": $r('app.media.ic_call_logs'), + "label": "访问通话记录?", + "description": "", + "permissions": [ + "ohos.permission.READ_CALL_LOG", + "ohos.permission.WRITE_CALL_LOG" + ], + "isShow":false + }, + { + "name": "MEDIA", + "groupName": "媒体和文件", + "icon": $r('app.media.ic_public_folder'), + "description": "", + "label": "访问媒体和文件?", + "permissions": [ + "ohos.permission.MEDIA_LOCATION", + "ohos.permission.READ_MEDIA", + "ohos.permission.WRITE_MEDIA" + ], + "isShow":true + }, + { + "name": "CALENDAR", + "groupName": "日历", + "icon": $r('app.media.ic_public_calendar'), + "label": "访问日历?", + "description": "", + "permissions": [ + "ohos.permission.READ_CALENDAR", + "ohos.permission.WRITE_CALENDAR" + ], + "isShow":true + }, + { + "name": "SPORT", + "groupName": "健身运动", + "icon": $r('app.media.ic_sport'), + "label": "访问健身运动?", + "description": "", + "permissions": [ + "ohos.permission.ACTIVITY_MOTION" + ], + "isShow":true + }, + { + "name": "HEALTH", + "groupName": "身体传感器", + "icon": $r('app.media.ic_ssensor'), + "label": "使用身体传感器?", + "description": "", + "permissions": [ + "ohos.permission.READ_HEALTH_DATA" + ], + "isShow":true + }, + { + "name": "OTHER", + "groupName": "其他权限", + "icon": $r('app.media.ic_more'), + "description": "", + "permissions": [ + "ohos.permission.DISTRIBUTED_DATASYNC" + ], + "isShow":false + } +]; + +export const permissionGroupPermissions: object = { + "LOCATION": [ + "ohos.permission.LOCATION_IN_BACKGROUND", + "ohos.permission.LOCATION" + ], + "CAMERA": [ + "ohos.permission.CAMERA" + ], + "MICROPHONE": [ + "ohos.permission.MICROPHONE" + ], + "PHONE": [ + "ohos.permission.ANSWER_CALL", + "ohos.permission.MANAGE_VOICEMAIL" + ], + "SMS": [ + "ohos.permission.READ_CELL_MESSAGES", + "ohos.permission.READ_MESSAGES", + "ohos.permission.RECEIVE_MMS", + "ohos.permission.RECEIVE_SMS", + "ohos.permission.RECEIVE_WAP_MESSAGES", + "ohos.permission.SEND_MESSAGES" + ], + "CONTACTS": [ + "ohos.permission.READ_CONTACTS", + "ohos.permission.WRITE_CONTACTS" + ], + "CALL_LOG": [ + "ohos.permission.READ_CALL_LOG", + "ohos.permission.WRITE_CALL_LOG" + ], + "MEDIA": [ + "ohos.permission.MEDIA_LOCATION", + "ohos.permission.READ_MEDIA", + "ohos.permission.WRITE_MEDIA" + ], + "CALENDAR": [ + "ohos.permission.READ_CALENDAR", + "ohos.permission.WRITE_CALENDAR" + ], + "SPORT": [ + "ohos.permission.ACTIVITY_MOTION" + ], + "HEALTH": [ + "ohos.permission.READ_HEALTH_DATA" + ], + "OTHER": [ + "ohos.permission.DISTRIBUTED_DATASYNC" + ] +}; + + +export const userGrantPermissions: string[] = [ + "ohos.permission.LOCATION_IN_BACKGROUND", + "ohos.permission.LOCATION", + "ohos.permission.CAMERA", + "ohos.permission.MICROPHONE", + "ohos.permission.ANSWER_CALL", + "ohos.permission.MANAGE_VOICEMAIL", + "ohos.permission.READ_CELL_MESSAGES", + "ohos.permission.READ_MESSAGES", + "ohos.permission.RECEIVE_MMS", + "ohos.permission.RECEIVE_SMS", + "ohos.permission.RECEIVE_WAP_MESSAGES", + "ohos.permission.SEND_MESSAGES", + "ohos.permission.READ_CONTACTS", + "ohos.permission.WRITE_CONTACTS", + "ohos.permission.READ_CALL_LOG", + "ohos.permission.WRITE_CALL_LOG", + "ohos.permission.MEDIA_LOCATION", + "ohos.permission.READ_MEDIA", + "ohos.permission.WRITE_MEDIA", + "ohos.permission.READ_CALENDAR", + "ohos.permission.WRITE_CALENDAR", + "ohos.permission.ACTIVITY_MOTION", + "ohos.permission.READ_HEALTH_DATA", + "ohos.permission.DISTRIBUTED_DATASYNC" +]; + +export const permissionDescriptions: object = { + "位置信息": "允许应用在后台运行时获取位置信息。" , + "相机": "允许应用拍摄照片和视频。" , + "麦克风": "允许应用打开或关闭录音通路。" , + "电话": "允许应用接听电话。" , + "信息": "允许应用发送短彩信。" , + "通讯录": "允许应用新建/修改/删除设备上存储的联系人信息。" , + "通话记录": "允许新建/修改/删除设备上的通话记录信息。" , + "媒体和文件": "允许应用访问户媒体文件,如视频、音频、图片等。" , + "日历": "允许应用新建/修改/删除日历。" , + "健身运动": "允许应用程序读取用户的运动状态。" , + "身体传感器": "允许应用程序读取用户的健康数据。" , + "其他权限": "允许应用与远程设备交换用户数据(如图片、音乐、视频、及应用数据等)。" +}; + +export const permissionPermissionGroup: object = { + "ohos.permission.LOCATION_IN_BACKGROUND": "LOCATION", + "ohos.permission.LOCATION": "LOCATION", + "ohos.permission.CAMERA": "CAMERA", + "ohos.permission.MICROPHONE": "MICROPHONE", + "ohos.permission.ANSWER_CALL": "PHONE", + "ohos.permission.MANAGE_VOICEMAIL": "PHONE", + "ohos.permission.READ_CELL_MESSAGES": "SMS", + "ohos.permission.READ_MESSAGES": "SMS", + "ohos.permission.RECEIVE_MMS": "SMS", + "ohos.permission.RECEIVE_SMS": "SMS", + "ohos.permission.RECEIVE_WAP_MESSAGES": "SMS", + "ohos.permission.SEND_MESSAGES": "SMS", + "ohos.permission.READ_CONTACTS": "CONTACTS", + "ohos.permission.WRITE_CONTACTS": "CONTACTS", + "ohos.permission.READ_CALL_LOG": "CALL_LOG", + "ohos.permission.WRITE_CALL_LOG": "CALL_LOG", + "ohos.permission.MEDIA_LOCATION": "MEDIA", + "ohos.permission.READ_MEDIA": "MEDIA", + "ohos.permission.WRITE_MEDIA": "MEDIA", + "ohos.permission.READ_CALENDAR": "CALENDAR", + "ohos.permission.WRITE_CALENDAR": "CALENDAR", + "ohos.permission.ACTIVITY_MOTION": "SPORT", + "ohos.permission.READ_HEALTH_DATA": "HEALTH", + "ohos.permission.DISTRIBUTED_DATASYNC": "OTHER" +}; + +export const permissionGroupIds: object = { + "ohos.permission.LOCATION_IN_BACKGROUND": "0", + "ohos.permission.LOCATION": "0", + "ohos.permission.CAMERA": "1", + "ohos.permission.MICROPHONE": "2", + "ohos.permission.ANSWER_CALL": "3", + "ohos.permission.MANAGE_VOICEMAIL": "3", + "ohos.permission.READ_CELL_MESSAGES": "4", + "ohos.permission.READ_MESSAGES": "4", + "ohos.permission.RECEIVE_MMS": "4", + "ohos.permission.RECEIVE_SMS": "4", + "ohos.permission.RECEIVE_WAP_MESSAGES": "4", + "ohos.permission.SEND_MESSAGES": "4", + "ohos.permission.READ_CONTACTS": "5", + "ohos.permission.WRITE_CONTACTS": "5", + "ohos.permission.READ_CALL_LOG": "6", + "ohos.permission.WRITE_CALL_LOG": "6", + "ohos.permission.MEDIA_LOCATION": "7", + "ohos.permission.READ_MEDIA": "7", + "ohos.permission.WRITE_MEDIA": "7", + "ohos.permission.READ_CALENDAR": "8", + "ohos.permission.WRITE_CALENDAR": "8", + "ohos.permission.ACTIVITY_MOTION": "9", + "ohos.permission.READ_HEALTH_DATA": "10", + "ohos.permission.DISTRIBUTED_DATASYNC": "11" +}; + +export const orderGroup: string[] = [ + "位置信息", + "相机", + "麦克风", + "电话", + "信息", + "通讯录", + "通话记录", + "媒体和文件", + "日历", + "健身运动", + "身体传感器", + "其他权限" +]; + +export const otherPermissionsLabel: object = { + "ohos.permission.DISTRIBUTED_DATASYNC": "多设备协同" +}; + +export const noNeedDisplayApp: string[] = [ + "com.ohos.launcher" +] + +export const showSubpermissionsGrop: string[] = [ + "电话", + "日历", + "信息", + "通讯录", + "通话记录" +]; \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/constant.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/constant.ets new file mode 100644 index 000000000..c5ce2a1fb --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/constant.ets @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2021-2022 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 + * + * 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. + */ + +export default class Constants { + // alphabetIndexer + static ALPHABETINDEXER_SELECTEDFONT_SIZE = 12; + static ALPHABETINDEXER_POPUPFONT_SIZE = 30; + static ALPHABETINDEXER_ITEMSIZE = 16; + static ALPHABETINDEXER_HEIGHT = 448; + static ALPHABETINDEXER_WIDTH = 36; + + // backBar + static BACKBAR_HEIGHT = 56; + static BACKBAR_MINHEIGHT = 56; + + // image of backBar + static BACKBAR_IMAGE_HEIGHT = 24; + static BACKBAR_IMAGE_WIDTH = 24; + static BACKBAR_IMAGE_MARGIN_TOP = 17; + static BACKBAR_IMAGE_MARGIN_LEFT = 12; + static BACKBAR_IMAGE_MARGIN_RIGHT = 15; + + // text of backBar + static BACKBAR_TEXT_FONT_SIZE = 20; + static BACKBAR_TEXT_FLEX_GROW = 1; + static BACKBAR_TEXT_MARGIN_TOP = 17; + + // dialog + static DIALOG_BORDER_RADIUS = 24; + static DIALOG_HEIGHT = 70; + static DIALOG_WIDTH = 336; + + // text of dialog + static DIALOG_TEXT_FONT_SIZE = 20; + static DIALOG_TEXT_MARGIN_TOP = 25; + + // search textInput + static TEXTINPUT_PADDING_LEFT = 36; + static TEXTINPUT_BORDER_RADIUS = 20; + static TEXTINPUT_BORDER_WIDTH = 1.5; + static TEXTINPUT_PLACEHOLDER_Font_SIZE = 16; + static TEXTINPUT_HEIGHT = 40; + static TEXTINPUT_IMAGE_WIDTH = 16; + static TEXTINPUT_IMAGE_HEIGHT = 16; + static TEXTINPUT_IMAGE_MARGIN_LEFT = 12; + static TEXTINPUT_IMAGE_MARGIN_TOP = 12; + + // grid useSizeType + static GRID_MARGIN = '0vp'; + static GUTTER = 0; + static LEFT_XS_SPAN = 0; + static LEFT_XS_OFFSET = 0; + static LEFT_SM_SPAN = 0; + static LEFT_SM_OFFSET = 0; + static LEFT_MD_SPAN = 0; + static LEFT_MD_OFFSET = 0; + static LEFT_LG_SPAN = 2; + static LEFT_LG_OFFSET = 0; + static MIDDLE_XS_SPAN = 2; + static MIDDLE_XS_OFFSET = 0; + static MIDDLE_SM_SPAN = 4; + static MIDDLE_SM_OFFSET = 0; + static MIDDLE_MD_SPAN = 8; + static MIDDLE_MD_OFFSET = 0; + static MIDDLE_LG_SPAN = 8; + static MIDDLE_LG_OFFSET = 2; + static RIGHT_XS_SPAN = 0; + static RIGHT_XS_OFFSET = 2; + static RIGHT_SM_SPAN = 0; + static RIGHT_SM_OFFSET = 4; + static RIGHT_MD_SPAN = 0; + static RIGHT_MD_OFFSET = 8; + static RIGHT_LG_SPAN = 2; + static RIGHT_LG_OFFSET = 10; + + // 100% width,height + static FULL_WIDTH = '100%'; + static FULL_HEIGHT = '100%'; + + // public property style + static PERMISSION = 1; + static APPLICATION = 0; + static LAYOUT_WEIGHT = 1; + static FLEX_GROW = 1; + static TEXT_DECORATION_HEIGHT = 1; + static TEXT_MIDDLE_FONT_SIZE = 16; + static TEXT_SMAL_FONT_SIZE = 14; + static TEXT_SMALLER_FONT_SIZE = 12; + static TEXT_LINE_HEIGHT = 22; + static TEXT_SMALL_LINE_HEIGHT = 19; + static CONSTRAINTSIZE_MINHEIGHT = 48; + static LISTITEM_ROW_HEIGHT = 48; + static LISTITEM_PADDING_LEFT = 24; + static LIST_PADDING_LEFT = 12 + static LISTITEM_PADDING_RIGHT = 24; + static LISTITEM_PADDING_LEFT_RECORD = 32; + static LISTITEM_MARGIN_BOTTOM = 12; + static LISTITEM_MARGIN_BOTTOM_PERMISSION = 14; + static LISTITEM_MARGIN_BOTTOM_APPLICATION = 18; + static LISTITEM_HEIGHT_PERMISSION = 72; + static LISTITEM_HEIGHT_APPLICATION = 80; + static IMAGE_HEIGHT = 24; + static IMAGE_WIDTH = 12; + static IMAGE_HEIGHT_RECORD = 12; + static IMAGE_WIDTH_RECORD = 24; + static IMAGE_HEIGHT_RECORD_APPLICATION = 16; + static IMAGE_WIDTH_RECORD_APPLICATION = 16; + static BORDER_RADIUS = 24; + static TITLE_MARGIN_BOTTOM = 16; + + // application-secondary, authority-secondary + static FLEX_MARGIN_TOP = 8; + static FLEX_MARGIN_BOTTOM = 8; + static LIST_PADDING_TOP = 4; + static LIST_PADDING_BOTTOM = 4; + static LIST_MARGIN_BOTTOM = 12; + static ROW_MARGIN_TOP = 9; + static SECONDARY_TEXT_MARGIN_TOP = 19.5; + static SECONDARY_TEXT_MARGIN_LEFT = 24; + static SECONDARY_LIST_PADDING_LEFT = 12; + static SECONDARY_LIST_PADDING_RIGHT = 12; + + // application-tertiary + static TERTIARY_IMAGE_WIDTH = 64; + static TERTIARY_IMAGE_HEIGHT = 64; + static TERTIARY_IMAGE_MARGIN_LEFT = 12; + static TERTIARY_IMAGE_MARGIN_RIGHT = 12; + static TERTIARY_LABEL_MARGIN_BOTTOM = 2; + static TERTIARY_MARGIN_LEFT = 12; + static TERTIARY_TEXT_MARGIN_LEFT = 24; + static TERTIARY_HALF_WIDTH = '50%'; + static TERTIARY_ROW_MARGIN_TOP = 24; + static TERTIARY_PERMISSION_ROW_MARGIN_TOP = 12; + static TERTIARY_RADIO_IMAGE_WIDTH = 24; + static TERTIARY_RADIO_IMAGE_HEIGHT = 24; + static TERTIARY_RADIO_IMAGE_MARGIN_TOP = 4; + static TERTIARY_LISTITEM_PADDING_LEFT = 24; + static TERTIARY_LISTITEM_PADDING_RIGHT = 24; + static TERTIARY_LISTITEM_MARGIN_TOP = 1; + static TERTIARY_LIST_PADDING_LEFT = 12; + static TERTIARY_LIST_PADDING_RIGHT = 12; + static TERTIARY_LIST_PADDING_TOP = 3; + static TERTIARY_LIST_PADDING_BOTTOM = 4; + + // authority-tertiary + static AUTHORITY_IMAGE_WIDTH = 40; + static AUTHORITY_IMAGE_HEIGHT = 40; + static AUTHORITY_IMAGE_MARGIN_RIGHT = 16; + static AUTHORITY_TOGGLE_WIDTH = 36; + static AUTHORITY_TOGGLE_HEIGHT = 20; + static AUTHORITY_ROW_HEIGHT = 72; + static AUTHORITY_CONSTRAINTSIZE_MINHEIGHT = 72; + static AUTHORITY_LISTITEM_PADDING_LEFT = 12; + static AUTHORITY_LISTITEM_PADDING_RIGHT = 12; + static AUTHORITY_TEXTINPUT_PADDING_LEFT = 12; + static AUTHORITY_TEXTINPUT_PADDING_RIGHT = 24; + static AUTHORITY_TEXT_MARGIN_TOP = 24; + static AUTHORITY_TEXT_MARGIN_LEFT = 0; + static AUTHORITY_ROW_MARGIN_TOP = 24; + static NORECORD_IMAGE_WIDTH = 120; + static NORECORD_IMAGE_HEIGHT = 120; + static NORECORD_IMAGE_MARGIN_LEFT = 40; + static SEARCHNORESULT_IMAGE_WIDTH = 200; + static SEARCHNORESULT_IMAGE_HEIGHT = 200; + static AUTHORITY_COLUMN_HEIGHT = '95%'; + static AUTHORITY_ALPHABETINDEX_WIDTH = 24; + static AUTHORITY_ALPHABETINDEX_PADDING_TOP = 16; + static AUTHORITY_TEXT_DECORATION_WIDTH = '86%'; + static AUTHORITY_TEXT_DECORATION_MARGIN_LEFT = 53; + + // authority-management + static MANAGEMENT_IMAGE_WIDTH = 24; + static MANAGEMENT_IMAGE_HEIGHT = 24; + static MANAGEMENT_IMAGE_MARGIN_RIGHT = 16; + static MANAGEMENT_IMAGE_MARGIN_RIGHT_RECORD = 24; + static MANAGEMENT_IMAGE_MARGIN_LEFT = 8; + static MANAGEMENT_ROW_HEIGHT = 56; + static MANAGEMENT_TEXT_DECORATION_WIDTH = '95%'; + static MANAGEMENT_TEXT_DECORATION_MARGIN_LEFT = 40; + static MANAGEMENT_LODING_IMAGE_WIDTH = 48; + static MANAGEMENT_LODING_IMAGE_HEIGHT = 48; + static MANAGEMENT_LODING_ROW_HEIGHT = '90%'; + static MANAGEMENT_ROW_PADDING_LEFT = 12; + static MANAGEMENT_ROW_PADDING_RIGHT = 12; + static MANAGEMENT_ROW_PADDING_TOP = 8; + static MANAGEMENT_ROW_MARGIN_TOP = 12; + static MANAGEMENT_TRANSPARENCY = 0.8; + static APPLICATION_IMAGE_WIDTH = 40; + static APPLICATION_IMAGE_HEIGHT = 40; + static APPLICATION_IMAGE_MARGIN_RIGHT = 16; + static APPLICATION_TEXT_MARGIN_RIGHT = 4; + static APPLICATION_LIST_PADDING_LEFT = 12; + static APPLICATION_LIST_PADDING_RIGHT = 12; + static APPLICATION_LIST_MARGIN_BOTTOM = 50; + static APPLICATION_LISTITEM_PADDING_LEFT = 12; + static APPLICATION_LISTITEM_PADDING_RIGHT = 12; + static APPLICATION_TEXTINPUT_PADDING_LEFT = 12; + static APPLICATION_TEXTINPUT_PADDING_TOP = 8; + static APPLICATION_TEXTINPUT_PADDING_RIGHT = 24; + static APPLICATION_COLUMN_HEIGHT = '93%'; + static APPLICATION_ALPHABETINDEX_MARGIN_TOP = 12; + static APPLICATION_ALPHABETINDEX_WIDTH = 24; + static APPLICATION_TEXT_DECORATION_WIDTH = '90%'; + static APPLICATION_TEXT_DECORATION_MARGIN_LEFT = 68; + + // slice + static SLICE_START = 0; + static SLICE_END = -1; + static SLICE_START_INDEX = 0; + static SLICE_END_INDEX = 1; + + //group number + static FIXED_GROUP = 1; + static CHANGE_GROUP = 2; + static OTHER_GROUP = 3; + + // tabBar + static BAR_WIDTH = 285; + + // setTimeout + static DELAY_TIME = 1000; + static DELAY_TIME_MAX = 2000; + + // radio + static RADIO_ALLOW_NAME = '允许'; + static RADIO_ALLOW_INDEX = 0; + static RADIO_ALLOW_GROUP_NAME = 'radio'; + static RADIO_BAN_NAME = '禁止'; + static RADIO_BAN_INDEX = 1; + static RADIO_BAN_GROUP_NAME = 'radio'; + + //shape + static SHAPE_DIA = 24; + static SHAPE_BAN_DIA = 23; + static SHAPE_BIG_DIA = 48; + static SHAPE_OFFSET_X = -24; + static SHAPE_BAN_OFFSET = .5; + static SHAPE_ALLOW_DIA = 16; + static SHAPE_ALLOW_OFFSET = 4; + static SHAPE_ZINDEX = 10; + + // utils + static CHAR_CODE = 0; + static UNI_MAX = 40869; + static UNI_MIN = 19968; + + static PARMETER_BUNDLE_FLAG = 16; + static USERID = 100; + + static PERMISSION_INDEX = 0; + + static PERMISSION_NUM = 0; + + static PERMISSION_FLAG = 2; + static API_VERSION_SUPPORT_STAGE = 9; + + static PRE_AUTHORIZATION_NOT_MODIFIED = 4; + + static BUNDLE_NAME = 'com.ohos.permissionmanager' + + static START_SUBSCRIPT = 0 + static END_SUBSCRIPT = 500 + + static RECORD_PADDING_BOTTOM = '20%' + + + + + //////////////////////////////////////////// + // icon of dialog + static DIALOG_ICON_WIDTH = 24; + static DIALOG_ICON_HEIGHT = 24; + static DIALOG_ICON_MARGIN_TOP = 23; + + // label text of dialog + static DIALOG_LABEL_FONT_SIZE = 10; + static DIALOG_LABEL_MARGIN_TOP = 2; + static DIALOG_LABEL_LINE_HEIGHT = 14; + + // request text of dialog + static DIALOG_REQ_FONT_SIZE = 16; + static DIALOG_REQ_MARGIN_TOP = 16; + static DIALOG_REQ_MARGIN_LEFT = 24; + static DIALOG_REQ_LINE_HEIGHT = 22; + + // description text of dialog + static DIALOG_DESP_FONT_SIZE = 14; + static DIALOG_DESP_MARGIN_TOP = 2; + static DIALOG_DESP_MARGIN_LEFT = 24; + static DIALOG_DESP_MARGIN_RIGHT = 24; + static DIALOG_DESP_MARGIN_BOTTOM = 8; + static DIALOG_DESP_LINE_HEIGHT = 19; + + static BUTTON_FONT_SIZE = 16; + static BUTTON_DIVIDER_FONT_SIZE = 24; + static BUTTON_MARGIN_TOP = 8; + static BUTTON_MARGIN_BOTTOM = 16; + static BUTTON_MARGIN_LEFT = 16; + static BUTTON_MARGIN_RIGHT = 16; + static BUTTON_HEIGHT = 40; + static BUTTON_WIDTH = 177; + + static DIALOG_PRIVACY_BORDER_RADIUS = 32; + static DIALOG_PRIVACY_WIDTH = 395; + static DIALOG_PADDING_BOTTOM = 16; + + // initial check status + static INIT_NEED_TO_WAIT = 0 + static INIT_NEED_TO_VERIFY = 1 + static INIT_NEED_TO_TERMINATED = 2 + static INIT_NEED_TO_REFRESH = 3 + + static RESULT_SUCCESS = 1 + static RESULT_FAILURE = 0 + static RESULT_CODE = 0 + + // + static SETTING_OPER = -1 + static PASS_OPER = 0 + static DYNAMIC_OPER = 1 + static INVALID_OPER = 2 + + // + static INITIAL_INDEX = 10 + +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/utils.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/utils.ets similarity index 98% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/utils.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/utils.ets index f08f6ebeb..8caae47c6 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/common/utils/utils.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/common/utils/utils.ets @@ -15,8 +15,9 @@ import Resmgr from '@ohos.resourceManager'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; -import { permissionGroups, groups } from "../model/permissionGroup.ets"; -import Constants from '../utils/constant.ets'; + +import { permissionGroups, groups } from "../model/permissionGroup"; +import Constants from '../utils/constant'; /** * Get app name resource @@ -25,7 +26,7 @@ import Constants from '../utils/constant.ets'; */ export function getAppLabel(labelId, bundleName) { return new Promise((resolve) => { - Resmgr.getResourceManager(bundleName).then(item => { + Resmgr.getResourceManager(globalThis.context, bundleName).then(item => { item.getString(labelId, (error, value) => { resolve(value); }) @@ -42,7 +43,7 @@ export function getAppLabel(labelId, bundleName) { */ export function getAppIcon(iconId, bundleName) { return new Promise((resolve) => { - Resmgr.getResourceManager(bundleName).then(item => { + Resmgr.getResourceManager(globalThis.context, bundleName).then(item => { item.getMediaBase64(iconId, (error, value) => { resolve(value); }) @@ -399,9 +400,9 @@ export function getPermissionGroup(permission: string) { return { "name": permissionGroups[i].groupName, "groupName": permissionGroups[i].label, - "label": permissionGroups[i].label, + "label": permissionGroups[i].text, "icon": permissionGroups[i].icon, - "description": "", + "description": '', "permissions": [ permissionGroups[i].permissionName ] @@ -412,3 +413,15 @@ export function getPermissionGroup(permission: string) { } } } + +const TAG = 'PermissionManager_Log'; + +export class Log { + static info(log) { + console.info(`Info: ${TAG} ${log}`) + } + + static error(log) { + console.error(`Error: ${TAG} ${log}`) + } +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-secondary.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/application-secondary.ets similarity index 98% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-secondary.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/application-secondary.ets index e58940276..bee4aeeee 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-secondary.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/application-secondary.ets @@ -13,11 +13,11 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; +import { backBar } from "../common/components/backBar"; import router from '@system.router'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; -import { groups } from "../common/model/permissionGroup.ets"; -import Constants from '../common/utils/constant.ets'; +import { groups } from "../common/model/permissionGroup"; +import Constants from '../common/utils/constant'; var TAG = 'PermissionManager_MainAbility:' diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/application-tertiary.ets similarity index 97% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/application-tertiary.ets index bdddffb82..c32e49ec8 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/application-tertiary.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/application-tertiary.ets @@ -13,15 +13,15 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; +import { backBar } from "../common/components/backBar"; import router from '@system.router'; import bundle from "@ohos.bundle"; import { getAppLabel, getAppIcon, verifyAccessToken } from "../common/utils/utils"; import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import Resmgr from '@ohos.resourceManager' -import { authorizeDialog } from "../common/components/dialog.ets"; -import { permissionDescriptions, permissionGroups, showSubpermissionsGrop } from "../common/model/permissionGroup.ets"; -import Constants from '../common/utils/constant.ets'; +import { authorizeDialog } from "../common/components/dialog"; +import { permissionDescriptions, permissionGroups, showSubpermissionsGrop } from "../common/model/permissionGroup"; +import Constants from '../common/utils/constant'; var TAG = 'PermissionManager_MainAbility:' @@ -187,7 +187,7 @@ struct mediaDocumentItem { } }) }) - Resmgr.getResourceManager(Constants.BUNDLE_NAME).then(item => { + Resmgr.getResourceManager(globalThis.context, Constants.BUNDLE_NAME).then(item => { Promise.all([item.getString($r("app.string.separator").id), item.getString($r("app.string.reason_suffix").id)]) .then(values => { @@ -203,7 +203,7 @@ struct mediaDocumentItem { permissions.forEach(permission => { res.reqPermissionDetails.forEach(reqPermissionDetail => { if(reqPermissionDetail.name == permission) { - Resmgr.getResourceManager(routerData).then(item => { + Resmgr.getResourceManager(globalThis.context, routerData).then(item => { item.getString(reqPermissionDetail.reasonId, (err, value) => { if (value !== undefined && !hasReason) { reason += value.slice(Constants.START_SUBSCRIPT, Constants.END_SUBSCRIPT) diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-management.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-management.ets similarity index 84% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-management.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-management.ets index 2f97c9bd7..fdf9cb39c 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-management.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-management.ets @@ -13,17 +13,17 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; -import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex.ets"; -import { textInput } from "../common/components/search.ets"; +import { backBar } from "../common/components/backBar"; +import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex"; +import { textInput } from "../common/components/search"; import router from '@system.router'; import bundle from "@ohos.bundle"; import Resmgr from '@ohos.resourceManager'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; -import { groups, userGrantPermissions, permissionGroupPermissions, noNeedDisplayApp } from "../common/model/permissionGroup.ets"; -import { permissionGroups, permissionPermissionGroup, permissionGroupIds } from "../common/model/permissionGroup.ets"; -import { makePy } from "../common/utils/utils.ets"; -import Constants from '../common/utils/constant.ets'; +import { groups, userGrantPermissions, permissionGroupPermissions, noNeedDisplayApp } from "../common/model/permissionGroup"; +import { permissionGroups, permissionPermissionGroup, permissionGroupIds } from "../common/model/permissionGroup"; +import { makePy } from "../common/utils/utils"; +import Constants from '../common/utils/constant'; var TAG = 'PermissionManager_MainAbility:' @@ -58,6 +58,7 @@ interface groupPermission { }; let bundleInfosList: any[] = []; // Permission information array +let textInput_placeholder: any = '' @Entry @Component @@ -390,7 +391,7 @@ struct authorityManagementPage { * @param {String} labelName Application Name */ updateAppLabel(index, bundleName, labelName) { - Resmgr.getResourceManager(bundleName).then(item => { + Resmgr.getResourceManager(globalThis.context, bundleName).then(item => { if (index >= this.allApplicationPermissions.length) { return; } @@ -413,7 +414,7 @@ struct authorityManagementPage { * @param {String} bundleName Package names */ updateAppIcon(index, bundleName) { - Resmgr.getResourceManager(bundleName).then(item => { + Resmgr.getResourceManager(globalThis.context, bundleName).then(item => { if (index >= this.allApplicationPermissions.length) { return; } @@ -432,6 +433,11 @@ struct authorityManagementPage { aboutToAppear() { console.log(TAG + 'on aboutToAppear, version 1.01'); this.getAllBundlePermissions(this.allPermissions, this.allApplicationPermissions); + Resmgr.getResourceManager(globalThis.context, Constants.BUNDLE_NAME).then(item => { + item.getString($r("app.string.textInput_placeholder").id, (err, val) => { + textInput_placeholder = val + }) + }) } getPermissionGroup(allGroup, order) { @@ -473,7 +479,7 @@ struct authorityManagementPage { Row() { Column() { Row() { - backBar( { title: JSON.stringify($r('app.string.authority_management')), recordable: false }) + backBar( { title: JSON.stringify($r('app.string.authority_management')), recordable: true }) } Row() { Column() { @@ -643,7 +649,7 @@ struct applicationItem { Column() { Row() { textInput({ - placeholder: $r('app.string.textInput_placeholder'), + placeholder: textInput_placeholder, applicationItem: $applicationItem, oldApplicationItem: $oldApplicationItem, searchResult: $searchResult @@ -656,75 +662,77 @@ struct applicationItem { Row() { Flex({ alignItems: ItemAlign.Start }) { Column() { - if(this.applicationItem.length) { - Flex({ justifyContent: FlexAlign.SpaceBetween }) { - Shape() { - Rect().width(Constants.SHAPE_DIA).height(Constants.SHAPE_DIA).fill($r('app.color.background_color')) - Circle().width(Constants.SHAPE_BIG_DIA).height(Constants.SHAPE_BIG_DIA) - .fill($r('app.color.list_background_color')) - }.width(Constants.SHAPE_DIA) - - Shape() { - Rect().width(Constants.SHAPE_DIA).height(Constants.SHAPE_DIA).fill($r('app.color.background_color')) - Circle().width(Constants.SHAPE_BIG_DIA).height(Constants.SHAPE_BIG_DIA) - .fill($r('app.color.list_background_color')).offset({ x: Constants.SHAPE_OFFSET_X }) - }.width(Constants.SHAPE_DIA) - } - .width(Constants.FULL_WIDTH) - .height(Constants.SHAPE_DIA) - .zIndex(Constants.SHAPE_ZINDEX) - .position({ x: 0, y: Constants.MANAGEMENT_ROW_MARGIN_TOP }) - .padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) - } Scroll() { - if (!this.applicationItem.length) { - if (this.searchResult) { - Row() { - List() { - ForEach(this.applicationItem.slice(Constants.SLICE_START, this.applicationItem.length - 1), - (item) => { - this.ListItemLayout(item, Constants.SLICE_START_INDEX) - }, item => item.toString()) - ForEach(this.applicationItem.slice(Constants.SLICE_END), (item, index) => { - this.ListItemLayout(item, Constants.SLICE_END_INDEX) - }, item => item.toString()) - }.backgroundColor($r('app.color.default_background_color')).borderRadius(Constants.BORDER_RADIUS) - }.margin({ top: Constants.MANAGEMENT_ROW_MARGIN_TOP }) - .padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) - } else { - Row() { - Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { - Image($r('app.media.searchnoresult')) - .customizeImage(Constants.SEARCHNORESULT_IMAGE_WIDTH, Constants.SEARCHNORESULT_IMAGE_HEIGHT) - } - }.margin({ top: Constants.MANAGEMENT_ROW_MARGIN_TOP }) + Column() { + if (this.applicationItem.length) { + Flex({ justifyContent: FlexAlign.SpaceBetween }) { + Shape() { + Rect().width(Constants.SHAPE_DIA).height(Constants.SHAPE_DIA) + .fill($r('app.color.background_color')) + Circle().width(Constants.SHAPE_BIG_DIA).height(Constants.SHAPE_BIG_DIA) + .fill($r('app.color.list_background_color')) + }.width(Constants.SHAPE_DIA) + + Shape() { + Rect().width(Constants.SHAPE_DIA).height(Constants.SHAPE_DIA) + .fill($r('app.color.background_color')) + Circle().width(Constants.SHAPE_BIG_DIA).height(Constants.SHAPE_BIG_DIA) + .fill($r('app.color.list_background_color')).offset({ x: Constants.SHAPE_OFFSET_X }) + }.width(Constants.SHAPE_DIA) + }.width(Constants.FULL_WIDTH).height(Constants.SHAPE_DIA).zIndex(Constants.SHAPE_ZINDEX) + .position({ x: 0, y: Constants.MANAGEMENT_ROW_MARGIN_TOP }) .padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) } - } else { - Row() { - List() { - ForEach(this.applicationItem.slice(Constants.SLICE_START, this.applicationItem.length - 1), - (item) => { - this.ListItemLayout(item, Constants.SLICE_START_INDEX) - }, item => item.toString()) - ForEach(this.applicationItem.slice(Constants.SLICE_END), (item, index) => { - this.ListItemLayout(item, Constants.SLICE_END_INDEX) - }, item => item.toString()) - }.backgroundColor($r('app.color.default_background_color')) - .borderRadius(Constants.BORDER_RADIUS) - .padding({ top: Constants.LIST_PADDING_TOP, bottom: Constants.LIST_PADDING_BOTTOM }) - }.padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) - } - }.margin({ top: Constants.MANAGEMENT_ROW_MARGIN_TOP }) - .scrollBar(BarState.Off) - } - .backgroundColor($r('app.color.background_color')) - .margin({ bottom: Constants.APPLICATION_LIST_MARGIN_BOTTOM }) + Scroll() { + if (!this.applicationItem.length) { + if (this.searchResult) { + Row() { + List() { + ForEach(this.applicationItem.slice(Constants.SLICE_START, this.applicationItem.length - 1), + (item) => { + this.ListItemLayout(item, Constants.SLICE_START_INDEX) + }, item => item.toString()) + ForEach(this.applicationItem.slice(Constants.SLICE_END), (item, index) => { + this.ListItemLayout(item, Constants.SLICE_END_INDEX) + }, item => item.toString()) + }.backgroundColor($r('app.color.default_background_color')) + .borderRadius(Constants.BORDER_RADIUS) + }.margin({ top: Constants.MANAGEMENT_ROW_MARGIN_TOP }) + .padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) + } else { + Row() { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Image($r('app.media.searchnoresult')) + .customizeImage(Constants.SEARCHNORESULT_IMAGE_WIDTH, Constants.SEARCHNORESULT_IMAGE_HEIGHT) + } + }.margin({ top: Constants.MANAGEMENT_ROW_MARGIN_TOP }) + .padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) + } + } else { + Row() { + List() { + ForEach(this.applicationItem.slice(Constants.SLICE_START, this.applicationItem.length - 1), + (item) => { + this.ListItemLayout(item, Constants.SLICE_START_INDEX) + }, item => item.toString()) + ForEach(this.applicationItem.slice(Constants.SLICE_END), (item, index) => { + this.ListItemLayout(item, Constants.SLICE_END_INDEX) + }, item => item.toString()) + }.backgroundColor($r('app.color.default_background_color')) + .borderRadius(Constants.BORDER_RADIUS) + .padding({ top: Constants.LIST_PADDING_TOP, bottom: Constants.LIST_PADDING_BOTTOM }) + .margin({ bottom: Constants.LIST_MARGIN_BOTTOM }) + }.padding({ left: Constants.MANAGEMENT_ROW_PADDING_LEFT }) + } + }.margin({ top: Constants.MANAGEMENT_ROW_MARGIN_TOP }) + .scrollBar(BarState.Off) + }.backgroundColor($r('app.color.background_color')) + }.scrollBar(BarState.Off) + }.margin({ bottom: Constants.APPLICATION_LIST_MARGIN_BOTTOM }) Scroll() { Column() { alphabetIndexerComponent({ applicationItem: $applicationItem, oldApplicationItem: $oldApplicationItem }) - } - .margin({ top: Constants.APPLICATION_ALPHABETINDEX_MARGIN_TOP }) + }.margin({ top: Constants.APPLICATION_ALPHABETINDEX_MARGIN_TOP }) .width(Constants.APPLICATION_ALPHABETINDEX_WIDTH) } } diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-secondary.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-secondary.ets similarity index 98% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-secondary.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-secondary.ets index d0f2306e0..2aa50d42d 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-secondary.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-secondary.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; -import { permissionGroups, groups } from "../common/model/permissionGroup.ets"; +import { backBar } from "../common/components/backBar"; +import { permissionGroups, groups } from "../common/model/permissionGroup"; import router from '@system.router'; -import Constants from '../common/utils/constant.ets'; +import Constants from '../common/utils/constant'; var TAG = 'PermissionManager_MainAbility:' diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-tertiary-groups.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets similarity index 96% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-tertiary-groups.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets index 0339a0f6c..c64499503 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-tertiary-groups.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-tertiary-groups.ets @@ -13,16 +13,17 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; -import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex.ets"; -import { textInput } from "../common/components/search.ets"; +import { backBar } from "../common/components/backBar"; +import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex"; +import { textInput } from "../common/components/search"; import router from '@system.router'; import bundle from "@ohos.bundle"; +import Resmgr from '@ohos.resourceManager'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import { getAppLabel, getAppIcon, verifyAccessToken} from "../common/utils/utils"; -import { makePy } from "../common/utils/utils.ets"; -import { authorizeDialog } from "../common/components/dialog.ets"; -import Constants from '../common/utils/constant.ets'; +import { makePy } from "../common/utils/utils"; +import { authorizeDialog } from "../common/components/dialog"; +import Constants from '../common/utils/constant'; var TAG = 'PermissionManager_MainAbility:' @@ -121,6 +122,7 @@ struct applicationItem { @State applicationList: ApplicationObj[] = []; // application info array @State oldApplicationItem: ApplicationObj[] = []; // Original application information array @State searchResult: boolean = true; // search results + @State placeholder: string = '' authorizeDialogController: CustomDialogController = new CustomDialogController({ builder: authorizeDialog({ }), @@ -263,6 +265,12 @@ struct applicationItem { }) }) + Resmgr.getResourceManager(globalThis.context, Constants.BUNDLE_NAME).then(item => { + item.getString($r("app.string.textInput_placeholder").id, (err, val) => { + this.placeholder = val + }) + }) + // initial then fill values when sync return which may cause sync panic for (let i = 0; i < bundleNames.length; i++) { this.applicationList.push( @@ -328,7 +336,7 @@ struct applicationItem { Column() { Row() { textInput({ - placeholder: $r('app.string.textInput_placeholder'), + placeholder: this.placeholder, applicationItem: $applicationList, oldApplicationItem: $oldApplicationItem, searchResult: $searchResult diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-tertiary.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-tertiary.ets similarity index 95% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-tertiary.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-tertiary.ets index 7fe2c1f73..941129102 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/authority-tertiary.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/authority-tertiary.ets @@ -13,16 +13,17 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; -import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex.ets"; -import { textInput } from "../common/components/search.ets"; +import { backBar } from "../common/components/backBar"; +import { alphabetIndexerComponent } from "../common/components/alphabeticalIndex"; +import { textInput } from "../common/components/search"; import router from '@system.router'; import bundle from "@ohos.bundle"; +import Resmgr from '@ohos.resourceManager'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import { getAppLabel, getAppIcon, verifyAccessToken } from "../common/utils/utils"; -import { makePy } from "../common/utils/utils.ets"; -import { authorizeDialog } from "../common/components/dialog.ets"; -import Constants from '../common/utils/constant.ets'; +import { makePy } from "../common/utils/utils"; +import { authorizeDialog } from "../common/components/dialog"; +import Constants from '../common/utils/constant'; var TAG = 'PermissionManager_MainAbility:' @@ -116,6 +117,7 @@ struct applicationItem { @State applicationList: ApplicationObj[] = []; // application info array @State oldApplicationItem: ApplicationObj[] = []; // Original application information array @State searchResult: boolean = true; // search results + @State placeholder: string = '' authorizeDialogController: CustomDialogController = new CustomDialogController({ builder: authorizeDialog({ }), @@ -237,6 +239,12 @@ struct applicationItem { aboutToAppear() { let bundleNames = routerData[0].bundleNames; + Resmgr.getResourceManager(globalThis.context, Constants.BUNDLE_NAME).then(item => { + item.getString($r("app.string.textInput_placeholder").id, (err, val) => { + this.placeholder = val + }) + }) + // initial then fill values when sync return which may cause sync panic for (let i = 0; i < bundleNames.length; i++) { this.applicationList.push( @@ -288,7 +296,7 @@ struct applicationItem { Column() { Row() { textInput({ - placeholder: $r('app.string.textInput_placeholder'), + placeholder: this.placeholder, applicationItem: $applicationList, oldApplicationItem: $oldApplicationItem, searchResult: $searchResult diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/dialogPlus.ets similarity index 43% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/dialogPlus.ets index 921df5f1f..f833b2b93 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/GrantAbility/common/components/dialog.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/dialogPlus.ets @@ -13,14 +13,14 @@ * limitations under the License. */ -import { getPermissionGroup, Log } from '../utils/utils.ets' -import { BundleFlag, USER_ID } from '../model/bundle.ets' -import Constants from '../utils/constant.ets' -import featureAbility from '@ohos.ability.featureAbility' -import abilityAccessCtrl from '@ohos.abilityAccessCtrl' -import bundle from '@ohos.bundle' +import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; +import bundle from '@ohos.bundle'; import Resmgr from '@ohos.resourceManager' -import { permissionGroups, showSubpermissionsGrop } from "../model/permissionGroup.ets"; +import rpc from '@ohos.rpc'; +import { Log, getPermissionGroup } from '../common/utils/utils' +import Constants from '../common/utils/constant' +import { BundleFlag } from '../common/model/bundle' +import { permissionGroups, showSubpermissionsGrop } from '../common/model/permissionGroup' @Extend(Button) function customizeButton() { .backgroundColor($r('app.color.default_background_color')) @@ -30,94 +30,103 @@ import { permissionGroups, showSubpermissionsGrop } from "../model/permissionGro .width(Constants.BUTTON_WIDTH) } -@CustomDialog -export struct privacyDialog { - @Link count: number - @Link result: Array - controller: CustomDialogController - cancel: (group, accessTokenId, permissionList, userFixedFlag) => void - confirm: (group, accessTokenId, permissionList, userFixedFlag) => void +@Entry +@Component +struct dialogPlusPage { + @State count: number = 0 + @State result: Array = [] @State accessTokenId: number = 0 @State initStatus: number = Constants.INIT_NEED_TO_WAIT @State reqPerms: Array = [] @State grantGroups: Array = [] @State userFixedFlag: number = 2 // means user fixed @State appName: string = "" + @State win: any = "" + @State proxy: any = '' build() { - Column() { - if ((this.initStatus != Constants.INIT_NEED_TO_WAIT) && this.verify()) { - Image(this.grantGroups[this.count].icon) - .width(Constants.DIALOG_ICON_WIDTH) - .height(Constants.DIALOG_ICON_HEIGHT) - .fillColor($r("app.color.first_font_color")) - .margin({ - top: Constants.DIALOG_ICON_MARGIN_TOP - }) - Text(`${this.count + 1} / ${this.grantGroups.length}`) - .fontSize(Constants.DIALOG_LABEL_FONT_SIZE) - .fontColor($r('app.color.text_secondary_color')) - .lineHeight(Constants.DIALOG_LABEL_LINE_HEIGHT) - .margin({ - top: Constants.DIALOG_LABEL_MARGIN_TOP - }) - Column() { - Row() { - Flex({ justifyContent: FlexAlign.Start }) { - Text("是否允许" + this.appName + - this.grantGroups[this.count].label).fontSize(Constants.DIALOG_REQ_FONT_SIZE) - .fontColor($r('app.color.first_font_color')) - .fontWeight(FontWeight.Medium) - .fontSize(Constants.DIALOG_REQ_FONT_SIZE) - .lineHeight(Constants.DIALOG_REQ_LINE_HEIGHT) - .margin({ - top: Constants.DIALOG_REQ_MARGIN_TOP, - left: Constants.DIALOG_REQ_MARGIN_LEFT - }) + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { + Column() { + if ((this.initStatus != Constants.INIT_NEED_TO_WAIT) && this.verify()) { + Image(this.grantGroups[this.count].icon) + .width(Constants.DIALOG_ICON_WIDTH) + .height(Constants.DIALOG_ICON_HEIGHT) + .fillColor($r("app.color.first_font_color")) + .margin({ + top: Constants.DIALOG_ICON_MARGIN_TOP + }) + Text(`${this.count + 1} / ${this.grantGroups.length}`) + .fontSize(Constants.DIALOG_LABEL_FONT_SIZE) + .fontColor($r('app.color.text_secondary_color')) + .lineHeight(Constants.DIALOG_LABEL_LINE_HEIGHT) + .margin({ + top: Constants.DIALOG_LABEL_MARGIN_TOP + }) + Column() { + Row() { + Flex({ justifyContent: FlexAlign.Start }) { + Text("是否允许" + this.appName + + this.grantGroups[this.count].label) + .fontSize(Constants.DIALOG_REQ_FONT_SIZE) + .fontColor($r('app.color.first_font_color')) + .fontWeight(FontWeight.Medium) + .fontSize(Constants.DIALOG_REQ_FONT_SIZE) + .lineHeight(Constants.DIALOG_REQ_LINE_HEIGHT) + .margin({ + top: Constants.DIALOG_REQ_MARGIN_TOP, + left: Constants.DIALOG_REQ_MARGIN_LEFT + }) + } } - } - Row() { - Flex({ justifyContent: FlexAlign.Start }) { - Text(this.grantGroups[this.count].description).fontSize(Constants.DIALOG_DESP_FONT_SIZE) - .fontColor($r('app.color.text_secondary_color')) - .fontSize(Constants.DIALOG_DESP_FONT_SIZE) - .lineHeight(Constants.DIALOG_DESP_LINE_HEIGHT) - .margin({ - top: Constants.DIALOG_DESP_MARGIN_TOP, - left: Constants.DIALOG_DESP_MARGIN_LEFT, - right: Constants.DIALOG_DESP_MARGIN_RIGHT, - bottom: Constants.DIALOG_DESP_MARGIN_BOTTOM - }) + + Row() { + Flex({ justifyContent: FlexAlign.Start }) { + Text(this.grantGroups[this.count].description) + .fontSize(Constants.DIALOG_DESP_FONT_SIZE) + .fontColor($r('app.color.text_secondary_color')) + .fontSize(Constants.DIALOG_DESP_FONT_SIZE) + .lineHeight(Constants.DIALOG_DESP_LINE_HEIGHT) + .margin({ + top: Constants.DIALOG_DESP_MARGIN_TOP, + left: Constants.DIALOG_DESP_MARGIN_LEFT, + right: Constants.DIALOG_DESP_MARGIN_RIGHT, + bottom: Constants.DIALOG_DESP_MARGIN_BOTTOM + }) + } } } } - } - Row() { - Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { - Button('禁止') - .fontSize(Constants.BUTTON_FONT_SIZE) - .onClick(() => { - this.cancel(this.grantGroups[this.count], this.accessTokenId, this.reqPerms, this.userFixedFlag) - if (this.count === this.reqPerms.length) { - this.controller.close() - } - }).customizeButton().margin({ left: Constants.BUTTON_MARGIN_LEFT }) - Text('|').fontSize(Constants.BUTTON_DIVIDER_FONT_SIZE).fontColor($r('app.color.divider_color')) - Button('允许') - .fontSize(Constants.BUTTON_FONT_SIZE) - .onClick(() => { - this.confirm(this.grantGroups[this.count], this.accessTokenId, this.reqPerms, this.userFixedFlag) - if (this.count === this.reqPerms.length) { - this.controller.close() - } - }).customizeButton().margin({ right: Constants.BUTTON_MARGIN_RIGHT }) + Row() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Button('禁止') + .fontSize(Constants.BUTTON_FONT_SIZE) + .onClick(() => { + this.privacyCancel(this.grantGroups[this.count], this.accessTokenId, this.reqPerms, this.userFixedFlag) + }).customizeButton().margin({ left: Constants.BUTTON_MARGIN_LEFT }) + Text('|').fontSize(Constants.BUTTON_DIVIDER_FONT_SIZE).fontColor($r('app.color.divider_color')) + Button('允许') + .fontSize(Constants.BUTTON_FONT_SIZE) + .onClick(() => { + this.privacyAccept(this.grantGroups[this.count], this.accessTokenId, this.reqPerms, this.userFixedFlag) + }).customizeButton().margin({ right: Constants.BUTTON_MARGIN_RIGHT }) + } } } + .backgroundColor($r('app.color.default_background_color')) + .borderRadius(Constants.DIALOG_PRIVACY_BORDER_RADIUS) + .width(Constants.DIALOG_PRIVACY_WIDTH) + .padding({ bottom: Constants.DIALOG_PADDING_BOTTOM }) + }.width(Constants.FULL_WIDTH) + .height(Constants.FULL_HEIGHT) + } + + verify() { + if((this.initStatus == Constants.INIT_NEED_TO_TERMINATED) || (this.count >= this.grantGroups.length)) { + this.answerRequest() + this.initStatus = Constants.INIT_NEED_TO_WAIT + return false } - .backgroundColor($r('app.color.default_background_color')) - .borderRadius(Constants.DIALOG_BORDER_RADIUS) - .width(Constants.DIALOG_WIDTH) - .padding({ bottom: Constants.DIALOG_PADDING_BOTTOM }) + return true } answerRequest() { @@ -125,18 +134,131 @@ export struct privacyDialog { if (this.initStatus == Constants.INIT_NEED_TO_TERMINATED) { ret = Constants.RESULT_FAILURE } - Log.info("code:" + ret + ", result=" + JSON.stringify(this.result)) this.answer(ret, this.reqPerms) } - verify() { - if((this.initStatus == Constants.INIT_NEED_TO_TERMINATED) || (this.count >= this.grantGroups.length)) { - this.controller.close() - this.answerRequest() - this.initStatus = Constants.INIT_NEED_TO_WAIT - return false + answer(ret, reqPerms) { + Log.info("code:" + ret + ", perms="+ JSON.stringify(reqPerms) +", result=" + JSON.stringify(this.result)) + var perms = [] + var results = [] + reqPerms.forEach(perm => { + perms.push(perm) + }) + this.result.forEach(result => { + results.push(result) + }) + let option = new rpc.MessageOption() + let data = new rpc.MessageParcel() + let reply = new rpc.MessageParcel() + if(!data.writeStringArray(perms)) { + Log.error('writeStringArray permission failed!') + this.destruction() + return + } + if (!data.writeIntArray(results)) { + Log.error('writeIntArray result failed!') + this.destruction() + return + } + this.proxy.sendRequest(Constants.RESULT_CODE, data, reply, option) + this.destruction() + } + + destruction() { + this.win.destroy() + globalThis.windowNum -- + Log.info("windowNum:" + globalThis.windowNum) + if(globalThis.windowNum == 0) { + globalThis.extensionContext.terminateSelf() } - return true + } + + async privacyAccept(group, accessTokenId, permissionList, userFixedFlag) { + var acManager = abilityAccessCtrl.createAtManager() + var num = 0 + group.permissions.forEach(async permission => { + let result + if(showSubpermissionsGrop.indexOf(group.groupName) == -1) { + result = await acManager.grantUserGrantedPermission(accessTokenId, permission, userFixedFlag) + }else { + if(permissionList.includes(permission)) { + result = await acManager.grantUserGrantedPermission(accessTokenId, permission, userFixedFlag) + } + } + num ++ + Log.info("grant permission result:" + result + "permission" + permission) + if (result == abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED) { + permissionList.forEach((req, idx) => { + if(req == permission) { + this.result[idx] = abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED; + } + }) + Log.info("grant permission success:" + permission) + } else { + Log.error("failed to grant permission:" + permission + " ret:" + result) + } + if(num == group.permissions.length) { + this.count ++ + } + }) + } + + async privacyCancel(group, accessTokenId, permissionList, userFixedFlag) { + var acManager = abilityAccessCtrl.createAtManager() + group.permissions.forEach(async permission => { + let result + if(showSubpermissionsGrop.indexOf(group.groupName) == -1) { + result = await acManager.revokeUserGrantedPermission(accessTokenId, permission, userFixedFlag) + }else { + if(permissionList.includes(permission)) { + result = await acManager.revokeUserGrantedPermission(accessTokenId, permission, userFixedFlag) + } + } + Log.info("revoke permission result:" + result + "permission" + permission); + }) + this.count ++ + } + + getgrantGroups(stateGroup) { + this.reqPerms.forEach((permission, idx) => { + //已授权 + if(stateGroup[idx] == Constants.PASS_OPER) { + Log.info("permission has been fixed:" + permission) + this.result[idx] = abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED; + //待授权 + }else if(stateGroup[idx] == Constants.DYNAMIC_OPER) { + var group = getPermissionGroup(permission) + if(!group) { + Log.info("permission not find:" + permission) + }else { + var exist = this.grantGroups.find(grantGroup => grantGroup.name == group.name) + //判断是否为需要展示子权限的权限组 + if(showSubpermissionsGrop.indexOf(group.groupName) != -1) { + var permissionDetail + permissionGroups.forEach(permissionGroup => { + if(permissionGroup.permissionName == permission) { + //获取授权的权限信息 + permissionDetail = permissionGroup + } + }) + //权限组已存在的情况 + if(!exist) { + group.description = [permissionDetail.label] + this.grantGroups.push(group) + }else { + if(exist.description.indexOf(permissionDetail.label) == -1) { + exist.description.push(permissionDetail.label) + } + } + }else { + if(!exist) { + this.grantGroups.push(group) + } + } + } + } + }) + this.initStatus = Constants.INIT_NEED_TO_VERIFY } getApplicationName(uid) { @@ -144,7 +266,7 @@ export struct privacyDialog { Log.info("getApplicationName bundleName:" + data) Log.info("getApplicationName userId:" + Math.floor(uid/200000)) bundle.getApplicationInfo(data, BundleFlag.GET_BUNDLE_DEFAULT, Math.floor(uid/200000)).then(applicationInfo => { - Resmgr.getResourceManager(data).then(item => { + Resmgr.getResourceManager(globalThis.extensionContext, data).then(item => { item.getString(applicationInfo.labelId, (err, value) => { if (value == undefined) { this.appName = applicationInfo.label @@ -161,9 +283,9 @@ export struct privacyDialog { bundle.getBundleInfo(data, Constants.PARMETER_BUNDLE_FLAG).then(bundleInfo => { this.grantGroups.forEach((group, idx) => { if(group.description) { - Resmgr.getResourceManager(Constants.BUNDLE_NAME).then(item => { + Resmgr.getResourceManager(globalThis.extensionContext, Constants.BUNDLE_NAME).then(item => { Promise.all([item.getString($r("app.string.separator").id), - item.getString($r("app.string.reason_suffix").id)]) + item.getString($r("app.string.reason_suffix").id)]) .then(values => { group.description = group.description.join(values[0]) group.description += values[1] @@ -186,9 +308,9 @@ export struct privacyDialog { if(this.reqPerms.indexOf(permission) != -1) { bundleInfo.reqPermissionDetails.forEach(reqPermissionDetail => { if(reqPermissionDetail.name == permission) { - Resmgr.getResourceManager(bundleName).then(item => { + Resmgr.getResourceManager(globalThis.extensionContext, bundleName).then(item => { item.getString(reqPermissionDetail.reasonId, (err, value) => { - this.initStatus = Constants.INIT_NEED_TO_VERIFY + this.initStatus = Constants.INIT_NEED_TO_REFRESH if (value !== undefined && !group.hasReason) { group.description += value.slice(Constants.START_SUBSCRIPT, Constants.END_SUBSCRIPT) group.hasReason = true @@ -201,94 +323,24 @@ export struct privacyDialog { }) } - getgrantGroups(stateGroup) { - this.reqPerms.forEach((permission, idx) => { - //已授权 - if(stateGroup[idx] == Constants.PASS_OPER) { - Log.info("permission has been fixed:" + permission) - this.result[idx] = abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED; - //待授权 - }else if(stateGroup[idx] == Constants.DYNAMIC_OPER) { - var group = getPermissionGroup(permission) - if(!group) { - Log.info("permission not find:" + permission) - }else { - var exist = this.grantGroups.find(grantGroup => grantGroup.name == group.name) - //判断是否为需要展示子权限的权限组 - if(showSubpermissionsGrop.indexOf(group.groupName) != -1) { - var permissionDetail - permissionGroups.forEach(permissionGroup => { - if(permissionGroup.permissionName == permission) { - //获取授权的权限信息 - permissionDetail = permissionGroup - } - }) - //权限组已存在的情况 - if(!exist) { - group.description = [permissionDetail.label] - this.grantGroups.push(group) - }else { - if(exist.description.indexOf(permissionDetail.label) == -1) { - exist.description.push(permissionDetail.label) - } - } - }else { - if(!exist) { - this.grantGroups.push(group) - } - } - } - } - }) - } - - answer(ret, reqPerms) { - Log.info("code:" + ret + ", perms="+ JSON.stringify(reqPerms) +", result=" + JSON.stringify(this.result)) - var perms = [] - var results = [] - reqPerms.forEach(perm => { - perms.push(perm) - }) - this.result.forEach(result => { - results.push(result) - }) - featureAbility.terminateSelfWithResult({ - resultCode: ret, - want: { - parameters: { - "ohos.user.grant.permission": perms, - "ohos.user.grant.permission.result": results - } - } - }) - } - aboutToAppear() { this.count = 0; this.initStatus = Constants.INIT_NEED_TO_WAIT this.result = [] - featureAbility.getWant((err, want) => { - if (err.code != 0) { - Log.error("featureAbility.getWant err:" + err) - this.initStatus = Constants.INIT_NEED_TO_TERMINATED - return - } - this.reqPerms = want.parameters['ohos.user.grant.permission'] - this.accessTokenId = want.parameters['ohos.aafwk.param.callerToken'] - if (this.reqPerms == undefined || this.accessTokenId == undefined || this.reqPerms.length == 0) { - Log.info("invalid parameters") - this.initStatus = Constants.INIT_NEED_TO_TERMINATED - return - } - Log.info("request permission=" + JSON.stringify(this.reqPerms) + ", tokenId = " + this.accessTokenId) - Log.info("permission state=" + JSON.stringify(want.parameters['ohos.user.grant.permission.state'])); - this.result = new Array(this.reqPerms.length).fill(-1); - this.getgrantGroups(want.parameters['ohos.user.grant.permission.state']); - this.getApplicationName(want.parameters['ohos.aafwk.param.callerUid']) - }) - } - - aboutToDisappear() { - Log.info("aboutToDisappear") + this.reqPerms = globalThis.abilityWant.parameters['ohos.user.grant.permission'] + this.accessTokenId = globalThis.abilityWant.parameters['ohos.aafwk.param.callerToken'] + this.proxy = globalThis.abilityWant.parameters['ohos.ability.params.callback'].value + this.win = globalThis.extensionWin + if (this.reqPerms == undefined || this.accessTokenId == undefined || this.reqPerms.length == 0) { + Log.info("invalid parameters") + this.initStatus = Constants.INIT_NEED_TO_TERMINATED + return + } + Log.info("request permission=" + JSON.stringify(this.reqPerms) + ", tokenId = " + this.accessTokenId) + Log.info("permission state=" + JSON.stringify(globalThis.abilityWant.parameters['ohos.user.grant.permission.state'])); + this.result = new Array(this.reqPerms.length).fill(-1); + this.getgrantGroups(globalThis.abilityWant.parameters['ohos.user.grant.permission.state']); + this.getApplicationName(globalThis.abilityWant.parameters['ohos.aafwk.param.callerUid']) } } + diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/other-permissions.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/other-permissions.ets similarity index 95% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/other-permissions.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/other-permissions.ets index 831063aac..3c8b21bfd 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/other-permissions.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/other-permissions.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import { backBar } from "../common/components/backBar.ets"; +import { backBar } from "../common/components/backBar"; import router from '@system.router'; -import Constants from '../common/utils/constant.ets'; -import { otherPermissionsLabel } from '../common/model/permissionGroup.ets' +import Constants from '../common/utils/constant'; +import { otherPermissionsLabel } from '../common/model/permissionGroup' import abilityAccessCtrl from '@ohos.abilityAccessCtrl' var TAG = 'PermissionManager_MainAbility:' let routerData = router.getParams().routerData; // Routing jump data -let tokenId = router.getParams().tokenId; // tokenId for verify permission +let tokenId: any = router.getParams().tokenId; // tokenId for verify permission let backTitle = router.getParams().backTitle; // return title name let status = router.getParams().status; // Status: Allowed, Forbidden -let permissions = router.getParams().permission; // permissions name +let permissions: any = router.getParams().permission; // permissions name let otherPermissionList = []; // otherPermission List for (let i = 0; i < permissions.length; i++) { otherPermissionList.push({ diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/permission-access-record.ets b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/permission-access-record.ets similarity index 79% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/permission-access-record.ets rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/permission-access-record.ets index 14694233c..f54e79f9e 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/pages/permission-access-record.ets +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/pages/permission-access-record.ets @@ -18,10 +18,10 @@ import router from '@system.router'; import Resmgr from '@ohos.resourceManager' import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import privacyManager from '@ohos.privacyManager' -import { backBar } from "../common/components/backBar.ets"; -import Constants from '../common/utils/constant.ets'; -import { noNeedDisplayApp, userGrantPermissions, permissionGroupIds } from "../common/model/permissionGroup.ets"; -import { getPermissionGroup } from '../common/utils/utils.ets' +import { backBar } from "../common/components/backBar"; +import Constants from '../common/utils/constant'; +import { noNeedDisplayApp, userGrantPermissions, permissionGroupIds } from "../common/model/permissionGroup"; +import { getPermissionGroup } from '../common/utils/utils' var TAG = 'PermissionManager_MainAbility:' @@ -167,7 +167,7 @@ struct permissionRecordPage { Row().width(Constants.FULL_WIDTH).height(Constants.TEXT_DECORATION_HEIGHT) .backgroundColor($r("app.color.label_color_lightest")) .margin({ bottom: Constants.LISTITEM_MARGIN_BOTTOM_APPLICATION }) - Text(permission.label || permission.groupName) + Text(permission.groupName) .fontSize(Constants.TEXT_MIDDLE_FONT_SIZE) .fontWeight(FontWeight.Medium) .fontColor($r('app.color.label_color')) @@ -225,50 +225,68 @@ struct permissionRecordPage { Row() { Column() { Column() { - Stack() { - Tabs() { - TabContent() { - Row() { - Column() { - Scroll() { - Row() { - List() { - ForEach(this.groups, (item, index) => { - this.ListItemLayout(item, index, Constants.PERMISSION) - }, item => item.toString()) - }.padding({ top: Constants.LIST_PADDING_TOP, bottom: Constants.LIST_PADDING_BOTTOM }) - }.padding({ - left: Constants.MANAGEMENT_ROW_PADDING_LEFT, - right: Constants.MANAGEMENT_ROW_PADDING_RIGHT, - top: Constants.MANAGEMENT_ROW_PADDING_TOP - }) - }.scrollBar(BarState.Off) - }.width(Constants.FULL_WIDTH) - } - }.tabBar($r('app.string.authority')) - TabContent() { - Row() { - Column() { - Scroll() { - Row() { - List() { - ForEach(this.applicationInfos, (item, index) => { - this.ListItemLayout(item, index, Constants.APPLICATION) - }, item => item.toString()) - }.padding({ top: Constants.LIST_PADDING_TOP, bottom: Constants.LIST_PADDING_BOTTOM }) - }.padding({ - left: Constants.MANAGEMENT_ROW_PADDING_LEFT, - right: Constants.MANAGEMENT_ROW_PADDING_RIGHT, - top: Constants.MANAGEMENT_ROW_PADDING_TOP - }) - }.scrollBar(BarState.Off) - }.width(Constants.FULL_WIDTH) - } - }.tabBar($r('app.string.application')) - } - .barWidth(Constants.BAR_WIDTH) - .barMode(BarMode.Fixed) - }.height(Constants.FULL_HEIGHT) + Flex({ justifyContent: FlexAlign.Start }) { + Text($r('app.string.record_time_limit')) + .margin({ left: Constants.BACKBAR_IMAGE_MARGIN_LEFT }) + .fontSize(Constants.TEXT_SMAL_FONT_SIZE) + .fontColor($r('app.color.label_color_light')) + } + if(this.groups.length) { + Stack() { + Tabs() { + TabContent() { + Row() { + Column() { + Scroll() { + Row() { + List() { + ForEach(this.groups, (item, index) => { + this.ListItemLayout(item, index, Constants.PERMISSION) + }, item => item.toString()) + }.padding({ top: Constants.LIST_PADDING_TOP, bottom: Constants.LIST_PADDING_BOTTOM }) + }.padding({ + left: Constants.MANAGEMENT_ROW_PADDING_LEFT, + right: Constants.MANAGEMENT_ROW_PADDING_RIGHT, + top: Constants.MANAGEMENT_ROW_PADDING_TOP + }) + }.scrollBar(BarState.Off) + }.width(Constants.FULL_WIDTH) + } + }.tabBar($r('app.string.authority')) + TabContent() { + Row() { + Column() { + Scroll() { + Row() { + List() { + ForEach(this.applicationInfos, (item, index) => { + this.ListItemLayout(item, index, Constants.APPLICATION) + }, item => item.toString()) + }.padding({ top: Constants.LIST_PADDING_TOP, bottom: Constants.LIST_PADDING_BOTTOM }) + }.padding({ + left: Constants.MANAGEMENT_ROW_PADDING_LEFT, + right: Constants.MANAGEMENT_ROW_PADDING_RIGHT, + top: Constants.MANAGEMENT_ROW_PADDING_TOP + }) + }.scrollBar(BarState.Off) + }.width(Constants.FULL_WIDTH) + } + }.tabBar($r('app.string.application')) + } + .barWidth(Constants.BAR_WIDTH) + .barMode(BarMode.Fixed) + }.height(Constants.FULL_HEIGHT) + }else { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center, direction: FlexDirection.Column }) { + Image($r('app.media.noRecord')) + .customizeImage(Constants.NORECORD_IMAGE_WIDTH, Constants.NORECORD_IMAGE_HEIGHT) + .margin({ left: Constants.NORECORD_IMAGE_MARGIN_LEFT }) + Text($r('app.string.no_record')).margin({ top: Constants.DIALOG_REQ_MARGIN_TOP }) + .fontSize(Constants.TEXT_SMAL_FONT_SIZE) + .fontColor($r('app.color.label_color_light')) + }.width(Constants.FULL_WIDTH).height(Constants.FULL_HEIGHT) + .padding({ bottom: Constants.RECORD_PADDING_BOTTOM }) + } } } } @@ -304,7 +322,7 @@ struct permissionRecordPage { */ getTime(time, format='MM月DD日 NNHH:mm') { if(this.strings.morning == 'am') { format = 'MM/DD HH:mm NN' } - let date = new Date(time) + let date = new Date(time * 1000) let config = { MM: date.getMonth() + 1, DD: date.getDate(), @@ -333,7 +351,7 @@ struct permissionRecordPage { } getStrings() { - Resmgr.getResourceManager(Constants.BUNDLE_NAME).then(item => { + Resmgr.getResourceManager(globalThis.context, Constants.BUNDLE_NAME).then(item => { item.getString($r("app.string.visits").id, (err, val) => { this.strings.visits = val }) @@ -351,7 +369,7 @@ struct permissionRecordPage { }) } - getInfo(record) { + getInfo(record, sortFlag) { bundle.getBundleInfo(record.bundleName, Constants.PARMETER_BUNDLE_FLAG).then(async info => { var reqUserPermissions: string[] = []; var reqUserRecords: any[] = []; @@ -380,22 +398,22 @@ struct permissionRecordPage { } let groupNames = []; + let appLastTime = 0; reqUserRecords.forEach(reqUserRecord => { var group = getPermissionGroup(reqUserRecord.permissionName) if(!group) { console.info(TAG + "permission not find:" + reqUserRecord.permissionName) }else { var existing = permissionGroups.find(permissionGroup => permissionGroup.name == group.name) - var lastTime = reqUserRecord.lastAccessTime > reqUserRecord.lastRejectTime - ? reqUserRecord.lastAccessTime : reqUserRecord.lastRejectTime + var lastTime = reqUserRecord.lastAccessTime + lastTime > appLastTime ? appLastTime = lastTime : '' if(!existing) { - group['count' + record.tokenId] = reqUserRecord.accessCount + reqUserRecord.rejectCount + group['count' + record.tokenId] = reqUserRecord.accessCount group['lastTime' + record.tokenId] = lastTime permissionGroups.push(group) groupNames.push(group.groupName) }else { existing['count' + record.tokenId] += reqUserRecord.accessCount - existing['count' + record.tokenId] += reqUserRecord.rejectCount lastTime > existing['lastTime' + record.tokenId] ? existing['lastTime' + record.tokenId] = lastTime : '' } } @@ -408,7 +426,7 @@ struct permissionRecordPage { } } - await Resmgr.getResourceManager(info.name).then(item => { + await Resmgr.getResourceManager(globalThis.context, info.name).then(item => { item.getString(info.appInfo['labelId'], (error, value) => { if (value == undefined) { appInfo['groupName'] = info.appInfo.label; @@ -428,7 +446,14 @@ struct permissionRecordPage { appInfo.permissions = permissionGroups appInfo.groupNames = groupNames appInfo.groupIds = groupIds + appInfo.appLastTime = appLastTime this.applicationInfos.push(appInfo) + if(sortFlag) { + var appInfos: any[] = [] + this.applicationInfos.forEach(item => { appInfos.push(item) }) + appInfos.sort((a, b) => { return b.appLastTime - a.appLastTime }) + this.applicationInfos = appInfos + } }) } @@ -459,21 +484,19 @@ struct permissionRecordPage { continue; } console.info(TAG + "record: " + JSON.stringify(record)) - this.getInfo(record) + this.getInfo(record, (i + 1) == records.bundleRecords.length) record.permissionRecords.forEach(permissionRecord => { var group = getPermissionGroup(permissionRecord.permissionName) if(group) { var exist = groupArray.find(permissionGroup => permissionGroup.name == group.name) - var lastTime = permissionRecord.lastAccessTime > permissionRecord.lastRejectTime - ? permissionRecord.lastAccessTime : permissionRecord.lastRejectTime + var lastTime = permissionRecord.lastAccessTime if(!exist) { - group.sum = permissionRecord.accessCount + permissionRecord.rejectCount + group.sum = permissionRecord.accessCount group.recentVisit = lastTime groupArray.push(group) }else { exist.sum += permissionRecord.accessCount - exist.sum += permissionRecord.rejectCount lastTime > exist.recentVisit ? exist.recentVisit = lastTime : '' } } diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/module.json5 b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/module.json5 new file mode 100644 index 000000000..321012a87 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/module.json5 @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2022 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 + * + * 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. + */ + +{ + "module": { + "name": "permissionmanager", + "type": "feature", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:permissionmanager_desc", + "mainElement": "MainAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "abilities": [ + { + "name": "com.ohos.permissionmanager.MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:MainAbility_desc", + "icon": "$media:icon", + "label": "$string:MainAbility_label", + "visible": true, + "launchType": "standard" + } + ], + "extensionAbilities": [ + { + "icon": "$media:icon", + "name": "com.ohos.permissionmanager.GrantAbility", + "srcEntrance": "./ets/ServiceExtAbility/ServiceExtAbility.ts", + "type": "service", + "visible": true + } + ], + "requestPermissions": [ + { + "name": "ohos.permission.GET_SENSITIVE_PERMISSIONS", + }, + { + "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS" + }, + { + "name": "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS" + }, + { + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + }, + { + "name": "ohos.permission.GET_BUNDLE_INFO" + }, + { + "name": "ohos.permission.PERMISSION_USED_STATS" + } + ] + } +} \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/ar/properties/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/ar/profile/string.json similarity index 100% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/ar/properties/string.json rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/ar/profile/string.json diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/string.json index 2bb880381..a1b07a981 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/string.json +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/element/string.json @@ -1,16 +1,16 @@ { "string": [ { - "name": "permissionmanager_MainAbility", - "value": "authority management" + "name": "permissionmanager_desc", + "value": "permissionmanager" }, { - "name": "description_mainability", - "value": "authority management" + "name": "MainAbility_desc", + "value": "manage the permissions of all applications from the permission and application dimensions" }, { - "name": "permissionmanager_GrantAbility", - "value": "apply for permission" + "name": "MainAbility_label", + "value": "permission manage" }, { "name": "no_permission", @@ -52,10 +52,6 @@ "name": "banned", "value": "banned" }, - { - "name": "description_grantability", - "value": "apply for permission" - }, { "name": "Authorization_failed", "value": "Authorization failure!" @@ -83,6 +79,14 @@ { "name": "afternoon", "value": "pm" + }, + { + "name": "no_record", + "value": "No permission access record" + }, + { + "name": "record_time_limit", + "value": "Access records in the last 7 days" } ] } \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/ic_call_logs.svg b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/ic_call_logs.svg index 863cc3e31..8826af67d 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/ic_call_logs.svg +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/ic_call_logs.svg @@ -1,6 +1,6 @@ + viewBox="0 0 96 96" style="enable-background:new 0 0 96 96;" xml:space="preserve" fill="#99000000"> diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/noRecord.svg b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/noRecord.svg new file mode 100644 index 000000000..bc844b758 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/media/noRecord.svg @@ -0,0 +1,20 @@ + + + EmptyPage/04 NoRecord + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/profile/main_pages.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/profile/main_pages.json new file mode 100644 index 000000000..c2e856f09 --- /dev/null +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,13 @@ +{ + "src": [ + "pages/authority-management", + "pages/application-secondary", + "pages/authority-secondary", + "pages/authority-tertiary", + "pages/application-tertiary", + "pages/other-permissions", + "pages/authority-tertiary-groups", + "pages/permission-access-record", + "pages/dialogPlus" + ] +} diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/dark/properties/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/dark/profile/string.json similarity index 100% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/dark/properties/string.json rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/dark/profile/string.json diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/en/properties/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/en/profile/string.json similarity index 100% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/en/properties/string.json rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/en/profile/string.json diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/light/properties/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/light/profile/string.json similarity index 100% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/light/properties/string.json rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/light/profile/string.json diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/zh/properties/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/zh/profile/string.json similarity index 100% rename from frameworks/com.ohos.permissionmanager/permissionmanager/src/main/ets/MainAbility/resources/zh/properties/string.json rename to frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/zh/profile/string.json diff --git a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/zh_CN/element/string.json b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/zh_CN/element/string.json index 5bb4fd1a0..e92d068a4 100644 --- a/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/zh_CN/element/string.json +++ b/frameworks/com.ohos.permissionmanager/permissionmanager/src/main/resources/zh_CN/element/string.json @@ -1,16 +1,16 @@ { "string": [ { - "name": "permissionmanager_MainAbility", + "name": "permissionmanager_desc", "value": "权限管理" }, { - "name": "description_mainability", - "value": "权限管理" + "name": "MainAbility_desc", + "value": "从权限和应用两个维度来管理所有应用申请的权限。" }, { - "name": "permissionmanager_GrantAbility", - "value": "权限申请" + "name": "MainAbility_label", + "value": "权限管理" }, { "name": "no_permission", @@ -52,10 +52,6 @@ "name": "banned", "value": "已禁止" }, - { - "name": "description_grantability", - "value": "权限申请" - }, { "name": "Authorization_failed", "value": "授权失败!" @@ -83,6 +79,14 @@ { "name": "afternoon", "value": "下午" + }, + { + "name": "no_record", + "value": "没有权限访问记录" + }, + { + "name": "record_time_limit", + "value": "近7天访问记录" } ] } \ No newline at end of file -- Gitee