Skip to content

Commit

Permalink
[devicelock] Reset authentication state when unregistered. Contribute…
Browse files Browse the repository at this point in the history
…s to JB#37378
  • Loading branch information
adenexter committed Feb 10, 2017
1 parent efe64f9 commit 1e25e25
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 1e25e25

Please sign in to comment.