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

Skip to content
Commit b83e1afc authored by Evan Laird's avatar Evan Laird
Browse files

[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
parent c5a9ef55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment