Add controller for battery saver button

Bug: 72228477
Test: RunSettingsRoboTests
Change-Id: Iae9096a10553ea761d099e1e72c1de56b693bac0
This commit is contained in:
jackqdyulei
2018-01-24 19:42:42 -08:00
parent 1dd690198f
commit 92757b2454
14 changed files with 526 additions and 19 deletions

View File

@@ -27,7 +27,7 @@ import com.android.settings.Utils;
/**
* Use this broadcastReceiver to listen to the battery change, and it will invoke
* {@link OnBatteryChangedListener} if any of the followings has been changed:
* {@link OnBatteryChangedListener} if any of the following has been changed:
*
* 1. Battery level(e.g. 100%->99%)
* 2. Battery status(e.g. plugged->unplugged)
@@ -35,7 +35,14 @@ import com.android.settings.Utils;
*/
public class BatteryBroadcastReceiver extends BroadcastReceiver {
interface OnBatteryChangedListener {
/**
* Callback when the following has been changed:
*
* Battery level(e.g. 100%->99%)
* Battery status(e.g. plugged->unplugged)
* Battery saver(e.g. off->on)
*/
public interface OnBatteryChangedListener {
void onBatteryChanged();
}