Clean up useless defender dialog code

Test: Unit test passed
Bug: 256523123
Change-Id: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
This commit is contained in:
Zhenwei Chen
2022-11-22 04:39:03 +08:00
parent f4b81c8207
commit a725bac68c
3 changed files with 0 additions and 83 deletions

View File

@@ -244,20 +244,4 @@ public class BatteryTipDialogFragmentTest {
assertThat(shadowDialog.getMessage()).isEqualTo(
mContext.getText(R.string.battery_tip_dialog_summary_message));
}
@Test
public void testOnCreateDialog_defenderTip_fireDialog() {
mDialogFragment = BatteryTipDialogFragment.newInstance(mDefenderTip, METRICS_KEY);
FragmentController.setupFragment(mDialogFragment, FragmentActivity.class,
0 /* containerViewId */, null /* bundle */);
final AlertDialog dialog = ShadowAlertDialogCompat.getLatestAlertDialog();
ShadowAlertDialogCompat shadowDialog = ShadowAlertDialogCompat.shadowOf(dialog);
assertThat(shadowDialog.getTitle()).isEqualTo(
mContext.getString(R.string.battery_tip_limited_temporarily_title));
assertThat(shadowDialog.getMessage()).isEqualTo(
mContext.getString(R.string.battery_tip_limited_temporarily_dialog_msg, "80%"));
}
}