Merge "resolved conflicts for merge of 55b53d35 to honeycomb-plus-aosp" into honeycomb-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
618377d83d
@@ -38,6 +38,8 @@ import android.provider.Settings.SettingNotFoundException;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.internal.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
@@ -360,9 +362,26 @@ public abstract class DataConnectionTracker extends Handler {
|
|||||||
|
|
||||||
public boolean isApnTypeActive(String type) {
|
public boolean isApnTypeActive(String type) {
|
||||||
// TODO: support simultaneous with List instead
|
// TODO: support simultaneous with List instead
|
||||||
|
if (Phone.APN_TYPE_DUN.equals(type)) {
|
||||||
|
ApnSetting dunApn = fetchDunApn();
|
||||||
|
if (dunApn != null) {
|
||||||
|
return ((mActiveApn != null) && (dunApn.toString().equals(mActiveApn.toString())));
|
||||||
|
}
|
||||||
|
}
|
||||||
return mActiveApn != null && mActiveApn.canHandleType(type);
|
return mActiveApn != null && mActiveApn.canHandleType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected ApnSetting fetchDunApn() {
|
||||||
|
Context c = mPhone.getContext();
|
||||||
|
String apnData = Settings.Secure.getString(c.getContentResolver(),
|
||||||
|
Settings.Secure.TETHER_DUN_APN);
|
||||||
|
ApnSetting dunSetting = ApnSetting.fromString(apnData);
|
||||||
|
if (dunSetting != null) return dunSetting;
|
||||||
|
|
||||||
|
apnData = c.getResources().getString(R.string.config_tether_apndata);
|
||||||
|
return ApnSetting.fromString(apnData);
|
||||||
|
}
|
||||||
|
|
||||||
public String[] getActiveApnTypes() {
|
public String[] getActiveApnTypes() {
|
||||||
String[] result;
|
String[] result;
|
||||||
if (mActiveApn != null) {
|
if (mActiveApn != null) {
|
||||||
|
|||||||
@@ -1164,17 +1164,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApnSetting fetchDunApn() {
|
|
||||||
Context c = mPhone.getContext();
|
|
||||||
String apnData = Settings.Secure.getString(c.getContentResolver(),
|
|
||||||
Settings.Secure.TETHER_DUN_APN);
|
|
||||||
ApnSetting dunSetting = ApnSetting.fromString(apnData);
|
|
||||||
if (dunSetting != null) return dunSetting;
|
|
||||||
|
|
||||||
apnData = c.getResources().getString(R.string.config_tether_apndata);
|
|
||||||
return ApnSetting.fromString(apnData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a list of APNs to be used to create PDP's.
|
* Build a list of APNs to be used to create PDP's.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user