Changed new Thread() to use new AsyncTask()
Changed new Thread() to use new AsyncTask() - same as was done in src/org/thoughtcrime/securesms/service/KeyCachingService.java - d97252d8d6
This commit is contained in:
parent
dfa710a6fc
commit
c89cac8785
1 changed files with 4 additions and 3 deletions
|
@ -25,12 +25,13 @@ public class Trimmer {
|
|||
if (!trimmingEnabled)
|
||||
return;
|
||||
|
||||
new Thread() {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
public void run() {
|
||||
protected Void doInBackground(Void... params) {
|
||||
DatabaseFactory.getThreadDatabase(context).trimThread(threadId, threadLengthLimit);
|
||||
return null;
|
||||
}
|
||||
}.start();
|
||||
}.execute();
|
||||
}
|
||||
|
||||
private static class TrimmingProgressTask extends AsyncTask<Integer, Integer, Void> implements ThreadDatabase.ProgressListener {
|
||||
|
|
Loading…
Add table
Reference in a new issue