Loading AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -504,6 +504,7 @@ <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.VOICE_LAUNCH" /> <category android:name="com.android.settings.SHORTCUT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.TetherSettings" /> Loading res/values/bools.xml +0 −2 Original line number Diff line number Diff line Loading @@ -94,8 +94,6 @@ <bool name="config_hidesupl_enable">false</bool> <!-- Whether to hide mms apn--> <bool name="config_hide_mms_enable">false</bool> <!-- show pop up notification for turn off wifi begin --> <bool name="hotspot_show_turn_off_wifi_dialog">false</bool> <!-- Whether to enable the default ipv4/v6 for creating new APN --> <bool name="config_default_apn_for_new">false</bool> Loading res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -7836,8 +7836,6 @@ <string name="wifi_tether_first_use_message">Set up Mobile HotSpot at the First Use</string> <string name="lte_data_and_voice_calling_enabled">LTE data and Voice Calling (IMS/VoLTE) service enabled </string> <string name="lte_data_service_enabled">LTE data service enabled </string> <string name="turn_off_wifi_dialog_title">Turn off Wi-Fi</string> <string name="turn_off_wifi_dialog_text">Wi-Fi is turned off when Mobile HotSpot is active. To turn on Wi-Fi, please turn off Mobile HotSpot.</string> <string name="wifiap_mobile_hotspot_help">Status</string> src/com/android/settings/TetherSettings.java +0 −48 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.hardware.usb.UsbManager; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import android.net.wifi.WifiConfiguration.AuthAlgorithm; Loading Loading @@ -65,10 +64,6 @@ import static android.net.ConnectivityManager.TETHERING_BLUETOOTH; import static android.net.ConnectivityManager.TETHERING_USB; import static android.net.ConnectivityManager.TETHERING_WIFI; import android.view.LayoutInflater; import android.view.View; import android.widget.CheckBox; /* * Displays preferences for Tethering. */ Loading @@ -88,7 +83,6 @@ public class TetherSettings extends RestrictedSettingsFragment private static final String SHAREPREFERENCE_DEFAULT_WIFI = "def_wifiap_set"; private static final String SHAREPREFERENCE_FIFE_NAME = "MY_PERFS"; private static final String KEY_FIRST_LAUNCH_HOTSPOT = "FirstLaunchHotspotTethering"; private static final String KEY_TURN_OFF_WIFI_SHOW_AGAIN = "TurnOffWifiShowAgain"; private static final String ACTION_HOTSPOT_PRE_CONFIGURE = "Hotspot_PreConfigure"; private static final String ACTION_HOTSPOT_POST_CONFIGURE = "Hotspot_PostConfigure"; private static final String CONFIGURE_RESULT = "PreConfigure_result"; Loading Loading @@ -607,9 +601,6 @@ public class TetherSettings extends RestrictedSettingsFragment getPrefContext().startActivity(intent); ((HotspotPreference)preference).setChecked(false); return false; } else if(checkWifiConnectivityState(getActivity())) { showTurnOffWifiDialog(getActivity()); startTethering(TETHERING_WIFI); } else { startTethering(TETHERING_WIFI); } Loading @@ -619,45 +610,6 @@ public class TetherSettings extends RestrictedSettingsFragment return false; } private boolean checkWifiConnectivityState(Context ctx) { if(mCm == null) { ConnectivityManager mCm = (ConnectivityManager) ctx. getSystemService(Context.CONNECTIVITY_SERVICE); } NetworkInfo info = mCm == null ? null : mCm.getNetworkInfo(ConnectivityManager.TYPE_WIFI); return (info != null && info.isConnected()); } private void showTurnOffWifiDialog(final Context ctx) { LayoutInflater inflater = (LayoutInflater)ctx.getSystemService( Context.LAYOUT_INFLATER_SERVICE); View showAgainView = inflater.inflate(R.layout.not_show_again, null); CheckBox notShowAgainCheckbox = (CheckBox)showAgainView.findViewById(R.id.check); final SharedPreferences sharedpreferences = ctx.getSharedPreferences( SHAREPREFERENCE_FIFE_NAME, Context.MODE_PRIVATE); boolean showAgain = sharedpreferences.getBoolean(KEY_TURN_OFF_WIFI_SHOW_AGAIN, true); if (!showAgain) { return; } else { AlertDialog.Builder alert = new AlertDialog.Builder(ctx) .setTitle(ctx.getResources().getString(R.string.turn_off_wifi_dialog_title)) .setMessage(ctx.getResources().getString(R.string.turn_off_wifi_dialog_text)) .setView(showAgainView) .setPositiveButton(ctx.getResources(). getString(R.string.okay), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Editor editor = sharedpreferences.edit(); editor.putBoolean(KEY_TURN_OFF_WIFI_SHOW_AGAIN, !notShowAgainCheckbox.isChecked()); editor.commit(); } }); alert.setCancelable(false); alert.show(); } } public static boolean isProvisioningNeededButUnavailable(Context context) { return (TetherUtil.isProvisioningNeeded(context) && !isIntentAvailable(context)); Loading Loading
AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -504,6 +504,7 @@ <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.VOICE_LAUNCH" /> <category android:name="com.android.settings.SHORTCUT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.TetherSettings" /> Loading
res/values/bools.xml +0 −2 Original line number Diff line number Diff line Loading @@ -94,8 +94,6 @@ <bool name="config_hidesupl_enable">false</bool> <!-- Whether to hide mms apn--> <bool name="config_hide_mms_enable">false</bool> <!-- show pop up notification for turn off wifi begin --> <bool name="hotspot_show_turn_off_wifi_dialog">false</bool> <!-- Whether to enable the default ipv4/v6 for creating new APN --> <bool name="config_default_apn_for_new">false</bool> Loading
res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -7836,8 +7836,6 @@ <string name="wifi_tether_first_use_message">Set up Mobile HotSpot at the First Use</string> <string name="lte_data_and_voice_calling_enabled">LTE data and Voice Calling (IMS/VoLTE) service enabled </string> <string name="lte_data_service_enabled">LTE data service enabled </string> <string name="turn_off_wifi_dialog_title">Turn off Wi-Fi</string> <string name="turn_off_wifi_dialog_text">Wi-Fi is turned off when Mobile HotSpot is active. To turn on Wi-Fi, please turn off Mobile HotSpot.</string> <string name="wifiap_mobile_hotspot_help">Status</string>
src/com/android/settings/TetherSettings.java +0 −48 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.hardware.usb.UsbManager; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; import android.net.wifi.WifiConfiguration.AuthAlgorithm; Loading Loading @@ -65,10 +64,6 @@ import static android.net.ConnectivityManager.TETHERING_BLUETOOTH; import static android.net.ConnectivityManager.TETHERING_USB; import static android.net.ConnectivityManager.TETHERING_WIFI; import android.view.LayoutInflater; import android.view.View; import android.widget.CheckBox; /* * Displays preferences for Tethering. */ Loading @@ -88,7 +83,6 @@ public class TetherSettings extends RestrictedSettingsFragment private static final String SHAREPREFERENCE_DEFAULT_WIFI = "def_wifiap_set"; private static final String SHAREPREFERENCE_FIFE_NAME = "MY_PERFS"; private static final String KEY_FIRST_LAUNCH_HOTSPOT = "FirstLaunchHotspotTethering"; private static final String KEY_TURN_OFF_WIFI_SHOW_AGAIN = "TurnOffWifiShowAgain"; private static final String ACTION_HOTSPOT_PRE_CONFIGURE = "Hotspot_PreConfigure"; private static final String ACTION_HOTSPOT_POST_CONFIGURE = "Hotspot_PostConfigure"; private static final String CONFIGURE_RESULT = "PreConfigure_result"; Loading Loading @@ -607,9 +601,6 @@ public class TetherSettings extends RestrictedSettingsFragment getPrefContext().startActivity(intent); ((HotspotPreference)preference).setChecked(false); return false; } else if(checkWifiConnectivityState(getActivity())) { showTurnOffWifiDialog(getActivity()); startTethering(TETHERING_WIFI); } else { startTethering(TETHERING_WIFI); } Loading @@ -619,45 +610,6 @@ public class TetherSettings extends RestrictedSettingsFragment return false; } private boolean checkWifiConnectivityState(Context ctx) { if(mCm == null) { ConnectivityManager mCm = (ConnectivityManager) ctx. getSystemService(Context.CONNECTIVITY_SERVICE); } NetworkInfo info = mCm == null ? null : mCm.getNetworkInfo(ConnectivityManager.TYPE_WIFI); return (info != null && info.isConnected()); } private void showTurnOffWifiDialog(final Context ctx) { LayoutInflater inflater = (LayoutInflater)ctx.getSystemService( Context.LAYOUT_INFLATER_SERVICE); View showAgainView = inflater.inflate(R.layout.not_show_again, null); CheckBox notShowAgainCheckbox = (CheckBox)showAgainView.findViewById(R.id.check); final SharedPreferences sharedpreferences = ctx.getSharedPreferences( SHAREPREFERENCE_FIFE_NAME, Context.MODE_PRIVATE); boolean showAgain = sharedpreferences.getBoolean(KEY_TURN_OFF_WIFI_SHOW_AGAIN, true); if (!showAgain) { return; } else { AlertDialog.Builder alert = new AlertDialog.Builder(ctx) .setTitle(ctx.getResources().getString(R.string.turn_off_wifi_dialog_title)) .setMessage(ctx.getResources().getString(R.string.turn_off_wifi_dialog_text)) .setView(showAgainView) .setPositiveButton(ctx.getResources(). getString(R.string.okay), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Editor editor = sharedpreferences.edit(); editor.putBoolean(KEY_TURN_OFF_WIFI_SHOW_AGAIN, !notShowAgainCheckbox.isChecked()); editor.commit(); } }); alert.setCancelable(false); alert.show(); } } public static boolean isProvisioningNeededButUnavailable(Context context) { return (TetherUtil.isProvisioningNeeded(context) && !isIntentAvailable(context)); Loading