1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

Update FwAppInstallerActivity progress bar on SetProgressAction

This commit is contained in:
José Rebelo 2022-05-22 10:34:22 +01:00 committed by Gitea
parent 1755b4e093
commit cb0dfaae79

View File

@ -19,6 +19,9 @@ package nodomain.freeyourgadget.gadgetbridge.service.btle.actions;
import android.bluetooth.BluetoothGatt;
import android.content.Context;
import android.content.Intent;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -53,6 +56,10 @@ public class SetProgressAction extends PlainAction {
public boolean run(BluetoothGatt gatt) {
LOG.info(toString());
GB.updateInstallNotification(this.text, this.ongoing, this.percentage, this.context);
final LocalBroadcastManager broadcastManager = LocalBroadcastManager.getInstance(context);
broadcastManager.sendBroadcast(new Intent(GB.ACTION_SET_PROGRESS_BAR).putExtra(GB.PROGRESS_BAR_PROGRESS, percentage));
return true;
}