Not call MainSwitchBar.getSwitch()

This is private implement details, will be removed in future.

Should call MainSwitchBar's isChecked() and setChecked() to ensure
main switch bar's style is set correctly.

Bug: 306658427
Test: manual - on wifi tether
Test: manual - on developer options
Test: m RunSettingsRoboTests
Change-Id: I292ffbcf73da0721fc206e3dac7610a0aeb20047
This commit is contained in:
Chaohui Wang
2023-10-25 13:45:09 +08:00
parent e752f7214b
commit 12ea5afdf1
5 changed files with 22 additions and 35 deletions

View File

@@ -33,13 +33,11 @@ public class AudioSharingSwitchBarController
private final Context mContext;
private final SettingsMainSwitchBar mSwitchBar;
private final Switch mSwitch;
AudioSharingSwitchBarController(Context context, SettingsMainSwitchBar switchBar) {
mContext = context;
mSwitchBar = switchBar;
mSwitch = mSwitchBar.getSwitch();
mSwitch.setChecked(false);
mSwitchBar.setChecked(false);
}
@Override