Messaging: Remove GServices
We don't have an actual implementation returning anything but the defaults, so apply the defaults directly anywhere we need them Change-Id: Ic651b4b13977799f2f4d2c702c430798fbff77f8
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +28,6 @@ import com.android.messaging.datamodel.action.SyncMessagesAction;
|
||||
import com.android.messaging.datamodel.data.ParticipantData;
|
||||
import com.android.messaging.sms.MmsUtils;
|
||||
import com.android.messaging.util.Assert;
|
||||
import com.android.messaging.util.BugleGservices;
|
||||
import com.android.messaging.util.BugleGservicesKeys;
|
||||
import com.android.messaging.util.BuglePrefs;
|
||||
import com.android.messaging.util.BuglePrefsKeys;
|
||||
@@ -206,13 +206,11 @@ public class SyncManager {
|
||||
* @return 0 if allowed to run now, else delay in ms
|
||||
*/
|
||||
public long delayUntilFullSync(final long startTimestamp) {
|
||||
final BugleGservices bugleGservices = BugleGservices.get();
|
||||
final BuglePrefs prefs = BuglePrefs.getApplicationPrefs();
|
||||
|
||||
final long lastFullSyncTime = prefs.getLong(BuglePrefsKeys.LAST_FULL_SYNC_TIME, -1L);
|
||||
final long smsFullSyncBackoffTimeMillis = bugleGservices.getLong(
|
||||
BugleGservicesKeys.SMS_FULL_SYNC_BACKOFF_TIME_MILLIS,
|
||||
BugleGservicesKeys.SMS_FULL_SYNC_BACKOFF_TIME_MILLIS_DEFAULT);
|
||||
final long smsFullSyncBackoffTimeMillis =
|
||||
BugleGservicesKeys.SMS_FULL_SYNC_BACKOFF_TIME_MILLIS_DEFAULT;
|
||||
final long noFullSyncBefore = (lastFullSyncTime < 0 ? startTimestamp :
|
||||
lastFullSyncTime + smsFullSyncBackoffTimeMillis);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user