WifiConfigManager: Cleanup the pending store read logic
I had assumed that user unlock would always come after boot completed,
but it turns out that it's not always the case (especially for non
encrypted devices).
Couple of flags added to handle this race:
1. mPendingStoreRead: Used to indicate if we have invoked
|loadFromStore| or |migrateFromStore| once. This flag is used to defer
any user unlock or switching handling untill we do load from store.
2. mDeferredUserUnlockRead: Used to indicate if we deferred a user
unlock handling because we had not yet loaded from store.
User switching requires a UI interaction and cannot occur until the
BOOT_COMPLETED broadcast is received. So, there is no need to handle
that. A wtf was added to alert for out of order notifications.
Bug: 34741678
Test: Added Unit tests.
Change-Id: Id17d233f8da2540210b84cbd313b2a3efff90d70
2 files changed