1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 11:26:47 +01:00

Xiaomi: Send device update intent on activity fetch start and finish

This commit is contained in:
José Rebelo 2023-10-18 11:04:28 +01:00
parent e40b703678
commit 5316a7dcf8

View File

@ -136,6 +136,7 @@ public class XiaomiActivityFileFetcher {
final Context context = support.getContext(); final Context context = support.getContext();
GB.updateTransferNotification(context.getString(R.string.busy_task_fetch_activity_data),"", true, 0, context); GB.updateTransferNotification(context.getString(R.string.busy_task_fetch_activity_data),"", true, 0, context);
support.getDevice().setBusyTask(context.getString(R.string.busy_task_fetch_activity_data)); support.getDevice().setBusyTask(context.getString(R.string.busy_task_fetch_activity_data));
support.getDevice().sendDeviceUpdateIntent(support.getContext());
triggerNextFetch(); triggerNextFetch();
} }
} }
@ -148,6 +149,7 @@ public class XiaomiActivityFileFetcher {
isFetching = false; isFetching = false;
mHealthService.getSupport().getDevice().unsetBusyTask(); mHealthService.getSupport().getDevice().unsetBusyTask();
GB.updateTransferNotification(null, "", false, 100, mHealthService.getSupport().getContext()); GB.updateTransferNotification(null, "", false, 100, mHealthService.getSupport().getContext());
mHealthService.getSupport().getDevice().sendDeviceUpdateIntent(mHealthService.getSupport().getContext());
return; return;
} }