[EGD-7205] Tethering can not be enabled in offline mode The tethering should not be enabled in offline mode.
3 files changed, 10 insertions(+), 1 deletions(-) M module-sys/PhoneModes/Subject.cpp M module-sys/PhoneModes/include/PhoneModes/Subject.hpp M products/PurePhone/sys/SystemManager.cpp
M module-sys/PhoneModes/Subject.cpp => module-sys/PhoneModes/Subject.cpp +5 -0
@@ 77,4 77,9 @@ namespace sys::phone_modes { return tetheringMode == Tethering::On; } bool Subject::isTetheringPossible() const noexcept { return phoneMode != PhoneMode::Offline; } } // namespace sys::phone_modes
M module-sys/PhoneModes/include/PhoneModes/Subject.hpp => module-sys/PhoneModes/include/PhoneModes/Subject.hpp +2 -0
@@ 41,6 41,8 @@ namespace sys::phone_modes bool isTetheringEnabled() const noexcept; bool isTetheringPossible() const noexcept; private: bool changePhoneMode(PhoneMode mode) noexcept; void notifyPhoneModeChange();
M products/PurePhone/sys/SystemManager.cpp => products/PurePhone/sys/SystemManager.cpp +3 -1
@@ 106,7 106,9 @@ namespace sys } if (const auto requestedState = request->getTetheringState(); requestedState == phone_modes::Tethering::On) { bus.sendUnicast(std::make_shared<TetheringQuestionRequest>(), service::name::appmgr); if (phoneModeSubject->isTetheringPossible()) { bus.sendUnicast(std::make_shared<TetheringQuestionRequest>(), service::name::appmgr); } } else { if (const auto tetheringChanged = phoneModeSubject->setTetheringMode(phone_modes::Tethering::Off);