From f2bf3503030f9164beedab88508ff8c4781d1c36 Mon Sep 17 00:00:00 2001 From: tom hsu Date: Fri, 26 May 2023 17:52:11 +0800 Subject: [PATCH] [Settings] Remove redundant sort - Use sql command to sort subscription info data instead of current. Bug: 284306899 Test: Manual test Change-Id: Ie0c5f5614a336771f865f02e7675b4e125ff15bb --- src/com/android/settings/network/MobileNetworkRepository.java | 1 - .../android/settings/network/MobileNetworkSummaryController.java | 1 - 2 files changed, 2 deletions(-) diff --git a/src/com/android/settings/network/MobileNetworkRepository.java b/src/com/android/settings/network/MobileNetworkRepository.java index e55ba26e106..b2f2e2e2ea7 100644 --- a/src/com/android/settings/network/MobileNetworkRepository.java +++ b/src/com/android/settings/network/MobileNetworkRepository.java @@ -388,7 +388,6 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions mActiveSubInfoEntityList = availableSubInfoEntityList.stream() .filter(SubscriptionInfoEntity::isActiveSubscription) .filter(SubscriptionInfoEntity::isSubscriptionVisible) - .sorted((e1, e2) -> Integer.compare(e1.simSlotIndex, e2.simSlotIndex)) .collect(Collectors.toList()); if (DEBUG) { Log.d(TAG, "onActiveSubInfoChanged, activeSubInfoEntityList = " diff --git a/src/com/android/settings/network/MobileNetworkSummaryController.java b/src/com/android/settings/network/MobileNetworkSummaryController.java index 1474836d7f1..f924636463d 100644 --- a/src/com/android/settings/network/MobileNetworkSummaryController.java +++ b/src/com/android/settings/network/MobileNetworkSummaryController.java @@ -134,7 +134,6 @@ public class MobileNetworkSummaryController extends AbstractPreferenceController return mContext.getString(R.string.mobile_network_tap_to_activate, displayName); } else { return mSubInfoEntityList.stream() - .sorted((e1, e2) -> Integer.compare(e1.simSlotIndex, e2.simSlotIndex)) .map(SubscriptionInfoEntity::getUniqueDisplayName) .collect(Collectors.joining(", ")); }