ATT Entitlement changes in Settings to pass Tether Type.
ATT has different provisioning servers for BT,Wifi and USB Tethering and Entitlement app need the type of Tethering to be passed before provisioning request goes out. Bug:17640036 Change-Id: I6683a747e1925716575ba683aeefc644ced7e37f
This commit is contained in:
committed by
Robert Greenwalt
parent
9de68440a9
commit
37155e9633
@@ -64,6 +64,7 @@ public class TetherSettings extends SettingsPreferenceFragment
|
||||
private static final String USB_TETHER_SETTINGS = "usb_tether_settings";
|
||||
private static final String ENABLE_WIFI_AP = "enable_wifi_ap";
|
||||
private static final String ENABLE_BLUETOOTH_TETHERING = "enable_bluetooth_tethering";
|
||||
private static final String TETHER_CHOICE = "TETHER_TYPE";
|
||||
|
||||
private static final int DIALOG_AP_SETTINGS = 1;
|
||||
|
||||
@@ -117,6 +118,10 @@ public class TetherSettings extends SettingsPreferenceFragment
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
if(icicle != null) {
|
||||
mTetherChoice = icicle.getInt(TETHER_CHOICE);
|
||||
}
|
||||
addPreferencesFromResource(R.xml.tether_prefs);
|
||||
|
||||
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
|
||||
@@ -180,6 +185,12 @@ public class TetherSettings extends SettingsPreferenceFragment
|
||||
mView = new WebView(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle savedInstanceState) {
|
||||
savedInstanceState.putInt(TETHER_CHOICE, mTetherChoice);
|
||||
super.onSaveInstanceState(savedInstanceState);
|
||||
}
|
||||
|
||||
private void initWifiTethering() {
|
||||
final Activity activity = getActivity();
|
||||
mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
|
||||
@@ -472,6 +483,7 @@ public class TetherSettings extends SettingsPreferenceFragment
|
||||
if (isProvisioningNeeded()) {
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.setClassName(mProvisionApp[0], mProvisionApp[1]);
|
||||
intent.putExtra(TETHER_CHOICE, mTetherChoice);
|
||||
startActivityForResult(intent, PROVISION_REQUEST);
|
||||
} else {
|
||||
startTethering();
|
||||
|
Reference in New Issue
Block a user