Remove legacy subscription code
Removed SubscriptionController and SubscriptionInfoUpdater, which
have been replaced by SubscriptionManagerService.
Test: atest FrameworksTelephonyTests
Test: Basic phone functionality tests
Fix: 276816827
Change-Id: Ic063d185423776d7b75c47e3a397049d03cc3fc7
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 9d11dfc..fa85f27 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -64,7 +64,6 @@
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConfigurationManager;
import com.android.internal.telephony.PhoneFactory;
-import com.android.internal.telephony.SubscriptionInfoUpdater;
import com.android.internal.telephony.TelephonyPermissions;
import com.android.internal.telephony.subscription.SubscriptionManagerService;
import com.android.internal.telephony.util.ArrayUtils;
@@ -127,8 +126,6 @@
// CarrierService change monitoring
@NonNull private CarrierServiceChangeCallback[] mCarrierServiceChangeCallbacks;
- // SubscriptionInfoUpdater
- @NonNull private final SubscriptionInfoUpdater mSubscriptionInfoUpdater;
// Broadcast receiver for system events
@NonNull
private final BroadcastReceiver mSystemBroadcastReceiver = new ConfigLoaderBroadcastReceiver();
@@ -138,7 +135,7 @@
// Message codes; see mHandler below.
- // Request from SubscriptionInfoUpdater when SIM becomes absent or error.
+ // Request from UiccController when SIM becomes absent or error.
private static final int EVENT_CLEAR_CONFIG = 0;
// Has connected to default app.
private static final int EVENT_CONNECTED_TO_DEFAULT = 3;
@@ -166,7 +163,7 @@
private static final int EVENT_FETCH_DEFAULT_TIMEOUT = 14;
// Fetching config timed out from a carrier app.
private static final int EVENT_FETCH_CARRIER_TIMEOUT = 15;
- // SubscriptionInfoUpdater has finished updating the sub for the carrier config.
+ // SubscriptionManagerService has finished updating the sub for the carrier config.
private static final int EVENT_SUBSCRIPTION_INFO_UPDATED = 16;
// Multi-SIM config changed.
private static final int EVENT_MULTI_SIM_CONFIG_CHANGED = 17;
@@ -697,9 +694,7 @@
* receiver for relevant events.
*/
@VisibleForTesting
- /* package */ CarrierConfigLoader(@NonNull Context context,
- //TODO: Remove SubscriptionInfoUpdater.
- @Nullable SubscriptionInfoUpdater subscriptionInfoUpdater, @NonNull Looper looper) {
+ /* package */ CarrierConfigLoader(@NonNull Context context, @NonNull Looper looper) {
mContext = context;
mPlatformCarrierConfigPackage =
mContext.getString(R.string.platform_carrier_config_package);
@@ -728,7 +723,6 @@
new HandlerExecutor(mHandler), mCarrierServiceChangeCallbacks[phoneId]);
}
logd("CarrierConfigLoader has started");
- mSubscriptionInfoUpdater = subscriptionInfoUpdater;
PhoneConfigurationManager.registerForMultiSimConfigChange(
mHandler, EVENT_MULTI_SIM_CONFIG_CHANGED, null);
@@ -745,8 +739,7 @@
/* package */ static CarrierConfigLoader init(@NonNull Context context) {
synchronized (CarrierConfigLoader.class) {
if (sInstance == null) {
- sInstance = new CarrierConfigLoader(context,
- PhoneFactory.getSubscriptionInfoUpdater(), Looper.myLooper());
+ sInstance = new CarrierConfigLoader(context, Looper.myLooper());
// Make this service available through ServiceManager.
TelephonyFrameworkInitializer.getTelephonyServiceManager()
.getCarrierConfigServiceRegisterer().register(sInstance);
@@ -811,16 +804,10 @@
configToSend.putAll(config);
}
- if (PhoneFactory.isSubscriptionManagerServiceEnabled()) {
- SubscriptionManagerService.getInstance().updateSubscriptionByCarrierConfig(
- phoneId, configPackageName, configToSend,
- () -> mHandler.obtainMessage(EVENT_SUBSCRIPTION_INFO_UPDATED, phoneId, -1)
- .sendToTarget());
- } else {
- mSubscriptionInfoUpdater.updateSubscriptionByCarrierConfigAndNotifyComplete(
- phoneId, configPackageName, configToSend,
- mHandler.obtainMessage(EVENT_SUBSCRIPTION_INFO_UPDATED, phoneId, -1));
- }
+ SubscriptionManagerService.getInstance().updateSubscriptionByCarrierConfig(
+ phoneId, configPackageName, configToSend,
+ () -> mHandler.obtainMessage(EVENT_SUBSCRIPTION_INFO_UPDATED, phoneId, -1)
+ .sendToTarget());
}
private void broadcastConfigChangedIntent(int phoneId) {