Add ability to speak to provider for enhanced estimate
Added code that checks if the provider for the enhanced battery drain estimate is available. If it is available we use that value instead of the one computed by BatteryStats. Test: Robotests Bug: 37753227 Change-Id: I7eae01b56f85d33eafc42ee0f18bb752779581b2
This commit is contained in:
@@ -16,7 +16,10 @@
|
||||
|
||||
package com.android.settings.fuelgauge;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import com.android.internal.os.BatterySipper;
|
||||
|
||||
/**
|
||||
@@ -62,4 +65,24 @@ public interface PowerUsageFeatureProvider {
|
||||
* Check whether the anomaly detection is enabled
|
||||
*/
|
||||
boolean isAnomalyDetectionEnabled();
|
||||
|
||||
/**
|
||||
* Returns an improved prediction for battery time remaining.
|
||||
*/
|
||||
long getEnhancedBatteryPrediction(Context context);
|
||||
|
||||
/**
|
||||
* Checks whether the toggle for enhanced battery predictions is enabled.
|
||||
*/
|
||||
boolean isEnhancedBatteryPredictionEnabled(Context context);
|
||||
|
||||
/**
|
||||
* Returns the Uri used to query for an enhanced battery prediction from a cursor loader.
|
||||
*/
|
||||
Uri getEnhancedBatteryPredictionUri();
|
||||
|
||||
/**
|
||||
* Returns the the estimate in the cursor as a long or -1 if the cursor is null
|
||||
*/
|
||||
long getTimeRemainingEstimate(Cursor cursor);
|
||||
}
|
||||
|
Reference in New Issue
Block a user