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

Commit 817cc47b authored by SongFerng Wang's avatar SongFerng Wang Committed by Android (Google) Code Review
Browse files

Merge "Refactor the getCurrentCarrierNameForDisplay" into main

parents f82f48a6 27d969bb
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -610,12 +610,8 @@ public class MobileNetworkUtils {
    }

    public static CharSequence getCurrentCarrierNameForDisplay(Context context) {
        final SubscriptionInfo subInfo = getSubscriptionInfo(context,
        return getCurrentCarrierNameForDisplay(context,
                SubscriptionManager.getDefaultSubscriptionId());
        if (subInfo != null) {
            return subInfo.getCarrierName();
        }
        return getOperatorNameFromTelephonyManager(context);
    }

    private static @Nullable SubscriptionInfo getSubscriptionInfo(Context context, int subId) {