Add sanity check method for BatteryTip
This method is used to check whether data in battery tip is still valid. If not, try recover the data or dismiss the tip. Change-Id: Idc9e4d49f99e33d3f5e82e694dc78227fc1da41c Fixes: 111218723 Test: RunSettingsRoboTests
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.fuelgauge.batterytip.tips;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -133,6 +134,14 @@ public abstract class BatteryTip implements Comparable<BatteryTip>, Parcelable {
|
||||
*/
|
||||
public abstract void updateState(BatteryTip tip);
|
||||
|
||||
/**
|
||||
* Check whether data is still make sense. If not, try recover.
|
||||
* @param context used to do sanity check
|
||||
*/
|
||||
public void sanityCheck(Context context) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the battery tip
|
||||
*/
|
||||
|
Reference in New Issue
Block a user