Add new method to get URI to monitor battery history data is updated

we will reload the database battery history data if its content is changed, which can be done through monitored the database content observer (a part of this patch cl/383366685)

Bug: 192613268
Test: make SettingsRoboTests
Change-Id: I24ab154b1dfa00ca4bf4e6f7b308f5061578bcb5
This commit is contained in:
ykhung
2021-07-07 15:15:13 +08:00
committed by YUKAI HUNG
parent 7af04e71fa
commit 70304cff07
3 changed files with 41 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ package com.android.settings.fuelgauge;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.SparseIntArray;
import com.android.internal.os.BatterySipper;
@@ -141,4 +142,9 @@ public interface PowerUsageFeatureProvider {
* Returns battery history data with corresponding timestamp key.
*/
Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context);
/**
* Returns {@link Uri} to monitor battery history data is update.
*/
Uri getBatteryHistoryUri();
}