Add detail page for Battery usage and track GPS and foreground CPU.

Show details such as Cpu time, Cpu foreground time, data sent/received,
and GPS usage.
This commit is contained in:
Amith Yamasani
2009-06-03 15:45:40 -07:00
parent 110b75cde7
commit 7f6aa6283a
8 changed files with 520 additions and 41 deletions

View File

@@ -26,6 +26,7 @@ import android.view.View;
import android.widget.ImageView;
import com.android.settings.R;
import com.android.settings.fuelgauge.PowerUsageSummary.BatterySipper;
/**
* Custom preference for displaying power consumption as a bar and an icon on the left for the
@@ -37,13 +38,15 @@ public class PowerGaugePreference extends Preference {
private Drawable mIcon;
private GaugeDrawable mGauge;
private double mValue;
private BatterySipper mInfo;
public PowerGaugePreference(Context context, Drawable icon) {
public PowerGaugePreference(Context context, Drawable icon, BatterySipper info) {
super(context);
setLayoutResource(R.layout.preference_powergauge);
mIcon = icon;
mGauge = new GaugeDrawable();
mGauge.bar = context.getResources().getDrawable(R.drawable.app_gauge);
mInfo = info;
}
/**
@@ -55,6 +58,10 @@ public class PowerGaugePreference extends Preference {
mGauge.percent = mValue;
}
BatterySipper getInfo() {
return mInfo;
}
@Override
protected void onBindView(View view) {
super.onBindView(view);