Clean up useless defender dialog code

Test: Unit test passed
Bug: 260687359
Merged-In: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Change-Id: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit a725bac68c)
This commit is contained in:
Zhenwei Chen
2022-11-22 04:39:03 +08:00
committed by Wesley Wang
parent 80095fa001
commit 07d208dfb1
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%"));
}
}