Skip to content

Commit

Permalink
REMOVE logtype from SQLite queries
Browse files Browse the repository at this point in the history
  • Loading branch information
man0s committed Jul 17, 2021
1 parent 088dd5f commit 95c2cf9
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions app/src/main/java/ceid/katefidis/calchas/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1123,13 +1123,15 @@ private ArrayList<calllogrecord> getCallLog(long days, boolean smsSeek, boolean

String[] FirstRowBug_selectCols = new String[]{CallLog.Calls._ID, CallLog.Calls.NUMBER, CallLog.Calls.CACHED_NAME};

try {
cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "logtype = 100 AND DATE >" + freq_window, null, fixLimit);
if (cur == null)
cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "DATE >" + freq_window, null, fixLimit);
} catch (SQLiteException e) {
cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "DATE >" + freq_window, null, fixLimit);
}
// try {
// cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "logtype = 100 AND DATE >" + freq_window, null, fixLimit);
// if (cur == null)
// cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "DATE >" + freq_window, null, fixLimit);
// } catch (SQLiteException e) {
// cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "DATE >" + freq_window, null, fixLimit);
// }

cur = cr.query(CallLog.Calls.CONTENT_URI, FirstRowBug_selectCols, "DATE >" + freq_window, null, fixLimit);


//pernw to noumero ws double
Expand Down Expand Up @@ -1159,13 +1161,15 @@ private ArrayList<calllogrecord> getCallLog(long days, boolean smsSeek, boolean
freq_window = System.currentTimeMillis() - days * 24L * 3600L * 1000L; //max days(99)
}

try {
cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "logtype = 100 AND DATE >" + freq_window, null, "DATE DESC");
if (cur == null)
cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "DATE >" + freq_window, null, "DATE DESC");
} catch (SQLiteException e) {
cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "DATE >" + freq_window, null, "DATE DESC");
}
// try {
// cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "logtype = 100 AND DATE >" + freq_window, null, "DATE DESC");
// if (cur == null)
// cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "DATE >" + freq_window, null, "DATE DESC");
// } catch (SQLiteException e) {
// cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "DATE >" + freq_window, null, "DATE DESC");
// }

cur = cr.query(CallLog.Calls.CONTENT_URI, selectCols, "DATE >" + freq_window, null, "DATE DESC");


while (cur.moveToNext()) {
Expand Down

0 comments on commit 95c2cf9

Please sign in to comment.