mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 14:28:34 +00:00
Fix TimedEventManager crash in a sane way.
Follow up on acb48752c. Just have the subclass call that method to guarantee that everything is initialized.
This commit is contained in:
parent
4e859a84ce
commit
eddff07eb8
@ -32,6 +32,8 @@ public class RevealableMessageManager extends TimedEventManager<RevealExpiration
|
||||
|
||||
this.mmsDatabase = DatabaseFactory.getMmsDatabase(application);
|
||||
this.attachmentDatabase = DatabaseFactory.getAttachmentDatabase(application);
|
||||
|
||||
scheduleIfNecessary();
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
@ -29,10 +29,6 @@ public abstract class TimedEventManager<E> {
|
||||
|
||||
this.application = application;
|
||||
this.handler = new Handler(handlerThread.getLooper());
|
||||
|
||||
// XXX Have to delay it because some devices will run the resulting handler#post synchronously,
|
||||
// triggering a method call to an uninitialized child class.
|
||||
handler.postDelayed(this::scheduleIfNecessary, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user