mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Migrate local account data into SignalStore.
This commit is contained in:
committed by
Cody Henthorne
parent
87f175a96b
commit
8aea20f147
@@ -41,7 +41,7 @@ public class FcmJobService extends JobService {
|
||||
public boolean onStartJob(JobParameters params) {
|
||||
Log.d(TAG, "onStartJob()");
|
||||
|
||||
if (BackgroundMessageRetriever.shouldIgnoreFetch(this)) {
|
||||
if (BackgroundMessageRetriever.shouldIgnoreFetch()) {
|
||||
Log.i(TAG, "App is foregrounded. No need to run.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.jobs.FcmRefreshJob;
|
||||
import org.thoughtcrime.securesms.jobs.SubmitRateLimitPushChallengeJob;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.registration.PushChallengeRequest;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
@@ -53,7 +54,7 @@ public class FcmReceiveService extends FirebaseMessagingService {
|
||||
public void onNewToken(String token) {
|
||||
Log.i(TAG, "onNewToken()");
|
||||
|
||||
if (!TextSecurePreferences.isPushRegistered(ApplicationDependencies.getApplication())) {
|
||||
if (!SignalStore.account().isRegistered()) {
|
||||
Log.i(TAG, "Got a new FCM token, but the user isn't registered.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user