modem: add support to clear cached pins.

If the modem is powered off via D-Bus, clear any cached PINs to make
sure that automatic PIN entry behavior is not activated.
This commit is contained in:
Nandini Rebello 2019-01-16 12:15:31 +05:30 committed by Denis Kenzior
parent 3152c59455
commit 55e5a766f2
1 changed files with 3 additions and 0 deletions

View File

@ -1130,6 +1130,9 @@ static DBusMessage *modem_set_property(DBusConnection *conn,
if (modem->lockdown)
return __ofono_error_access_denied(msg);
if (!powered)
__ofono_sim_clear_cached_pins(modem->sim);
err = set_powered(modem, powered);
if (err < 0) {
if (err != -EINPROGRESS)