Flush QOfonoSimManager property cache when SIM is removed #74

Merged
merged 2 commits into from Mar 16, 2015

Conversation

Projects
None yet
2 participants
Contributor

monich commented Mar 16, 2015

When SIM card is removed and "Present" becomes false, ofono stops reporting other properties, essentially meaning that for any practical purpose they no longer exist. There's no "PropertyRemoved" signal in the ofono API though, so we have to remove them from our cache manually. After SIM is inserted and "Present" becomes true again, ofono is supposed to send "PropertyChanged" signal for each property and that will re-populate our property cache.

What was happening after a different SIM card that has been inserted, "Present" was becoming true but the old properties (such as "SubscriberIdentity" for example) remained in the cache even though they no longer matched the reality. That in turn allowed wrong/misleading information to be displayed on the screen for as long as a few seconds until "PropertyChanged" signals arrive the actual new values.

monich added some commits Mar 16, 2015

[libqofono] QString constants in QOfonoSimManager
Defined property keys as QString constants.
[libqofono] Flush QOfonoSimManager property cache when SIM is removed
When "Present" becomes false, ofono stops reporting other properties,
essentially meaning that for any practical purpose they no longer exist.
There's no "PropertyRemoved" signal in the ofono API though, so we have
to remove them from our cache manually. After SIM inserted and "Present"
becomes true again, ofono is supposed to send "PropertyChanged" signal
for each property and that will re-populate our property cache.
Member

lpotter commented Mar 16, 2015

LGTM

monich added a commit that referenced this pull request Mar 16, 2015

Merge pull request #74 from monich/sim_present
Flush QOfonoSimManager property cache when SIM is removed

@monich monich merged commit 6cb1ebf into nemomobile:master Mar 16, 2015

@monich monich deleted the monich:sim_present branch Mar 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment