这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit a857483

Browse files
wzaw1Grimler91
authored andcommitted
CallLogAPI: Add dual sim feature
1 parent 75a5ffe commit a857483

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/src/main/java/com/termux/api/CallLogAPI.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private static void getCallLogs(Context context, JsonWriter out, int offset, int
4444
int dateIndex = cur.getColumnIndex(CallLog.Calls.DATE);
4545
int durationIndex = cur.getColumnIndex(CallLog.Calls.DURATION);
4646
int callTypeIndex = cur.getColumnIndex(CallLog.Calls.TYPE);
47+
int simTypeIndex = cur.getColumnIndex(CallLog.Calls.PHONE_ACCOUNT_ID);
4748

4849
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
4950
out.beginArray();
@@ -56,6 +57,7 @@ private static void getCallLogs(Context context, JsonWriter out, int offset, int
5657
out.name("type").value(getCallTypeString(cur.getInt(callTypeIndex)));
5758
out.name("date").value(getDateString(cur.getLong(dateIndex), dateFormat));
5859
out.name("duration").value(getTimeString(cur.getInt(durationIndex)));
60+
out.name("sim_id").value(cur.getString(simTypeIndex));
5961

6062
cur.moveToPrevious();
6163
out.endObject();

0 commit comments

Comments
 (0)