resolve merge conflicts of e06c03d843 to nyc-mr1-dev-plus-aosp
Test: Manual test Change-Id: I13f288c5056b672eec00f850f9d2ee6db73b7a44
This commit is contained in:
@@ -1244,10 +1244,6 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSimCardAbsent(String state) {
|
|
||||||
return IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isSimCardLoaded(String state) {
|
private boolean isSimCardLoaded(String state) {
|
||||||
return IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(state);
|
return IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(state);
|
||||||
}
|
}
|
||||||
@@ -1264,9 +1260,8 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
|
|||||||
// used to verify this receiver is still current
|
// used to verify this receiver is still current
|
||||||
final private int mGenerationNumber;
|
final private int mGenerationNumber;
|
||||||
|
|
||||||
// we're interested in edge-triggered LOADED notifications, so
|
// used to check the sim state transition from non-loaded to loaded
|
||||||
// ignore LOADED unless we saw an ABSENT state first
|
private boolean mSimNotLoadedSeen = false;
|
||||||
private boolean mSimAbsentSeen = false;
|
|
||||||
|
|
||||||
public SimChangeBroadcastReceiver(int generationNumber) {
|
public SimChangeBroadcastReceiver(int generationNumber) {
|
||||||
mGenerationNumber = generationNumber;
|
mGenerationNumber = generationNumber;
|
||||||
@@ -1284,16 +1279,16 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
|
|||||||
|
|
||||||
final String state = intent.getStringExtra(
|
final String state = intent.getStringExtra(
|
||||||
IccCardConstants.INTENT_KEY_ICC_STATE);
|
IccCardConstants.INTENT_KEY_ICC_STATE);
|
||||||
Log.d(TAG, "got Sim changed to state " + state + ", mSimAbsentSeen=" +
|
Log.d(TAG, "got Sim changed to state " + state + ", mSimNotLoadedSeen=" +
|
||||||
mSimAbsentSeen);
|
mSimNotLoadedSeen);
|
||||||
|
|
||||||
if (isSimCardAbsent(state)) {
|
if (!isSimCardLoaded(state)) {
|
||||||
if (!mSimAbsentSeen) mSimAbsentSeen = true;
|
if (!mSimNotLoadedSeen) mSimNotLoadedSeen = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSimCardLoaded(state) && mSimAbsentSeen) {
|
if (isSimCardLoaded(state) && mSimNotLoadedSeen) {
|
||||||
mSimAbsentSeen = false;
|
mSimNotLoadedSeen = false;
|
||||||
|
|
||||||
if (!hasMobileHotspotProvisionApp()) return;
|
if (!hasMobileHotspotProvisionApp()) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user