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

Commit 3219f6da authored by songferngwang's avatar songferngwang
Browse files

Set Phone number format as LTR

Bug: 334339964
Test: verify the phone number format
Change-Id: Ifa5dc394c3d9b8d7565e6200a47b7cb9fb1bba84
parent fd8c705a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ fun Context.isSubscriptionEnabledFlow(subId: Int) = subscriptionsChangedFlow().m
    .flowOn(Dispatchers.Default)

fun Context.phoneNumberFlow(subscriptionInfo: SubscriptionInfo) = subscriptionsChangedFlow().map {
    SubscriptionUtil.getFormattedPhoneNumber(this, subscriptionInfo)
    SubscriptionUtil.getBidiFormattedPhoneNumber(this, subscriptionInfo)
}.filterNot { it.isNullOrEmpty() }.flowOn(Dispatchers.Default)

fun Context.subscriptionsChangedFlow() = callbackFlow {
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ class PrimarySimRepository(private val context: Context) {
            val item = ListPreferenceOption(
                id = info.subscriptionId,
                text = "${info.displayName}",
                summary = SubscriptionUtil.getFormattedPhoneNumber(context, info) ?: "",
                summary = SubscriptionUtil.getBidiFormattedPhoneNumber(context, info) ?: "",
            )
            callsAndSmsList += item
            dataList += item