Merge "Implements additional battery info menu behavior."
This commit is contained in:
committed by
Android (Google) Code Review
commit
bdd0f0f66c
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.fuelgauge;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
/**
|
||||
* Feature Provider used in power usage
|
||||
*/
|
||||
@@ -25,5 +27,13 @@ public interface PowerUsageFeatureProvider {
|
||||
*/
|
||||
boolean isLocationSettingEnabled(String[] packages);
|
||||
|
||||
/**
|
||||
* Check whether additional battery info feature is enabled.
|
||||
*/
|
||||
boolean isAdditionalBatteryInfoEnabled();
|
||||
|
||||
/**
|
||||
* Gets an {@link Intent} to show additional battery info.
|
||||
*/
|
||||
Intent getAdditionalBatteryInfoIntent();
|
||||
}
|
||||
|
@@ -175,6 +175,11 @@ public class PowerUsageSummary extends PowerUsageBase {
|
||||
sa.startPreferencePanel(ManageApplications.class.getName(), args,
|
||||
R.string.high_power_apps, null, null, 0);
|
||||
return true;
|
||||
case MENU_ADDITIONAL_BATTERY_INFO:
|
||||
startActivity(FeatureFactory.getFactory(getContext())
|
||||
.getPowerUsageFeatureProvider(getContext())
|
||||
.getAdditionalBatteryInfoIntent());
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
Reference in New Issue
Block a user