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:
Michael W
2024-12-15 15:50:57 +01:00
parent 7f22a3eea7
commit a2f67b4f7b
64 changed files with 91 additions and 3763 deletions

View File

@@ -31,8 +31,6 @@ import android.util.SparseArray;
import com.android.messaging.datamodel.data.ParticipantData;
import com.android.messaging.mmslib.SqliteWrapper;
import com.android.messaging.util.BugleGservices;
import com.android.messaging.util.BugleGservicesKeys;
import com.android.messaging.util.LogUtil;
import com.android.messaging.util.PhoneUtils;
@@ -336,11 +334,6 @@ public class BugleApnSettingsLoader implements ApnSettingsLoader {
}
private void loadLocked(final int subId, final String apnName, final List<Apn> apns) {
// Try Gservices first
loadFromGservices(apns);
if (apns.size() > 0) {
return;
}
// Try system APN table
loadFromSystem(subId, apnName, apns);
if (apns.size() > 0) {
@@ -353,26 +346,6 @@ public class BugleApnSettingsLoader implements ApnSettingsLoader {
}
}
/**
* Load from Gservices if APN setting is set in Gservices
*
* @param apns the list used to return results
*/
private void loadFromGservices(final List<Apn> apns) {
final BugleGservices gservices = BugleGservices.get();
final String mmsc = gservices.getString(BugleGservicesKeys.MMS_MMSC, null);
if (TextUtils.isEmpty(mmsc)) {
return;
}
LogUtil.i(LogUtil.BUGLE_TAG, "Loading APNs from gservices");
final String proxy = gservices.getString(BugleGservicesKeys.MMS_PROXY_ADDRESS, null);
final int port = gservices.getInt(BugleGservicesKeys.MMS_PROXY_PORT, -1);
final Apn apn = BaseApn.from("mms", mmsc, proxy, Integer.toString(port));
if (apn != null) {
apns.add(apn);
}
}
/**
* Load matching APNs from telephony provider.
* We try different combinations of the query to work around some platform quirks.