Skip to content

Correctly update the lock security setting

Guido Berhörster requested to merge fix-security-mode into main

There are two issues with the lock security setting on the "Locking and unlocking" page causing it not to be updated after changing the setting.

Firstly, there are two separate instances of LomiriSecurityPrivacyPanel on PhoneLocking.qml and LockSecurity.qml. The securityTypeChanged signal is emitted when calling the SecurityPrivacy::setDisplayHint() method after changing between passphrases and passcodes and thus only received by one instance.

This can be addressed by instantiating LomiriSecurityPrivacyPanel in PhoneLocking.qml and passing it as a property to PhoneLocking.qml. Other consumers of PhoneLocking.qml will have to be adapted.

Secondly, the securityTypeChanged is never emitted in case of a change between passcodes/passphrases and no lock security. Although the notify::password-mode signal of the ActUser instance is observed, it never seems to fire because the libaccountsservice API is bypassed when changing the password mode by a direct DBus call.

Furthermore even retrieving the PasswordMode property via the libaccountsservice API is racy since the GObject might not have been updated yet when queried. The solution is to retrieve directly via DBus as well.

Since these are the only uses of libaccountsservice it can be removed alltogether.

This fixes #2 (closed).

Edited by Guido Berhörster

Merge request reports