Fragmentize BluetoothSettings.

Add UserLeaveHintListener.java, so that the settings won't use
its implementation around Activity#onUserLeaveHint().

Also fragmentize bluetooth tethering screen.

Change-Id: Id06ae3161fbdb5854ddb7a257f464fb16ea9b089
This commit is contained in:
Daisuke Miyakawa
2010-09-10 09:48:51 -07:00
parent b68e0f1d7d
commit 6ebf8619d7
8 changed files with 90 additions and 47 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings;
import com.android.settings.bluetooth.BluetoothSettings;
import com.android.settings.wifi.WifiApEnabler;
import android.app.Activity;
@@ -34,6 +35,7 @@ import android.os.Environment;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceScreen;
import android.util.Log;
import android.webkit.WebView;
import java.io.InputStream;
@@ -385,7 +387,7 @@ public class TetherSettings extends SettingsPreferenceFragment {
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
public boolean onPreferenceTreeClick(PreferenceScreen screen, Preference preference) {
if (preference == mUsbTether) {
boolean newState = mUsbTether.isChecked();
@@ -457,11 +459,15 @@ public class TetherSettings extends SettingsPreferenceFragment {
mBluetoothTether.setSummary(R.string.bluetooth_tethering_off_subtext);
}
}
} else if (preference == mBluetoothSettings) {
preference.getExtras().putString(BluetoothSettings.ACTION,
BluetoothSettings.ACTION_LAUNCH_TETHER_PICKER);
} else if (preference == mTetherHelp) {
showDialog(DIALOG_TETHER_HELP);
return true;
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
return super.onPreferenceTreeClick(screen, preference);
}
private String findIface(String[] ifaces, String[] regexes) {