Make EuiccService un-disable-able.

Disabling the eSIM Manager could leave the device in a bad state, unable
to address the eSIM, and possibly crash due to EuiccConnector failing to
find an LPA to implement EuiccService. So here we do not allow users to
disable this component.

Fixes: 135644632
Test: robotest
Change-Id: Ia4ea48b449f121edaff10531b7c975b09432a8f8
This commit is contained in:
Yi-Ling Chuang
2019-07-16 00:51:52 +08:00
parent b843707ef5
commit 7e2978ab58
2 changed files with 68 additions and 5 deletions

View File

@@ -33,6 +33,7 @@ import android.text.TextUtils;
import android.util.ArraySet;
import com.android.internal.telephony.SmsApplication;
import com.android.internal.telephony.euicc.EuiccConnector;
import com.android.settings.R;
import java.util.ArrayList;
@@ -141,6 +142,12 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
keepEnabledPackages.add(defaultSms.getPackageName());
}
// Keep Euicc Service enabled.
final ComponentInfo euicc = EuiccConnector.findBestComponent(mPm);
if (euicc != null) {
keepEnabledPackages.add(euicc.packageName);
}
keepEnabledPackages.addAll(getEnabledPackageWhitelist());
final LocationManager locationManager =