[Sb refactor] Move active data repo to connections repo
Since MobileIconsInteractor was always eagerly creating a mobile connection repository tracking the active data subscripton, this CL moves that to the MobileConnectionsRepository. This allows us to make th following changes: - Change activeMobileDataSubscriptionId to return null if the id is invalid - Expose the active mobile data repo as a nullable flow - Rework the isValidSubId() method to take this active subid into account - Same for the cached repos This change is specifically written to better handle the case where TelephonyCallback#onActiveDataSubscriptionIdChanged is called before SubscriptionManager#onSubscriptionsChanged is called. In that case, the old implementation would throw an exception for an invalid subId, despite having been given a valid subId from the system. Test: MobileConnectionsRepositoryTest Bug: 268146648 Change-Id: I39698d4d516a783fe17ae661fdcb220407d89486
Loading
Please register or sign in to comment