mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 03:35:58 +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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user