Linked the recent location apps to battery page
* Extracted BatteryStatsHelper from PowerUsageSummary * Dropped the "pause" and "resume" method from the RadioButtonPreference * Opening battery usage page when the user clicks the recent location apps item Change-Id: I5a2d03271434765780154265976d8caa7f8060d8
This commit is contained in:
@@ -19,9 +19,7 @@ package com.android.settings.location;
|
||||
import android.content.Context;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -37,8 +35,6 @@ import com.android.settings.R;
|
||||
* uncheck all the other preferences, you should do that by code yourself.
|
||||
*/
|
||||
public class RadioButtonPreference extends CheckBoxPreference {
|
||||
private boolean mValidListener;
|
||||
|
||||
public interface OnClickListener {
|
||||
public abstract void onRadioButtonClicked(RadioButtonPreference emiter);
|
||||
}
|
||||
@@ -48,7 +44,6 @@ public class RadioButtonPreference extends CheckBoxPreference {
|
||||
public RadioButtonPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setWidgetLayoutResource(R.layout.preference_widget_radiobutton);
|
||||
mValidListener = false;
|
||||
}
|
||||
|
||||
public RadioButtonPreference(Context context, AttributeSet attrs) {
|
||||
@@ -63,14 +58,6 @@ public class RadioButtonPreference extends CheckBoxPreference {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
mValidListener = false;
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
mValidListener = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick() {
|
||||
if (mListener != null) {
|
||||
|
Reference in New Issue
Block a user