Update low battery tips string am: 6d836d2d51
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14048550 Change-Id: I20ef817e4cd7bea00cc4ea6b74a35c7ea82022c6
This commit is contained in:
@@ -89,8 +89,7 @@ public class BatteryTipLoader extends AsyncLoaderCompat<List<BatteryTip>> {
|
||||
final List<BatteryTip> tips = new ArrayList<>();
|
||||
tips.add(new SummaryTip(BatteryTip.StateType.NEW,
|
||||
EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN));
|
||||
tips.add(new LowBatteryTip(BatteryTip.StateType.NEW, false /* powerSaveModeOn */,
|
||||
"Fake data"));
|
||||
tips.add(new LowBatteryTip(BatteryTip.StateType.NEW, false /* powerSaveModeOn */));
|
||||
|
||||
return tips;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ public class LowBatteryDetector implements BatteryTipDetector {
|
||||
state = BatteryTip.StateType.NEW;
|
||||
}
|
||||
|
||||
return new LowBatteryTip(
|
||||
state, powerSaveModeOn, mBatteryInfo.suggestionLabel);
|
||||
return new LowBatteryTip(state, powerSaveModeOn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,34 +21,36 @@ import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||
|
||||
/**
|
||||
* Tip to show current battery level is low or remaining time is less than a certain period
|
||||
*/
|
||||
public class LowBatteryTip extends EarlyWarningTip {
|
||||
private CharSequence mSummary;
|
||||
|
||||
public LowBatteryTip(@StateType int state, boolean powerSaveModeOn, CharSequence summary) {
|
||||
public LowBatteryTip(@StateType int state, boolean powerSaveModeOn) {
|
||||
super(state, powerSaveModeOn);
|
||||
mType = TipType.LOW_BATTERY;
|
||||
mSummary = summary;
|
||||
}
|
||||
|
||||
public LowBatteryTip(Parcel in) {
|
||||
super(in);
|
||||
mSummary = in.readCharSequence();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getTitle(Context context) {
|
||||
return context.getString(R.string.battery_tip_low_battery_title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary(Context context) {
|
||||
return mSummary;
|
||||
return context.getString(R.string.battery_tip_low_battery_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeCharSequence(mSummary);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user