Describe the bug
The app usage time for a specified time range is collected for all apps.
Expected behavior
The app usage time for a specified time range should be collectable only for the apps which are blacklisted.
Possible solution
[x] Rename method to loadRemainingAppUsageTimeByBlacklist
[x] Add method parameter: List blacklist
[x] Query only for entries which are contained in the blacklist parameter
In the AppUsageDao:
@Query("SELECT (SELECT TOTAL(time_in_minutes * 60) FROM TimeCreditEntity "
+ "WHERE timestamp BETWEEN :dateFrom AND :dateTo) - TOTAL(usage_time_in_seconds) "
+ "FROM AppUsageEntity WHERE timestamp BETWEEN :dateFrom AND :dateTo")
LiveData<Integer> loadRemainingAppUsageTime(Date dateFrom, Date dateTo);
Describe the bug The app usage time for a specified time range is collected for all apps.
Expected behavior The app usage time for a specified time range should be collectable only for the apps which are blacklisted.
Possible solution
In the AppUsageDao: