Index: sources/storage/Logger.cpp =================================================================== diff -u -reb918e27185e683e1d6a2b3ef0c621d173d561a5 -r2afdc76a7d8f97a518da0158e9bd08217de41a97 --- sources/storage/Logger.cpp (.../Logger.cpp) (revision eb918e27185e683e1d6a2b3ef0c621d173d561a5) +++ sources/storage/Logger.cpp (.../Logger.cpp) (revision 2afdc76a7d8f97a518da0158e9bd08217de41a97) @@ -146,9 +146,12 @@ this , SLOT( onSDCardStateChange(bool, bool))); connect(&_DeviceController, SIGNAL( didSDCardSpaceChange(bool, qint64, qint64, quint8)), this , SLOT( onSDCardSpaceChange(bool, qint64, qint64, quint8))); - connect(&_DeviceController, SIGNAL( didEncryptedPartitionSpaceLow()), - this , SLOT( concurrentRemoveLogs())); + connect(&_DeviceController, SIGNAL( didSettingsPartitionStateChange(bool, bool)), + this , SLOT( onSettingsPartitionStateChange(bool, bool))); + connect(&_DeviceController, SIGNAL( didSettingsPartitionSpaceChange(bool, qint64, qint64, quint8)), + this , SLOT( onSettingsPartitionSpaceChange(bool, qint64, qint64, quint8))); + connect(&_DeviceController, SIGNAL(didCryptSetupMount(bool)), this , SLOT( onCryptSetupMount(bool))); } @@ -591,7 +594,53 @@ } // disabled coco end + /*! + * \brief Logger::onSettingsPartitionStateChange + * \details handle the state change of the settings partition + * \param vReady - The Settings Partition is Ready + * \param vReadonly - The Settings Partition is readonly + */ +void Logger::onSettingsPartitionStateChange(bool vReady, bool vReadonly) +{ +#if BUILD_FOR_DESKTOP + Q_UNUSED(vReady ) + Q_UNUSED(vReadonly ) + _logStorageReady = true; +#else + // Include settings partition state + _logStorageReady = _logStorageReady && vReady && !vReadonly; +#endif +} + +/*! + * \brief Logger::onSettingsPartitionSpaceChange + * \details Settings Partition storage space parameter change slot. + * This slot when called is calling the function concurrentRemoveLogs, + * if percent of available space vPercent is less than Storage::Available_Space_Percent, + * if the Settings Partition is ready (vReady is true) + * \param vReady - The Settings Partition is Ready + * \param vTotal - Total storage space on the Settings Partition + * \param vAvailable - Available storage space on the Settings Partition + * \param vPercent - Percent of available storage space on the Settings Partition + */ +void Logger::onSettingsPartitionSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent) +{ + // disabled coco begin validated: This needs user interaction to change the SD card files system. + // has been tested manually + Q_UNUSED(vTotal ) + Q_UNUSED(vAvailable ) + if ( ! vReady ) return; + + // DEBUG: qDebug() << vPercent << Storage::Available_Space_Percent; + if ( Storage::Log_Min_Available_Total_Space_IsLow(vPercent) ) { + concurrentRemoveLogs(); + } +} +// disabled coco end + + +/*! * \brief Logger::enableConsoleOut * \details Enables or Disables the console output and logs the status * \param vEnabled - Enable console output if true