use of com.android.settings.fuelgauge.batterytip.AppInfo in project android_packages_apps_Settings by omnirom.
the class BatteryFixSliceTest method getSlice_unimportantSlice_shouldSkip.
@Test
public void getSlice_unimportantSlice_shouldSkip() {
final List<BatteryTip> tips = new ArrayList<>();
final List<AppInfo> appList = new ArrayList<>();
appList.add(new AppInfo.Builder().setPackageName("com.android.settings").setScreenOnTimeMs(10000L).build());
tips.add(new LowBatteryTip(BatteryTip.StateType.INVISIBLE, false));
tips.add(new EarlyWarningTip(BatteryTip.StateType.HANDLED, false));
tips.add(new HighUsageTip(1000L, appList));
ShadowBatteryTipLoader.setBatteryTips(tips);
BatteryFixSlice.refreshBatteryTips(mContext);
final Slice slice = mSlice.getSlice();
assertThat(SliceMetadata.from(mContext, slice).isErrorSlice()).isTrue();
}
Aggregations