@Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    if (mBroadcasting) {
      return;
    }

    mOption.write(mConfig, mContext, isChecked, this);
  }
 private void updateState() {
   mBroadcasting = true;
   mSwitch.setChecked((Boolean) mOption.read(mConfig));
   mBroadcasting = false;
 }