通过线程执行,避免ANR

heatbeat
Matthew 3 months ago
parent a6bf1e117c
commit e88c2ddfcf

@ -393,6 +393,17 @@ public class MpMasterService extends Service {
public boolean shouldSyncTime() { return mSyncTime; }
public void detectMpAppAlive() {
final MpMasterService thisObj = this;
Thread th = new Thread(new Runnable() {
@Override
public void run() {
thisObj.detectMpAppAliveImpl();
}
});
th.start();
}
private void detectMpAppAliveImpl() {
try {
final Context context = getApplicationContext();
long ts = System.currentTimeMillis();

Loading…
Cancel
Save