Fixed the logic for tethering provisioning re-evaluation am: 91a0bc9564 am: 40d0753b10 am: 413922e746 am: 426f454b69 am: fab95f8ad6

am: 37d3b12aa1

Change-Id: I751c29efc17d371905f5d70460e65744c63ec1fc
This commit is contained in:
Jack Yu
2017-02-02 22:45:43 +00:00
committed by android-build-merger

View File

@@ -1812,9 +1812,8 @@ public class Tethering extends BaseNetworkObserver {
// used to verify this receiver is still current
final private int mGenerationNumber;
// we're interested in edge-triggered LOADED notifications, so
// ignore LOADED unless we saw an ABSENT state first
private boolean mSimAbsentSeen = false;
// used to check the sim state transition from non-loaded to loaded
private boolean mSimNotLoadedSeen = false;
public SimChangeBroadcastReceiver(int generationNumber) {
super();
@@ -1832,14 +1831,14 @@ public class Tethering extends BaseNetworkObserver {
final String state =
intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE);
Log.d(TAG, "got Sim changed to state " + state + ", mSimAbsentSeen=" +
mSimAbsentSeen);
if (!mSimAbsentSeen && IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(state)) {
mSimAbsentSeen = true;
Log.d(TAG, "got Sim changed to state " + state + ", mSimNotLoadedSeen=" +
mSimNotLoadedSeen);
if (!mSimNotLoadedSeen && !IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(state)) {
mSimNotLoadedSeen = true;
}
if (mSimAbsentSeen && IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(state)) {
mSimAbsentSeen = false;
if (mSimNotLoadedSeen && IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(state)) {
mSimNotLoadedSeen = false;
try {
if (mContext.getResources().getString(com.android.internal.R.string.
config_mobile_hotspot_provision_app_no_ui).isEmpty() == false) {