Skip to content

Commit

Permalink
Merge branch 'jb37378' into 'master'
Browse files Browse the repository at this point in the history
[devicelock] Reset authentication state when unregistered. Contributes to JB#37378

See merge request !10
  • Loading branch information
adenexter committed Feb 17, 2017
2 parents efe64f9 + 1e25e25 commit 0c31122
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/nemo-devicelock/authenticationinput.cpp
Expand Up @@ -302,6 +302,13 @@ void AuthenticationInput::setRegistered(bool registered)

call(QStringLiteral("SetRegistered"), m_localPath, registered);

// A cancel is implicit in unregistering, reset the state to idle.
if (m_status != Idle) {
m_status = Idle;

emit statusChanged();
}

emit registeredChanged();
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/nemo-devicelock/host/hostdevicelock.cpp
Expand Up @@ -385,6 +385,11 @@ void HostDeviceLock::availabilityChanged()
{
const auto available = availability();

propertyChanged(
QStringLiteral("org.nemomobile.devicelock.DeviceLock"),
QStringLiteral("Enabled"),
available != AuthenticationNotRequired);

switch (available) {
case AuthenticationNotRequired:
switch (m_state) {
Expand Down Expand Up @@ -481,10 +486,6 @@ void HostDeviceLock::availabilityChanged()
break;
}

propertyChanged(
QStringLiteral("org.nemomobile.devicelock.DeviceLock"),
QStringLiteral("Enabled"),
available != AuthenticationNotRequired);
stateChanged();
}

Expand Down

0 comments on commit 0c31122

Please sign in to comment.