Merge "Fix the issue that no data is returned when there is no full charge data in the database."
This commit is contained in:
committed by
Android (Google) Code Review
commit
0ba8fffbcc
@@ -43,8 +43,8 @@ public interface BatteryStateDao {
|
||||
|
||||
/** Gets the {@link Cursor} of all recorded data since last full charge within 7 days. */
|
||||
@Query("SELECT * FROM BatteryState WHERE timestamp >= :timestampSixDaysAgo AND timestamp >= "
|
||||
+ "(SELECT MAX(timestamp) FROM BatteryState WHERE isFullChargeCycleStart = 1)"
|
||||
+ " ORDER BY timestamp ASC")
|
||||
+ "(SELECT IFNULL((SELECT MAX(timestamp) FROM BatteryState "
|
||||
+ "WHERE isFullChargeCycleStart = 1), 0)) ORDER BY timestamp ASC")
|
||||
Cursor getCursorSinceLastFullCharge(long timestampSixDaysAgo);
|
||||
|
||||
/** Get the count of distinct timestamp after a specific timestamp. */
|
||||
|
||||
Reference in New Issue
Block a user