Fix Can't Able to Click Sims
The root cause is SubscriptionManager.OnSubscriptionsChangedListener .onSubscriptionsChanged() not invoked in some cases. Even the SubscriptionManager.addOnSubscriptionsChangedListener's doc says the onSubscriptionsChanged() method will also be invoked once initially when calling it, there still case that the onSubscriptionsChanged() method is not invoked initially. For example, when the onSubscriptionsChanged event never happens before, on a device never ever has any subscriptions. Adding a .onStart { emit(Unit) } to fix. Also make the subscriptionsChangedFlow() a shared flow to mitigate the extra emit cost. Bug: 369276595 Flag: EXEMPT bug fix Test: manual - factory reset & no any sim Test: atest SubscriptionRepositoryTest Change-Id: Ic32a5666f14373926b5dfedb5dedadb4369acfc7
Loading
Please register or sign in to comment