Skip to content

Commit

Permalink
Fix format issue for brave stats
Browse files Browse the repository at this point in the history
  • Loading branch information
deeppandya committed Nov 21, 2020
1 parent 6f13d50 commit 3e504be
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public long insertSavedBandwidth(SavedBandwidthTable savedBandwidthTable) {
}

public long getTotalSavedBandwidthWithDate(String thresholdTime, String currentTime) {
int sum = 0;
long sum = 0;
String selectQuery = "SELECT SUM(" + SavedBandwidthTable.COLUMN_SAVED_BANDWIDTH + ") as total FROM "
+ SavedBandwidthTable.TABLE_NAME
+ " WHERE " + BraveStatsTable.COLUMN_TIMESTAMP
Expand All @@ -307,22 +307,22 @@ public long getTotalSavedBandwidthWithDate(String thresholdTime, String currentT
Cursor cursor = db.rawQuery(selectQuery, null);

if (cursor.moveToFirst())
sum = cursor.getInt(cursor.getColumnIndex("total"));
sum = cursor.getLong(cursor.getColumnIndex("total"));

cursor.close();
return sum;
}

public long getTotalSavedBandwidth() {
int sum = 0;
long sum = 0;
String selectQuery = "SELECT SUM(" + SavedBandwidthTable.COLUMN_SAVED_BANDWIDTH + ") as total FROM "
+ SavedBandwidthTable.TABLE_NAME;

SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);

if (cursor.moveToFirst())
sum = cursor.getInt(cursor.getColumnIndex("total"));
sum = cursor.getLong(cursor.getColumnIndex("total"));

cursor.close();
return sum;
Expand Down

0 comments on commit 3e504be

Please sign in to comment.