From a13fa55372fc7027e95deb440723b07445a6bb24 Mon Sep 17 00:00:00 2001 From: gaochao Date: Mon, 26 Sep 2022 15:04:26 +0800 Subject: [PATCH] =?UTF-8?q?[systemui]=E9=80=82=E9=85=8D=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AE=BF=E9=97=AE=E6=96=B0=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gaochao --- .../default/abilitymanager/abilityManager.ts | 18 ++++++++++++++++++ entry/pc/src/main/module.json5 | 6 ++++++ entry/phone/src/main/module.json5 | 6 ++++++ .../ohos/navigationservice/KeyCodeEvent.ts | 2 +- .../ets/com/ohos/viewmodel/VolumePanelVM.ts | 2 +- signature/systemui.p7b | Bin 3924 -> 3742 bytes 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/common/src/main/ets/default/abilitymanager/abilityManager.ts b/common/src/main/ets/default/abilitymanager/abilityManager.ts index e905d30b..fa37cb66 100644 --- a/common/src/main/ets/default/abilitymanager/abilityManager.ts +++ b/common/src/main/ets/default/abilitymanager/abilityManager.ts @@ -100,4 +100,22 @@ export default class AbilityManager { } }); } + + static startServiceExtensionAbility(context: ServiceExtensionContext, want: Want, callback?: (error?: BusinessError) => void): void { + Log.showDebug(TAG, `startServiceExtensionAbility, want: ${JSON.stringify(want)}`); + if (context == null) { + context = AbilityManager.getContext(); + } + context.startServiceExtensionAbility(want).then(() => { + Log.showInfo(TAG, 'startServiceExtensionAbility, then'); + if (callback) { + callback(); + } + }).catch((error: BusinessError) => { + Log.showError(TAG, `startServiceExtensionAbility, error: ${JSON.stringify(error)}`); + if (callback) { + callback(error); + } + }); + } } diff --git a/entry/pc/src/main/module.json5 b/entry/pc/src/main/module.json5 index 8ed9ca82..0b678fa4 100644 --- a/entry/pc/src/main/module.json5 +++ b/entry/pc/src/main/module.json5 @@ -72,6 +72,12 @@ { "name": "ohos.permission.DISTRIBUTED_DATASYNC", "reason": "$string:distributed_data_sync_reason" + }, + { + "name": "ohos.permission.START_INVISIBLE_ABILITY" + }, + { + "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ] } diff --git a/entry/phone/src/main/module.json5 b/entry/phone/src/main/module.json5 index c7f7a9f2..39b2d25d 100644 --- a/entry/phone/src/main/module.json5 +++ b/entry/phone/src/main/module.json5 @@ -72,6 +72,12 @@ { "name": "ohos.permission.DISTRIBUTED_DATASYNC", "reason": "$string:distributed_data_sync_reason" + }, + { + "name": "ohos.permission.START_INVISIBLE_ABILITY" + }, + { + "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" } ] } diff --git a/features/navigationservice/src/main/ets/com/ohos/navigationservice/KeyCodeEvent.ts b/features/navigationservice/src/main/ets/com/ohos/navigationservice/KeyCodeEvent.ts index ccd9c40d..3bd534f9 100644 --- a/features/navigationservice/src/main/ets/com/ohos/navigationservice/KeyCodeEvent.ts +++ b/features/navigationservice/src/main/ets/com/ohos/navigationservice/KeyCodeEvent.ts @@ -91,7 +91,7 @@ export class KeyCodeEvent { } private sendHomeKeyEvent() { - AbilityManager.startAbility(AbilityManager.getContext(AbilityManager.ABILITY_NAME_NAVIGATION_BAR), { + AbilityManager.startServiceExtensionAbility(AbilityManager.getContext(AbilityManager.ABILITY_NAME_NAVIGATION_BAR), { bundleName: Constants.LAUNCHER_BUNDLE_NAME, abilityName: Constants.LAUNCHER_ABILITY_NAME }); diff --git a/features/volumepanelcomponent/src/main/ets/com/ohos/viewmodel/VolumePanelVM.ts b/features/volumepanelcomponent/src/main/ets/com/ohos/viewmodel/VolumePanelVM.ts index aa650992..17dfe7b8 100644 --- a/features/volumepanelcomponent/src/main/ets/com/ohos/viewmodel/VolumePanelVM.ts +++ b/features/volumepanelcomponent/src/main/ets/com/ohos/viewmodel/VolumePanelVM.ts @@ -114,7 +114,7 @@ export class VolumePanelVM { updateVolumeInfo(volumeInfo: VolumeInfo): void { Log.showInfo(TAG, `updateVolumeInfo, volumeInfo: ${JSON.stringify(volumeInfo)} , mCurrentAudioVolumeType: ${this.mCurrentAudioVolumeType}`); - if (!volumeInfo.updateUi) { + if (!volumeInfo.updateUi && this.mIsMute.get() == volumeInfo.isMute) { return; } let volumeType = volumeInfo.volumeType; diff --git a/signature/systemui.p7b b/signature/systemui.p7b index 740ed7ac25ee542d79ba440e63bd76a4e854db79..4a9257baa3e90aeee81dfffa7391a12e2f747c5a 100644 GIT binary patch delta 730 zcmca2H%~Uxpowo58>d#AN85K^Ms}tJO?=%zp>`%lMnhf$ZZ^(@HV?*BW)>z!gC;g> zghIvzO>87#~N@b}<#hLkex_ODYsY+H#hI$5i21+_`;pF@jps=CN#99dnrTpUf z%)FA+^rFNPpcbI2($dTnC98>B)$5hY5_2+BGD|9ztg4mr@=J7+Qq%H_Kw3>LO)Shz zjZ7_cz~YH%C8uJxnjuKgs#Idifdo z#d^h+#U-h^rI|n-i3K@8Qy>EINr}ao$zZ_(-L%xil2VYPm4G_pp$ZZU3Y36uOia!x z2Dv3MCnvu=HANS~k5&R34s=>>W-%xnCvRmHoP3(qdNMbg=44AY&3YYl6?(xTjzJ;u zo_=AT!JbY&uJMjeo<5!-kxH>ZTM!0;Eh|a|`YkiL1ZW?MOf*O>(85wsP%0HXU+^%(Bd!)b!NJFWLAf|726#EW`eljmOcTiP09AI1I84k|*E*|IP*vA7$!GAS~Ayxz5GtwZ~V16CSRb%#%;2>m+no;_L4FLi&PU--e> q6-)~8%V&hn@5)^*8Qkr8aeAO&M9p6brRA?z-&^*S{T1II^DqF(bNbEz delta 900 zcmbOydqu9^pou?#jZ>@5qwPB{BRkWACVoetkS!A7TYn%M4E^KvNwfl^s&QE_H|o^D=ZZmN=%f|8-0fu4bq4w`IoehNs|5GI~z zR#2dul383*l$lgo0@7bnSpe3bUmTyASCX1uln4@r8&q1FnF2Im;!O2=n9+$jnJJki zl|WIbTfpwg%P-MQN=?fz0^4V5X<}h!YGi5wwHU4>F|8!E2;?F&3riDoW1tF%v9&N4 z!rW7onv<*6yUP^oB; zt(=p&SQS|zENxb6C@YOs6Uypm)kN}2ESfFA5XsFf2Bi{oyNXglDImE7XdSAeXmm4x z`b)tPrc{uf2~HtJd5JmTFadkHV6r}&IHSU3H#S8kUarmQY+u<}oeY{7?ItJkuC2E) zG&3+XH8nAcGSG*oWlk1DB^HJBnfgz5Z7nHHlA0WS&vsud7;uM@T7%jVlSU0V}azMgb42% qPoR>=o>e8gds9xGyE@Z$ySY%g`hjctNf~o^1-Mn0t-9mU{22h4Q~DYJ