Check whether cardId is valid in EuiccManager#isEnabled.

EuiccManager#isEnabled should be only true if its cardId is a valid one.

Bug: 111614811
Test: test on phone
Change-Id: I7b63d3e117a1bd1eb17dab8e1a7b1dfec1a8abe8
Merged-In: I7b63d3e117a1bd1eb17dab8e1a7b1dfec1a8abe8
This commit is contained in:
Holly Jiuyu Sun
2019-01-17 20:23:38 -08:00
parent 44631dfc26
commit ef5c4a5397

View File

@@ -291,7 +291,7 @@ public class EuiccManager {
public boolean isEnabled() {
// In the future, this may reach out to IEuiccController (if non-null) to check any dynamic
// restrictions.
return getIEuiccController() != null;
return getIEuiccController() != null && mCardId != TelephonyManager.INVALID_CARD_ID;
}
/**