Loading src/java/com/android/internal/telephony/euicc/EuiccController.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -277,6 +277,10 @@ public class EuiccController extends IEuiccController.Stub { */ */ @Override @Override public void setSupportedCountries(boolean isSupported, @NonNull List<String> countriesList) { public void setSupportedCountries(boolean isSupported, @NonNull List<String> countriesList) { if (!callerCanWriteEmbeddedSubscriptions()) { throw new SecurityException( "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to set supported countries"); } if (isSupported) { if (isSupported) { mSupportedCountries = countriesList; mSupportedCountries = countriesList; } else { } else { Loading @@ -297,6 +301,10 @@ public class EuiccController extends IEuiccController.Stub { @Override @Override @NonNull @NonNull public List<String> getSupportedCountries(boolean isSupported) { public List<String> getSupportedCountries(boolean isSupported) { if (!callerCanWriteEmbeddedSubscriptions()) { throw new SecurityException( "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to get supported countries"); } if (isSupported && mSupportedCountries != null) { if (isSupported && mSupportedCountries != null) { return mSupportedCountries; return mSupportedCountries; } else if (!isSupported && mUnsupportedCountries != null) { } else if (!isSupported && mUnsupportedCountries != null) { Loading @@ -323,6 +331,10 @@ public class EuiccController extends IEuiccController.Stub { */ */ @Override @Override public boolean isSupportedCountry(@NonNull String countryIso) { public boolean isSupportedCountry(@NonNull String countryIso) { if (!callerCanWriteEmbeddedSubscriptions()) { throw new SecurityException( "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to check if the country is supported"); } if (mSupportedCountries == null || mSupportedCountries.isEmpty()) { if (mSupportedCountries == null || mSupportedCountries.isEmpty()) { Log.i(TAG, "Using blacklist unsupportedCountries=" + mUnsupportedCountries); Log.i(TAG, "Using blacklist unsupportedCountries=" + mUnsupportedCountries); return !isEsimUnsupportedCountry(countryIso); return !isEsimUnsupportedCountry(countryIso); Loading Loading
src/java/com/android/internal/telephony/euicc/EuiccController.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -277,6 +277,10 @@ public class EuiccController extends IEuiccController.Stub { */ */ @Override @Override public void setSupportedCountries(boolean isSupported, @NonNull List<String> countriesList) { public void setSupportedCountries(boolean isSupported, @NonNull List<String> countriesList) { if (!callerCanWriteEmbeddedSubscriptions()) { throw new SecurityException( "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to set supported countries"); } if (isSupported) { if (isSupported) { mSupportedCountries = countriesList; mSupportedCountries = countriesList; } else { } else { Loading @@ -297,6 +301,10 @@ public class EuiccController extends IEuiccController.Stub { @Override @Override @NonNull @NonNull public List<String> getSupportedCountries(boolean isSupported) { public List<String> getSupportedCountries(boolean isSupported) { if (!callerCanWriteEmbeddedSubscriptions()) { throw new SecurityException( "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to get supported countries"); } if (isSupported && mSupportedCountries != null) { if (isSupported && mSupportedCountries != null) { return mSupportedCountries; return mSupportedCountries; } else if (!isSupported && mUnsupportedCountries != null) { } else if (!isSupported && mUnsupportedCountries != null) { Loading @@ -323,6 +331,10 @@ public class EuiccController extends IEuiccController.Stub { */ */ @Override @Override public boolean isSupportedCountry(@NonNull String countryIso) { public boolean isSupportedCountry(@NonNull String countryIso) { if (!callerCanWriteEmbeddedSubscriptions()) { throw new SecurityException( "Must have WRITE_EMBEDDED_SUBSCRIPTIONS to check if the country is supported"); } if (mSupportedCountries == null || mSupportedCountries.isEmpty()) { if (mSupportedCountries == null || mSupportedCountries.isEmpty()) { Log.i(TAG, "Using blacklist unsupportedCountries=" + mUnsupportedCountries); Log.i(TAG, "Using blacklist unsupportedCountries=" + mUnsupportedCountries); return !isEsimUnsupportedCountry(countryIso); return !isEsimUnsupportedCountry(countryIso); Loading