That fuck shit the fascists are using
at master 31 lines 789 B view raw
1package org.tm.archive.logsubmit; 2 3import android.content.Context; 4 5import androidx.annotation.NonNull; 6 7import java.util.ArrayList; 8import java.util.Collections; 9import java.util.List; 10 11public class LogSectionThreads implements LogSection { 12 13 @Override 14 public @NonNull String getTitle() { 15 return "THREADS"; 16 } 17 18 @Override 19 public @NonNull CharSequence getContent(@NonNull Context context) { 20 StringBuilder builder = new StringBuilder(); 21 22 List<Thread> threads = new ArrayList<>(Thread.getAllStackTraces().keySet()); 23 Collections.sort(threads, (lhs, rhs) -> Long.compare(lhs.getId(), rhs.getId())); 24 25 for (Thread thread : threads) { 26 builder.append("[").append(thread.getId()).append("] ").append(thread.getName()).append("\n"); 27 } 28 29 return builder; 30 } 31}