mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Rewrite the AppDependencies system.
This commit is contained in:
committed by
Cody Henthorne
parent
a0131bf39b
commit
b6a4e1f145
@@ -15,7 +15,7 @@ import androidx.annotation.NonNull;
|
||||
import org.signal.core.util.PendingIntentFlags;
|
||||
import org.signal.core.util.concurrent.SignalExecutors;
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies;
|
||||
import org.thoughtcrime.securesms.jobmanager.JobTracker;
|
||||
import org.thoughtcrime.securesms.jobs.MessageFetchJob;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
@@ -43,7 +43,7 @@ public final class RoutineMessageFetchReceiver extends BroadcastReceiver {
|
||||
startOrUpdateAlarm(context);
|
||||
} else if (BROADCAST_ACTION.equals(intent.getAction())) {
|
||||
|
||||
if (ApplicationDependencies.getAppForegroundObserver().isForegrounded()) {
|
||||
if (AppDependencies.getAppForegroundObserver().isForegrounded()) {
|
||||
Log.i(TAG, "App is foregrounded");
|
||||
return;
|
||||
}
|
||||
@@ -60,8 +60,8 @@ public final class RoutineMessageFetchReceiver extends BroadcastReceiver {
|
||||
SignalExecutors.BOUNDED.submit(() -> {
|
||||
Log.i(TAG, "Running PushNotificationReceiveJob");
|
||||
|
||||
Optional<JobTracker.JobState> jobState = ApplicationDependencies.getJobManager()
|
||||
.runSynchronously(new MessageFetchJob(), jobTimeout);
|
||||
Optional<JobTracker.JobState> jobState = AppDependencies.getJobManager()
|
||||
.runSynchronously(new MessageFetchJob(), jobTimeout);
|
||||
|
||||
Log.i(TAG, "PushNotificationReceiveJob ended: " + (jobState.isPresent() ? jobState.get().toString() : "Job did not complete"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user