Fix crash in RetrieveProfileJob.
This commit is contained in:
parent
4cd433b6bc
commit
dc9124f291
1 changed files with 5 additions and 0 deletions
|
@ -167,6 +167,11 @@ public class RetrieveProfileJob extends BaseJob {
|
|||
* certain time period.
|
||||
*/
|
||||
public static void enqueueRoutineFetchIfNecessary(Application application) {
|
||||
if (!SignalStore.registrationValues().isRegistrationComplete()) {
|
||||
Log.i(TAG, "Registration not complete. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
long timeSinceRefresh = System.currentTimeMillis() - SignalStore.misc().getLastProfileRefreshTime();
|
||||
if (timeSinceRefresh < TimeUnit.HOURS.toMillis(12)) {
|
||||
Log.i(TAG, "Too soon to refresh. Did the last refresh " + timeSinceRefresh + " ms ago.");
|
||||
|
|
Loading…
Add table
Reference in a new issue