[Settings] Hide subscriptions not existed within device

For non-active subscriptions, the one inserted in slot
but turned off need to be visible to the user. However,
the one un-plugged need to be invisble.

Since SubscriptionUtil#getSelectableSubscriptionInfoList() didn't cover all the cases required. Create this one to fit into the criteria required here.

Note: subscriptions with same group UUID will be displayed seperately.

Bug: 191228344
Test: local
Change-Id: Ia68c23b007164b7520456cb6c7427ca142558b59
(cherry picked from commit 75f1450bbf)
(cherry picked from commit 0726f263a8)
This commit is contained in:
Bonian Chen
2021-07-06 14:42:04 +08:00
parent 2fe6e382d7
commit a239a6c53a
9 changed files with 781 additions and 7 deletions

View File

@@ -486,7 +486,7 @@ public class SubscriptionUtil {
* @param info the subscriptionInfo to check against.
* @return true if this subscription should be visible to the API caller.
*/
private static boolean isSubscriptionVisible(
public static boolean isSubscriptionVisible(
SubscriptionManager subscriptionManager, Context context, SubscriptionInfo info) {
if (info == null) return false;
// If subscription is NOT grouped opportunistic subscription, it's visible.