kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove database transaction protections for job manager interactions.
Now that the JobDatabase is a separate physical database, we no longer have to worry about people enqueuing jobs while in a transaction.fork-5.53.8
rodzic
5cb54b9ad7
commit
69a1fa0d3c
|
@ -58,17 +58,7 @@ public class JobManager implements ConstraintObserver.Notifier {
|
|||
public JobManager(@NonNull Application application, @NonNull Configuration configuration) {
|
||||
this.application = application;
|
||||
this.configuration = configuration;
|
||||
this.executor = new FilteredExecutor(configuration.getExecutorFactory().newSingleThreadExecutor("signal-JobManager"),
|
||||
() -> {
|
||||
if (Util.isMainThread()) {
|
||||
return true;
|
||||
} else if (DatabaseFactory.inTransaction(application)) {
|
||||
Log.w(TAG, "Tried to add a job while in a transaction!", new Throwable());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
this.executor = new FilteredExecutor(configuration.getExecutorFactory().newSingleThreadExecutor("signal-JobManager"), Util::isMainThread);
|
||||
this.jobTracker = configuration.getJobTracker();
|
||||
this.jobController = new JobController(application,
|
||||
configuration.getJobStorage(),
|
||||
|
|
Ładowanie…
Reference in New Issue