Android 16
This commit is contained in:
parent
ebd06681a7
commit
96f0b0b54f
2 changed files with 8 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk 35
|
compileSdk 36
|
||||||
|
|
||||||
base {
|
base {
|
||||||
archivesName = "BRouterApp." + project.version
|
archivesName = "BRouterApp." + project.version
|
||||||
|
|
@ -100,7 +100,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
implementation 'androidx.appcompat:appcompat:1.7.1'
|
||||||
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
|
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
|
||||||
implementation 'androidx.work:work-runtime:2.10.1'
|
implementation 'androidx.work:work-runtime:2.10.1'
|
||||||
implementation 'com.google.android.material:material:1.12.0'
|
implementation 'com.google.android.material:material:1.12.0'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package btools.util;
|
package btools.util;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
|
|
@ -12,7 +14,7 @@ import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class StackSampler extends Thread {
|
public class StackSampler extends Thread {
|
||||||
private DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS", new Locale("en", "US"));
|
private DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS", new Locale.Builder().setLanguage("en").setRegion("US").build());
|
||||||
private BufferedWriter bw;
|
private BufferedWriter bw;
|
||||||
private Random rand = new Random();
|
private Random rand = new Random();
|
||||||
|
|
||||||
|
|
@ -47,6 +49,7 @@ public class StackSampler extends Thread {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public void dumpThreads() {
|
public void dumpThreads() {
|
||||||
try {
|
try {
|
||||||
int wait1 = rand.nextInt(interval);
|
int wait1 = rand.nextInt(interval);
|
||||||
|
|
@ -65,7 +68,8 @@ public class StackSampler extends Thread {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" (ID=").append(t.getId()).append(" \"").append(t.getName()).append("\" ").append(t.getState()).append("\n");
|
final long threadId = Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA ? t.threadId() : t.getId();
|
||||||
|
sb.append(" (ID=").append(threadId).append(" \"").append(t.getName()).append("\" ").append(t.getState()).append("\n");
|
||||||
for (StackTraceElement line : stack) {
|
for (StackTraceElement line : stack) {
|
||||||
sb.append(" ").append(line.toString()).append("\n");
|
sb.append(" ").append(line.toString()).append("\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue