mirror of
https://github.com/openharmony/applications_systemui.git
synced 2026-07-01 06:41:59 -04:00
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user