| Chunk |
|---|
| Conflicting content |
|---|
import android.provider.ContactsContract.CommonDataKinds.Callable; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.DataUsageFeedback; <<<<<<< HEAD import android.telecom.PhoneAccountHandle; import android.telephony.PhoneNumberUtils; ======= import android.telecomm.PhoneAccountHandle; >>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9 import android.text.TextUtils; import com.android.internal.telephony.CallerInfo; |
| Solution content |
|---|
import android.provider.ContactsContract.CommonDataKinds.Callable; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.DataUsageFeedback; import android.telecom.PhoneAccountHandle; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import com.android.internal.telephony.CallerInfo; |
| File |
|---|
| CallLog.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
public int[] simIconRes;
/**
this.nameSource = 0;
* Mobile Country Code
*/
public int mcc;
this.color = 0;
/**
* Mobile Network Code
*/
public int mnc;
this.number = "";
this.displayNumberFormat = 0;
this.dataRoaming = 0;
this.simIconRes = new int[2];
public SubInfoRecord() {
this.mcc = 0;
this.mnc = 0;
}
* Data roaming state, DATA_RAOMING_ENABLE, DATA_RAOMING_DISABLE
*/
public int dataRoaming;
/**
* SIM Icon resource identifiers. FIXME: Check with MTK what it really is
*/
*/
public class SubInfoRecord implements Parcelable {
<<<<<<< HEAD
/**
* Subscription Identifier, this is a device unique number
* and not an index into an array
*/
public long subId;
/** The GID for a SIM that maybe associated with this subscription, empty if unknown */
public String iccId;
/**
* The slot identifier for that currently contains the subscription
* and not necessarily unique and maybe INVALID_SLOT_ID if unknown
*/
public int slotId;
/**
* The string displayed to the user that identifies this subscription
*/
public String displayName;
/**
* The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
*/
public int nameSource;
/**
* The color to be used for when displaying to the user
*/
public int color;
/**
* A number presented to the user identify this subscription
*/
public String number;
/**
* How to display the phone number, DISPLAY_NUMBER_NONE, DISPLAY_NUMBER_FIRST,
* DISPLAY_NUMBER_LAST
*/
public int displayNumberFormat;
/**
this.subId = SubscriptionManager.INVALID_SUB_ID;
this.iccId = "";
this.slotId = SubscriptionManager.INVALID_SLOT_ID;
this.displayName = "";
public SubInfoRecord(long subId, String iccId, int slotId, String displayName, int nameSource,
int color, String number, int displayFormat, int roaming, int[] iconRes,
int mcc, int mnc) {
this.subId = subId;
this.iccId = iccId;
this.slotId = slotId;
this.displayName = displayName;
this.nameSource = nameSource;
this.color = color;
this.number = number;
this.displayNumberFormat = displayFormat;
this.dataRoaming = roaming;
this.simIconRes = iconRes;
this.mcc = mcc;
this.mnc = mnc;
=======
public long mSubId;
public String mIccId;
public int mSlotId;
public String mDisplayName;
public int mNameSource;
public int mColor;
public String mNumber;
public int mDisplayNumberFormat;
public int mDataRoaming;
public int[] mSimIconRes;
public SubInfoRecord() {
this.mSubId = SubscriptionManager.INVALID_SUB_ID;
this.mIccId = "";
this.mSlotId = SubscriptionManager.INVALID_SLOT_ID;
this.mDisplayName = "";
this.mNameSource = 0;
this.mColor = 0;
this.mNumber = "";
this.mDisplayNumberFormat = 0;
this.mDataRoaming = 0;
this.mSimIconRes = new int[2];
}
public SubInfoRecord(long subId, String iccId, int slotId, String displayName,
int nameSource, int mColor, String mNumber, int displayFormat, int roaming, int[] iconRes) {
this.mSubId = subId;
this.mIccId = iccId;
this.mSlotId = slotId;
this.mDisplayName = displayName;
this.mNameSource = nameSource;
this.mColor = mColor;
this.mNumber = mNumber;
this.mDisplayNumberFormat = displayFormat;
this.mDataRoaming = roaming;
this.mSimIconRes = iconRes;
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
public static final Parcelable.Creator |
| Solution content |
|---|
*/
public class SubInfoRecord implements Parcelable {
/**
* Subscription Identifier, this is a device unique number
* and not an index into an array
*/
public long subId;
/** The GID for a SIM that maybe associated with this subscription, empty if unknown */
public String iccId;
/**
* The slot identifier for that currently contains the subscription
* and not necessarily unique and maybe INVALID_SLOT_ID if unknown
*/
public int slotId;
/**
* The string displayed to the user that identifies this subscription
*/
public String displayName;
/**
* The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
*/
public int nameSource;
/**
* The color to be used for when displaying to the user
*/
public int color;
/**
* A number presented to the user identify this subscription
*/
public String number;
/**
* How to display the phone number, DISPLAY_NUMBER_NONE, DISPLAY_NUMBER_FIRST,
* DISPLAY_NUMBER_LAST
*/
public int displayNumberFormat;
/**
* Data roaming state, DATA_RAOMING_ENABLE, DATA_RAOMING_DISABLE
*/
public int dataRoaming;
/**
* SIM Icon resource identifiers. FIXME: Check with MTK what it really is
*/
public int[] simIconRes;
/**
* Mobile Country Code
*/
public int mcc;
/**
* Mobile Network Code
*/
public int mnc;
public SubInfoRecord() {
this.subId = SubscriptionManager.INVALID_SUB_ID;
this.iccId = "";
this.slotId = SubscriptionManager.INVALID_SLOT_ID;
this.displayName = "";
this.nameSource = 0;
this.color = 0;
this.number = "";
this.displayNumberFormat = 0;
this.dataRoaming = 0;
this.simIconRes = new int[2];
this.mcc = 0;
this.mnc = 0;
}
public SubInfoRecord(long subId, String iccId, int slotId, String displayName, int nameSource,
int color, String number, int displayFormat, int roaming, int[] iconRes,
int mcc, int mnc) {
this.subId = subId;
this.iccId = iccId;
this.slotId = slotId;
this.displayName = displayName;
this.nameSource = nameSource;
this.color = color;
this.number = number;
this.displayNumberFormat = displayFormat;
this.dataRoaming = roaming;
this.simIconRes = iconRes;
this.mcc = mcc;
this.mnc = mnc;
}
public static final Parcelable.Creator |
| File |
|---|
| SubInfoRecord.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method declaration |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
int mcc = source.readInt();
public static final Parcelable.Creator |
| Solution content |
|---|
public static final Parcelable.Creator |
| File |
|---|
| SubInfoRecord.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
int mcc = source.readInt();
int mnc = source.readInt();
<<<<<<< HEAD
return new SubInfoRecord(subId, iccId, slotId, displayName, nameSource, color, number,
displayNumberFormat, dataRoaming, iconRes, mcc, mnc);
=======
return new SubInfoRecord(mSubId, mIccId, mSlotId, mDisplayName, mNameSource, mColor, mNumber,
mDisplayNumberFormat, mDataRoaming, iconRes);
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
@Override |
| Solution content |
|---|
int mcc = source.readInt();
int mnc = source.readInt();
return new SubInfoRecord(subId, iccId, slotId, displayName, nameSource, color, number,
displayNumberFormat, dataRoaming, iconRes, mcc, mnc);
}
@Override |
| File |
|---|
| SubInfoRecord.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
dest.writeLong(subId);
dest.writeString(iccId);
dest.writeInt(slotId);
dest.writeString(displayName);
dest.writeInt(nameSource);
dest.writeInt(color);
dest.writeString(number);
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(displayNumberFormat);
dest.writeInt(dataRoaming);
dest.writeIntArray(simIconRes);
dest.writeInt(mcc);
dest.writeInt(mnc);
=======
dest.writeLong(mSubId);
dest.writeString(mIccId);
dest.writeInt(mSlotId);
dest.writeString(mDisplayName);
dest.writeInt(mNameSource);
dest.writeInt(mColor);
dest.writeString(mNumber);
dest.writeInt(mDisplayNumberFormat);
dest.writeInt(mDataRoaming);
dest.writeIntArray(mSimIconRes);
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
@Override |
| Solution content |
|---|
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(subId);
dest.writeString(iccId);
dest.writeInt(slotId);
dest.writeString(displayName);
dest.writeInt(nameSource);
dest.writeInt(color);
dest.writeString(number);
dest.writeInt(displayNumberFormat);
dest.writeInt(dataRoaming);
dest.writeIntArray(simIconRes);
dest.writeInt(mcc);
dest.writeInt(mnc);
}
@Override |
| File |
|---|
| SubInfoRecord.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public String toString() {
<<<<<<< HEAD
return "{mSubId=" + subId + ", mIccId=" + iccId + " mSlotId=" + slotId
+ " mDisplayName=" + displayName + " mNameSource=" + nameSource
+ " mColor=" + color + " mNumber=" + number
+ " mDisplayNumberFormat=" + displayNumberFormat + " mDataRoaming=" + dataRoaming
+ " mSimIconRes=" + simIconRes + " mMcc " + mcc + " mMnc " + mnc + "}";
=======
return "{mSubId=" + mSubId + ", mIccId=" + mIccId + " mSlotId=" + mSlotId
+ " mDisplayName=" + mDisplayName + " mNameSource=" + mNameSource
+ " mColor=" + mColor + " mNumber=" + mNumber
+ " mDisplayNumberFormat=" + mDisplayNumberFormat + " mDataRoaming=" + mDataRoaming
+ " mSimIconRes=" + mSimIconRes + "}";
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
} |
| Solution content |
|---|
@Override
public String toString() {
return "{mSubId=" + subId + ", mIccId=" + iccId + " mSlotId=" + slotId
+ " mDisplayName=" + displayName + " mNameSource=" + nameSource
+ " mColor=" + color + " mNumber=" + number
+ " mDisplayNumberFormat=" + displayNumberFormat + " mDataRoaming=" + dataRoaming
+ " mSimIconRes=" + simIconRes + " mMcc " + mcc + " mMnc " + mnc + "}";
}
} |
| File |
|---|
| SubInfoRecord.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
package android.telephony; <<<<<<< HEAD import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; ======= import static android.Manifest.permission.READ_PHONE_STATE; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.app.ActivityManagerNative; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; >>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9 import android.content.Intent; import android.net.Uri; import android.provider.BaseColumns; |
| Solution content |
|---|
package android.telephony; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.content.Intent; import android.net.Uri; import android.provider.BaseColumns; |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private static final boolean DBG = true;
private static final boolean VDBG = false;
<<<<<<< HEAD
/** An invalid phone identifier */
/** @hide - to be unhidden */
public static final int INVALID_PHONE_ID = -1000;
/** Indicates the caller wants the default phone id. */
/** @hide - to be unhidden */
public static final int DEFAULT_PHONE_ID = Integer.MAX_VALUE;
/** An invalid slot identifier */
/** @hide - to be unhidden */
public static final int INVALID_SLOT_ID = -1000;
/** Indicates the caller wants the default slot id. */
/** @hide */
public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE;
/** Indicates the user should be asked which sub to use. */
/** @hide */
public static final long ASK_USER_SUB_ID = -1001;
=======
// An invalid phone identifier
public static final int INVALID_PHONE_ID = -1000;
// Indicates the caller wants the default phone id.
public static final int DEFAULT_PHONE_ID = Integer.MAX_VALUE;
// An invalid slot identifier
public static final int INVALID_SLOT_ID = -1000;
// Indicates the caller wants the default slot id.
public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE;
// An invalid subscription identifier
public static final long INVALID_SUB_ID = -1000;
// Indicates the user should be asked which sub to use.
public static final long ASK_USER_SUB_ID = -1001;
// Indicates the caller wants the default sub id.
public static final long DEFAULT_SUB_ID = Long.MAX_VALUE;
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
/** An invalid subscription identifier */
public static final long INVALID_SUB_ID = -1000; |
| Solution content |
|---|
private static final boolean DBG = true;
private static final boolean VDBG = false;
/** An invalid phone identifier */
/** @hide - to be unhidden */
public static final int INVALID_PHONE_ID = -1000;
/** Indicates the caller wants the default phone id. */
/** @hide - to be unhidden */
public static final int DEFAULT_PHONE_ID = Integer.MAX_VALUE;
/** An invalid slot identifier */
/** @hide - to be unhidden */
public static final int INVALID_SLOT_ID = -1000;
/** Indicates the caller wants the default slot id. */
/** @hide */
public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE;
/** Indicates the user should be asked which sub to use. */
/** @hide */
public static final long ASK_USER_SUB_ID = -1001;
/** An invalid subscription identifier */
public static final long INVALID_SUB_ID = -1000; |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/** @hide */
public static final String DISPLAY_NUMBER_FORMAT = "display_number_format";
<<<<<<< HEAD
/** @hide */
=======
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static final int DISPLAY_NUMBER_NONE = 0;
/** @hide */ |
| Solution content |
|---|
/** @hide */
public static final String DISPLAY_NUMBER_FORMAT = "display_number_format";
/** @hide */
public static final int DISPLAY_NUMBER_NONE = 0;
/** @hide */ |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public static final String SUB_DEFAULT_CHANGED_ACTION =
"android.intent.action.SUB_DEFAULT_CHANGED";
<<<<<<< HEAD
/** @hide */
=======
/**
* Broadcast Action: The user has changed one of the default subs related to
* data, phone calls, or sms
*
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String SUB_DEFAULT_CHANGED_ACTION =
"android.intent.action.SUB_DEFAULT_CHANGED";
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public SubscriptionManager() {
logd("SubscriptionManager created");
} |
| Solution content |
|---|
public static final String SUB_DEFAULT_CHANGED_ACTION =
"android.intent.action.SUB_DEFAULT_CHANGED";
/** @hide */
public SubscriptionManager() {
if (DBG) logd("SubscriptionManager created");
} |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* @return SubInfoRecord, maybe null
* @hide - to be unhidden
*/
<<<<<<< HEAD
public static SubInfoRecord getSubInfoForSubscriber(long subId) {
if (!isValidSubId(subId)) {
logd("[getSubInfoForSubscriberx]- invalid subId");
=======
public static SubInfoRecord getSubInfoUsingSubId(Context context, long subId) {
if (!isValidSubId(subId)) {
logd("[getSubInfoUsingSubIdx]- invalid subId");
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
return null;
}
|
| Solution content |
|---|
* @return SubInfoRecord, maybe null
* @hide - to be unhidden
*/
public static SubInfoRecord getSubInfoForSubscriber(long subId) {
if (!isValidSubId(subId)) {
logd("[getSubInfoForSubscriberx]- invalid subId");
return null;
}
|
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
* @return SubInfoRecord list, maybe empty but not null
* @hide - to be unhidden
*/
<<<<<<< HEAD
public static List |
| Solution content |
|---|
* @return SubInfoRecord list, maybe empty but not null
* @hide - to be unhidden
*/
public static List |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* @return Array list of currently inserted SubInfoRecord(s) maybe empty but not null
* @hide - to be unhidden
*/
<<<<<<< HEAD
public static List |
| Solution content |
|---|
* @return Array list of currently inserted SubInfoRecord(s) maybe empty but not null
* @hide - to be unhidden
*/
public static List |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Get the count of active SUB(s)
* @return active SIM count
* @hide
*/
public static int getActiveSubInfoCount() {
=======
* Get the count of activated SUB(s)
* @param context Context provided by caller
* @return activated SIM count
*/
public static int getActivatedSubInfoCount(Context context) {
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
int result = 0;
try { |
| Solution content |
|---|
}
/**
* Get the count of active SUB(s)
* @return active SIM count
* @hide
*/
public static int getActiveSubInfoCount() {
int result = 0;
try { |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
<<<<<<< HEAD
result = iSub.getActiveSubInfoCount();
=======
result = iSub.getActivatedSubInfoCount();
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
} catch (RemoteException ex) {
// ignore it |
| Solution content |
|---|
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
result = iSub.getActiveSubInfoCount();
}
} catch (RemoteException ex) {
// ignore it |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* @return the number of records updated or -1 if invalid subId
* @hide
*/
<<<<<<< HEAD
public static int setDisplayName(String displayName, long subId, long nameSource) {
if (VDBG) {
logd("[setDisplayName]+ displayName:" + displayName + " subId:" + subId
+ " nameSource:" + nameSource);
}
=======
public static int setDisplayName(Context context, String displayName, long subId, long nameSource) {
if (VDBG) logd("[setDisplayName]+ displayName:" + displayName + " subId:" + subId + " nameSource:" + nameSource);
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
if (!isValidSubId(subId)) {
logd("[setDisplayName]- fail");
return -1; |
| Solution content |
|---|
* @return the number of records updated or -1 if invalid subId
* @hide
*/
public static int setDisplayName(String displayName, long subId, long nameSource) {
if (VDBG) {
logd("[setDisplayName]+ displayName:" + displayName + " subId:" + subId
+ " nameSource:" + nameSource);
}
if (!isValidSubId(subId)) {
logd("[setDisplayName]- fail");
return -1; |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
* @return the number of records updated
* @hide
*/
<<<<<<< HEAD
public static int setDisplayNumber(String number, long subId) {
=======
public static int setDisplayNumber(Context context, String number, long subId) {
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
if (number == null || !isValidSubId(subId)) {
logd("[setDisplayNumber]- fail");
return -1; |
| Solution content |
|---|
* @return the number of records updated
* @hide
*/
public static int setDisplayNumber(String number, long subId) {
if (number == null || !isValidSubId(subId)) {
logd("[setDisplayNumber]- fail");
return -1; |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
/** @hide */
public static SubInfoRecord getDefaultVoiceSubInfo() {
return getSubInfoForSubscriber(getDefaultVoiceSubId());
}
/** @hide */
=======
public static SubInfoRecord getDefaultVoiceSubInfo(Context context) {
return getSubInfoUsingSubId(context, getDefaultVoiceSubId());
}
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static int getDefaultVoicePhoneId() {
return getPhoneId(getDefaultVoiceSubId());
} |
| Solution content |
|---|
}
}
/** @hide */
public static SubInfoRecord getDefaultVoiceSubInfo() {
return getSubInfoForSubscriber(getDefaultVoiceSubId());
}
/** @hide */
public static int getDefaultVoicePhoneId() {
return getPhoneId(getDefaultVoiceSubId());
} |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
return getPhoneId(getDefaultVoiceSubId());
}
<<<<<<< HEAD
/**
* @return subId of the DefaultSms subscription or the value INVALID_SUB_ID if an error.
* @hide - to be unhidden
*/
=======
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static long getDefaultSmsSubId() {
long subId = INVALID_SUB_ID;
|
| Solution content |
|---|
return getPhoneId(getDefaultVoiceSubId());
}
/**
* @return subId of the DefaultSms subscription or the value INVALID_SUB_ID if an error.
* @hide - to be unhidden
*/
public static long getDefaultSmsSubId() {
long subId = INVALID_SUB_ID;
|
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
} catch (RemoteException ex) {
// ignore it
<<<<<<< HEAD
=======
if (VDBG) logd("getDefaultSmsSubId, sub id = " + subId);
return subId;
}
public static void setDefaultSmsSubId(long subId) {
if (VDBG) logd("setDefaultSmsSubId sub id = " + subId);
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.setDefaultSmsSubId(subId);
}
} catch (RemoteException ex) {
// ignore it
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
if (VDBG) logd("getDefaultSmsSubId, sub id = " + subId); |
| Solution content |
|---|
}
} catch (RemoteException ex) {
// ignore it
}
if (VDBG) logd("getDefaultSmsSubId, sub id = " + subId);
return subId;
}
/** @hide */
public static void setDefaultSmsSubId(long subId) {
if (VDBG) logd("setDefaultSmsSubId sub id = " + subId);
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.setDefaultSmsSubId(subId);
}
} catch (RemoteException ex) {
// ignore it
}
}
/** @hide */
public static SubInfoRecord getDefaultSmsSubInfo() {
return getSubInfoForSubscriber(getDefaultSmsSubId());
}
/** @hide */
public static int getDefaultSmsPhoneId() {
return getPhoneId(getDefaultSmsSubId());
}
/** @hide */
public static long getDefaultDataSubId() {
long subId = INVALID_SUB_ID;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
subId = iSub.getDefaultDataSubId();
}
} catch (RemoteException ex) {
// ignore it
}
if (VDBG) logd("getDefaultDataSubId, sub id = " + subId);
return subId;
}
/** @hide */
public static void setDefaultDataSubId(long subId) {
if (VDBG) logd("setDataSubscription sub id = " + subId);
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.setDefaultDataSubId(subId);
}
} catch (RemoteException ex) {
// ignore it
}
}
/** @hide */
public static SubInfoRecord getDefaultDataSubInfo() {
return getSubInfoForSubscriber(getDefaultDataSubId());
}
/** @hide */
public static int getDefaultDataPhoneId() {
return getPhoneId(getDefaultDataSubId());
}
/** @hide */
public static void clearSubInfo() {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.clearSubInfo();
}
} catch (RemoteException ex) {
// ignore it
}
return;
}
//FIXME this is vulnerable to race conditions
/** @hide */
public static boolean allDefaultsSelected() {
if (getDefaultDataSubId() == INVALID_SUB_ID) {
return false;
}
if (getDefaultSmsSubId() == INVALID_SUB_ID) {
return false;
}
if (getDefaultVoiceSubId() == INVALID_SUB_ID) {
return false;
}
return true;
}
/**
* If a default is set to subscription which is not active, this will reset that default back to
* INVALID_SUB_ID.
* @hide
*/
public static void clearDefaultsForInactiveSubIds() {
if (VDBG) logd("clearDefaultsForInactiveSubIds");
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.clearDefaultsForInactiveSubIds();
}
} catch (RemoteException ex) {
// ignore it
}
}
/**
* @return true if a valid subId else false
* @hide - to be unhidden
*/
public static boolean isValidSubId(long subId) {
return subId > INVALID_SUB_ID ;
}
/** @hide */
public static boolean isValidSlotId(int slotId) {
// We are testing INVALID_SLOT_ID and slotId >= 0 independently because we should
// not assume that INVALID_SLOT_ID will always be a negative value. Any negative
// value is invalid.
return slotId != INVALID_SLOT_ID && slotId >= 0 &&
slotId < TelephonyManager.getDefault().getSimCount();
}
/** @hide */
public static boolean isValidPhoneId(int phoneId) {
// We are testing INVALID_PHONE_ID and phoneId >= 0 independently because we should
// not assume that INVALID_PHONE_ID will always be a negative value. Any negative
// value is invalid.
return phoneId != INVALID_PHONE_ID && phoneId >= 0 &&
phoneId < TelephonyManager.getDefault().getPhoneCount();
}
/** @hide */
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
long[] subIds = SubscriptionManager.getSubId(phoneId);
if (subIds != null && subIds.length > 0) {
putPhoneIdAndSubIdExtra(intent, phoneId, subIds[0]);
} else {
logd("putPhoneIdAndSubIdExtra: no valid subs");
}
}
/** @hide */
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId, long subId) {
if (VDBG) logd("putPhoneIdAndSubIdExtra: phoneId=" + phoneId + " subId=" + subId);
intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
intent.putExtra(PhoneConstants.PHONE_KEY, phoneId);
//FIXME this is using phoneId and slotId interchangeably
//Eventually, this should be removed as it is not the slot id
intent.putExtra(PhoneConstants.SLOT_KEY, phoneId);
}
/**
* @return the list of subId's that are active,
* is never null but the length maybe 0.
* @hide
*/
public static long[] getActiveSubIdList() {
long[] subId = null;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
subId = iSub.getActiveSubIdList();
}
} catch (RemoteException ex) {
// ignore it
}
if (subId == null) {
subId = new long[0];
}
return subId;
}
}
|
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Catch clause |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Return statement |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return subId;
}
<<<<<<< HEAD
/** @hide */
public static void setDefaultSmsSubId(long subId) {
if (VDBG) logd("setDefaultSmsSubId sub id = " + subId);
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.setDefaultSmsSubId(subId);
}
} catch (RemoteException ex) {
// ignore it
}
}
/** @hide */
public static SubInfoRecord getDefaultSmsSubInfo() {
return getSubInfoForSubscriber(getDefaultSmsSubId());
}
/** @hide */
=======
public static SubInfoRecord getDefaultSmsSubInfo(Context context) {
return getSubInfoUsingSubId(context, getDefaultSmsSubId());
}
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static int getDefaultSmsPhoneId() {
return getPhoneId(getDefaultSmsSubId());
} |
| Solution content |
|---|
/** @hide */
public static void setDefaultSmsSubId(long subId) {
if (VDBG) logd("setDefaultSmsSubId sub id = " + subId);
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
iSub.setDefaultSmsSubId(subId);
}
} catch (RemoteException ex) {
// ignore it
}
}
/** @hide */
public static SubInfoRecord getDefaultSmsSubInfo() {
return getSubInfoForSubscriber(getDefaultSmsSubId());
}
/** @hide */
public static int getDefaultSmsPhoneId() {
return getPhoneId(getDefaultSmsSubId());
} |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
/** @hide */
public static SubInfoRecord getDefaultDataSubInfo() {
return getSubInfoForSubscriber(getDefaultDataSubId());
}
/** @hide */
=======
public static SubInfoRecord getDefaultDataSubInfo(Context context) {
return getSubInfoUsingSubId(context, getDefaultDataSubId());
}
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static int getDefaultDataPhoneId() {
return getPhoneId(getDefaultDataSubId());
} |
| Solution content |
|---|
}
}
/** @hide */
public static SubInfoRecord getDefaultDataSubInfo() {
return getSubInfoForSubscriber(getDefaultDataSubId());
}
/** @hide */
public static int getDefaultDataPhoneId() {
return getPhoneId(getDefaultDataSubId());
} |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
return getPhoneId(getDefaultDataSubId());
}
<<<<<<< HEAD
/** @hide */
=======
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static void clearSubInfo() {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); |
| Solution content |
|---|
return getPhoneId(getDefaultDataSubId());
}
/** @hide */
public static void clearSubInfo() {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
}
//FIXME this is vulnerable to race conditions
<<<<<<< HEAD
/** @hide */
=======
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static boolean allDefaultsSelected() {
if (getDefaultDataSubId() == INVALID_SUB_ID) {
return false; |
| Solution content |
|---|
}
//FIXME this is vulnerable to race conditions
/** @hide */
public static boolean allDefaultsSelected() {
if (getDefaultDataSubId() == INVALID_SUB_ID) {
return false; |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* If a default is set to subscription which is not active, this will reset that default back to
* INVALID_SUB_ID.
<<<<<<< HEAD
* @hide
=======
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
*/
public static void clearDefaultsForInactiveSubIds() {
if (VDBG) logd("clearDefaultsForInactiveSubIds"); |
| Solution content |
|---|
/**
* If a default is set to subscription which is not active, this will reset that default back to
* INVALID_SUB_ID.
* @hide
*/
public static void clearDefaultsForInactiveSubIds() {
if (VDBG) logd("clearDefaultsForInactiveSubIds"); |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
public static boolean isValidSubId(long subId) {
return subId > INVALID_SUB_ID ;
}
}
}
<<<<<<< HEAD
/**
* @return true if a valid subId else false
* @hide - to be unhidden
*/
======= |
| Solution content |
|---|
}
}
/**
* @return true if a valid subId else false
* @hide - to be unhidden
*/
public static boolean isValidSubId(long subId) {
return subId > INVALID_SUB_ID ;
} |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
return subId > INVALID_SUB_ID ;
}
<<<<<<< HEAD
/** @hide */
public static boolean isValidSlotId(int slotId) {
// We are testing INVALID_SLOT_ID and slotId >= 0 independently because we should
// not assume that INVALID_SLOT_ID will always be a negative value. Any negative
// value is invalid.
return slotId != INVALID_SLOT_ID && slotId >= 0 &&
slotId < TelephonyManager.getDefault().getSimCount();
}
/** @hide */
public static boolean isValidPhoneId(int phoneId) {
// We are testing INVALID_PHONE_ID and phoneId >= 0 independently because we should
// not assume that INVALID_PHONE_ID will always be a negative value. Any negative
// value is invalid.
return phoneId != INVALID_PHONE_ID && phoneId >= 0 &&
phoneId < TelephonyManager.getDefault().getPhoneCount();
}
/** @hide */
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
=======
public static boolean isValidSlotId(int slotId) {
return slotId > INVALID_SLOT_ID && slotId < TelephonyManager.getDefault().getSimCount();
}
public static boolean isValidPhoneId(int phoneId) {
//FIXME also check it is < num phones
return phoneId > INVALID_PHONE_ID
&& phoneId < TelephonyManager.getDefault().getPhoneCount();
}
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
//FIXME this is using phoneId and slotId interchangeably
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
long[] subIds = SubscriptionManager.getSubId(phoneId);
if (subIds != null && subIds.length > 0) {
putPhoneIdAndSubIdExtra(intent, phoneId, subIds[0]); |
| Solution content |
|---|
return subId > INVALID_SUB_ID ;
}
/** @hide */
public static boolean isValidSlotId(int slotId) {
// We are testing INVALID_SLOT_ID and slotId >= 0 independently because we should
// not assume that INVALID_SLOT_ID will always be a negative value. Any negative
// value is invalid.
return slotId != INVALID_SLOT_ID && slotId >= 0 &&
slotId < TelephonyManager.getDefault().getSimCount();
}
/** @hide */
public static boolean isValidPhoneId(int phoneId) {
// We are testing INVALID_PHONE_ID and phoneId >= 0 independently because we should
// not assume that INVALID_PHONE_ID will always be a negative value. Any negative
// value is invalid.
return phoneId != INVALID_PHONE_ID && phoneId >= 0 &&
phoneId < TelephonyManager.getDefault().getPhoneCount();
}
/** @hide */
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
long[] subIds = SubscriptionManager.getSubId(phoneId);
if (subIds != null && subIds.length > 0) {
putPhoneIdAndSubIdExtra(intent, phoneId, subIds[0]); |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* @return the list of subId's that are active,
* is never null but the length maybe 0.
* @hide
*/
public static long[] getActiveSubIdList() {
=======
* @return the list of subId's that are activated,
* is never null but the length maybe 0.
*/
public static long[] getActivatedSubIdList() {
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
long[] subId = null;
try { |
| Solution content |
|---|
}
/**
* @return the list of subId's that are active,
* is never null but the length maybe 0.
* @hide
*/
public static long[] getActiveSubIdList() {
long[] subId = null;
try { |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
<<<<<<< HEAD
subId = iSub.getActiveSubIdList();
=======
subId = iSub.getActivatedSubIdList();
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
} catch (RemoteException ex) {
// ignore it |
| Solution content |
|---|
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
subId = iSub.getActiveSubIdList();
}
} catch (RemoteException ex) {
// ignore it |
| File |
|---|
| SubscriptionManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
}
<<<<<<< HEAD
private ITelecomService getTelecomService() {
return ITelecomService.Stub.asInterface(ServiceManager.getService(Context.TELECOM_SERVICE));
=======
/**
* @hide
*/
private ITelecommService getTelecommService() {
return ITelecommService.Stub.asInterface(ServiceManager.getService(TELECOMM_SERVICE_NAME));
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
}
// |
| Solution content |
|---|
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
}
private ITelecomService getTelecomService() {
return ITelecomService.Stub.asInterface(ServiceManager.getService(Context.TELECOM_SERVICE));
}
// |
| File |
|---|
| TelephonyManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/
/**
* To notify the capability switch procedure end
*/
public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
= "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED";
<<<<<<< HEAD
=======
/**
* To notify the capability switch procedure start
*/
// FIXME maybe these should be removed - sprout only
public static final String ACTION_CAPABILITY_SWITCH_START
= "com.android.phone.ACTION_CAPABILITY_SWITCH_START";
// FIXME maybe these should be removed - sprout only
public static final String ACTION_CAPABILITY_SWITCH_DONE
= "com.android.phone.ACTION_CAPABILITY_SWITCH_DONE";
>>>>>>> 0ebaf88934c748d9c93487f7ecfc1dcbf541b9a9
} |
| Solution content |
|---|
*/
public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
= "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED";
} |
| File |
|---|
| TelephonyIntents.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |