Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 99693346 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

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
parent d2e97b45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment