Clean up unused params from SubscriptionAnnotation
Bug: 338904413 Test: m Settings Change-Id: Ic714066e45bb0050361c8096394929828a871589
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
package com.android.settings.network.helper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.ParcelUuid;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
import android.telephony.SubscriptionManager;
|
||||
|
||||
@@ -35,14 +34,11 @@ public class SubscriptionAnnotation {
|
||||
private static final String TAG = "SubscriptionAnnotation";
|
||||
|
||||
private SubscriptionInfo mSubInfo;
|
||||
private int mOrderWithinList;
|
||||
private int mType = TYPE_UNKNOWN;
|
||||
private boolean mIsExisted;
|
||||
private boolean mIsActive;
|
||||
private boolean mIsAllowToDisplay;
|
||||
|
||||
public static final ParcelUuid EMPTY_UUID = ParcelUuid.fromString("0-0-0-0-0");
|
||||
|
||||
public static final int TYPE_UNKNOWN = 0x0;
|
||||
public static final int TYPE_PSIM = 0x1;
|
||||
public static final int TYPE_ESIM = 0x2;
|
||||
@@ -52,8 +48,8 @@ public class SubscriptionAnnotation {
|
||||
*/
|
||||
public static class Builder {
|
||||
|
||||
private List<SubscriptionInfo> mSubInfoList;
|
||||
private int mIndexWithinList;
|
||||
private final List<SubscriptionInfo> mSubInfoList;
|
||||
private final int mIndexWithinList;
|
||||
|
||||
/**
|
||||
* Constructor of builder
|
||||
@@ -65,10 +61,9 @@ public class SubscriptionAnnotation {
|
||||
mIndexWithinList = indexWithinList;
|
||||
}
|
||||
|
||||
public SubscriptionAnnotation build(Context context, List<Integer> eSimCardId,
|
||||
List<Integer> simSlotIndex, List<Integer> activeSimSlotIndex) {
|
||||
public SubscriptionAnnotation build(Context context, List<Integer> activeSimSlotIndex) {
|
||||
return new SubscriptionAnnotation(mSubInfoList, mIndexWithinList, context,
|
||||
eSimCardId, simSlotIndex, activeSimSlotIndex);
|
||||
activeSimSlotIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +73,7 @@ public class SubscriptionAnnotation {
|
||||
@Keep
|
||||
@VisibleForTesting
|
||||
protected SubscriptionAnnotation(List<SubscriptionInfo> subInfoList, int subInfoIndex,
|
||||
Context context, List<Integer> eSimCardId,
|
||||
List<Integer> simSlotIndex, List<Integer> activeSimSlotIndexList) {
|
||||
Context context, List<Integer> activeSimSlotIndexList) {
|
||||
if ((subInfoIndex < 0) || (subInfoIndex >= subInfoList.size())) {
|
||||
return;
|
||||
}
|
||||
@@ -88,7 +82,6 @@ public class SubscriptionAnnotation {
|
||||
return;
|
||||
}
|
||||
|
||||
mOrderWithinList = subInfoIndex;
|
||||
mType = mSubInfo.isEmbedded() ? TYPE_ESIM : TYPE_PSIM;
|
||||
mIsExisted = true;
|
||||
if (mType == TYPE_ESIM) {
|
||||
@@ -104,12 +97,6 @@ public class SubscriptionAnnotation {
|
||||
mIsAllowToDisplay = isDisplayAllowed(context);
|
||||
}
|
||||
|
||||
// the index provided during construction of Builder
|
||||
@Keep
|
||||
public int getOrderingInList() {
|
||||
return mOrderWithinList;
|
||||
}
|
||||
|
||||
// type of subscription
|
||||
@Keep
|
||||
public int getType() {
|
||||
@@ -141,12 +128,6 @@ public class SubscriptionAnnotation {
|
||||
mSubInfo.getSubscriptionId();
|
||||
}
|
||||
|
||||
// the grouping UUID
|
||||
@Keep
|
||||
public ParcelUuid getGroupUuid() {
|
||||
return (mSubInfo == null) ? null : mSubInfo.getGroupUuid();
|
||||
}
|
||||
|
||||
// the SubscriptionInfo
|
||||
@Keep
|
||||
public SubscriptionInfo getSubInfo() {
|
||||
|
Reference in New Issue
Block a user