mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 10:51:27 +01:00
Improve and streamline Application#onCreate.
This commit is contained in:
committed by
Alan Evans
parent
c27300c19d
commit
cdd7b2deb9
@@ -1,5 +1,6 @@
|
||||
package org.thoughtcrime.securesms.messages;
|
||||
|
||||
import android.app.Application;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@@ -47,7 +48,7 @@ public class IncomingMessageObserver {
|
||||
private static SignalServiceMessagePipe pipe = null;
|
||||
private static SignalServiceMessagePipe unidentifiedPipe = null;
|
||||
|
||||
private final Context context;
|
||||
private final Application context;
|
||||
private final SignalServiceNetworkAccess networkAccess;
|
||||
private final List<Runnable> decryptionDrainedListeners;
|
||||
|
||||
@@ -56,7 +57,7 @@ public class IncomingMessageObserver {
|
||||
private volatile boolean networkDrained;
|
||||
private volatile boolean decryptionDrained;
|
||||
|
||||
public IncomingMessageObserver(@NonNull Context context) {
|
||||
public IncomingMessageObserver(@NonNull Application context) {
|
||||
this.context = context;
|
||||
this.networkAccess = ApplicationDependencies.getSignalServiceNetworkAccess();
|
||||
this.decryptionDrainedListeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.thoughtcrime.securesms.messages;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -27,10 +28,10 @@ public class IncomingMessageProcessor {
|
||||
|
||||
private static final String TAG = Log.tag(IncomingMessageProcessor.class);
|
||||
|
||||
private final Context context;
|
||||
private final Application context;
|
||||
private final ReentrantLock lock;
|
||||
|
||||
public IncomingMessageProcessor(@NonNull Context context) {
|
||||
public IncomingMessageProcessor(@NonNull Application context) {
|
||||
this.context = context;
|
||||
this.lock = new ReentrantLock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user