diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-11-12 12:44:52 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-11-12 12:44:52 -0800 |
commit | c05dedf9bee2445b6a35e7ca2f2d67f9b570bfaa (patch) | |
tree | 6643afb176dc17187676dd80541aec5644cab55e /src/com/android/settings/fuelgauge | |
parent | 928e78acea580b2dd9f4d5b8207ec50ef9fc258d (diff) | |
download | packages_apps_Settings-c05dedf9bee2445b6a35e7ca2f2d67f9b570bfaa.tar.gz packages_apps_Settings-c05dedf9bee2445b6a35e7ca2f2d67f9b570bfaa.tar.bz2 packages_apps_Settings-c05dedf9bee2445b6a35e7ca2f2d67f9b570bfaa.zip |
Buttons in battery details now switch fragments.
These were launching a whole new settings activity.
Change-Id: I6876acf54d484119eec339c8597b5d9d843bae56
Diffstat (limited to 'src/com/android/settings/fuelgauge')
-rw-r--r-- | src/com/android/settings/fuelgauge/PowerUsageDetail.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/com/android/settings/fuelgauge/PowerUsageDetail.java b/src/com/android/settings/fuelgauge/PowerUsageDetail.java index c4b6db477..771750394 100644 --- a/src/com/android/settings/fuelgauge/PowerUsageDetail.java +++ b/src/com/android/settings/fuelgauge/PowerUsageDetail.java @@ -42,8 +42,14 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; + +import com.android.settings.DisplaySettings; import com.android.settings.R; +import com.android.settings.SecuritySettings; +import com.android.settings.WirelessSettings; import com.android.settings.applications.InstalledAppDetails; +import com.android.settings.bluetooth.BluetoothSettings; +import com.android.settings.wifi.WifiSettings; public class PowerUsageDetail extends Fragment implements Button.OnClickListener { @@ -253,24 +259,30 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener } private void doAction(int action) { + PreferenceActivity pa = (PreferenceActivity)getActivity(); switch (action) { case ACTION_DISPLAY_SETTINGS: - startActivity(new Intent(Settings.ACTION_DISPLAY_SETTINGS)); + pa.startPreferencePanel(DisplaySettings.class.getName(), null, + R.string.display_settings_title, null, null, 0); break; case ACTION_WIFI_SETTINGS: - startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); + pa.startPreferencePanel(WifiSettings.class.getName(), null, + R.string.wifi_settings, null, null, 0); break; case ACTION_BLUETOOTH_SETTINGS: - startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS)); + pa.startPreferencePanel(BluetoothSettings.class.getName(), null, + R.string.bluetooth_settings, null, null, 0); break; case ACTION_WIRELESS_SETTINGS: - startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS)); + pa.startPreferencePanel(WirelessSettings.class.getName(), null, + R.string.radio_controls_title, null, null, 0); break; case ACTION_APP_DETAILS: startApplicationDetailsActivity(); break; case ACTION_SECURITY_SETTINGS: - startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS)); + pa.startPreferencePanel(SecuritySettings.class.getName(), null, + R.string.security_settings_title, null, null, 0); break; case ACTION_FORCE_STOP: killProcesses(); |