Skip to content

Commit

Permalink
ISSUE-368 - ensure full list of scheduled jobs is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFishFinger authored and Leonid Pliushch committed Dec 29, 2020
1 parent 65f73cf commit 86e5059
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/com/termux/api/JobSchedulerAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,12 @@ private static void displayPendingJobs(TermuxApiReceiver apiReceiver, Intent int
ResultReturner.returnData(apiReceiver, intent, out -> out.println("No pending jobs"));
return;
}

StringBuilder stringBuilder = new StringBuilder();
for (JobInfo job : jobs) {
ResultReturner.returnData(apiReceiver, intent, out -> out.println(String.format(Locale.ENGLISH, "Pending %s", formatJobInfo(job))));
stringBuilder.append(String.format(Locale.ENGLISH, "Pending %s\n", formatJobInfo(job)));
}
ResultReturner.returnData(apiReceiver, intent, out -> out.println(stringBuilder.toString()));
}

@RequiresApi(api = Build.VERSION_CODES.N)
Expand Down

0 comments on commit 86e5059

Please sign in to comment.