Fix unexpected Wi-Fi hotspot shutdown

- Filter out unnecessary onSwitchChanged callbacks when the switch is
  disabled, which should not be triggered by user input.

- Refine the state handling function to avoid unnecessary
  onSwitchChanged callback.

- Refine the error handling of isHotspotPasswordValid function.

Bug: 227719584
Test: manual test
make RunSettingsRoboTests \
  ROBOTEST_FILTER=WifiTetherSwitchBarControllerTest

Change-Id: If62aaadc8ddb214769b1367d7801b6125bb5377c
3 files changed