| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
INetworkManagementService nmService = INetworkManagementService.Stub.asInterface(b);
mTethering = new Tethering(mContext, nmService, mHandler.getLooper());
mTetheringConfigValid = (((mNetTrackers[ConnectivityManager.TYPE_MOBILE_DUN] != null) ||
!mTethering.isDunRequired()) &&
(mTethering.getTetherableUsbRegexs().length != 0 ||
=======
mTethering = new Tethering(mContext, mHandler.getLooper());
mTetheringConfigValid = ((mTethering.getTetherableUsbRegexs().length != 0 ||
>>>>>>> 7a652bc86a5c7a2b201a48d5c1cfcc9af5d6624f
mTethering.getTetherableWifiRegexs().length != 0 ||
mTethering.getTetherableBluetoothRegexs().length != 0) &&
mTethering.getUpstreamIfaceTypes().length != 0); |
| Solution content |
|---|
}
}
IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
INetworkManagementService nmService = INetworkManagementService.Stub.asInterface(b);
mTethering = new Tethering(mContext, nmService, mHandler.getLooper());
mTetheringConfigValid = ((mTethering.getTetherableUsbRegexs().length != 0 ||
mTethering.getTetherableWifiRegexs().length != 0 ||
mTethering.getTetherableBluetoothRegexs().length != 0) &&
mTethering.getUpstreamIfaceTypes().length != 0); |
| File |
|---|
| ConnectivityService.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Array access |
| Attribute |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
String enableString = enableString(apnType);
if (enableString == null) return false;
try {
<<<<<<< HEAD
result = cm.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
(mDunRequired ? Phone.FEATURE_ENABLE_DUN_ALWAYS :
Phone.FEATURE_ENABLE_HIPRI), new Binder());
=======
result = service.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
enableString, new Binder());
>>>>>>> 7a652bc86a5c7a2b201a48d5c1cfcc9af5d6624f
} catch (Exception e) {
}
switch (result) { |
| Solution content |
|---|
String enableString = enableString(apnType);
if (enableString == null) return false;
try {
result = cm.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
enableString, new Binder());
} catch (Exception e) {
}
switch (result) { |
| File |
|---|
| Tethering.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
IConnectivityManager cm = IConnectivityManager.Stub.asInterface(b);
try {
<<<<<<< HEAD
cm.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
(mDunRequired? Phone.FEATURE_ENABLE_DUN_ALWAYS :
Phone.FEATURE_ENABLE_HIPRI));
=======
service.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
enableString(mMobileApnReserved));
>>>>>>> 7a652bc86a5c7a2b201a48d5c1cfcc9af5d6624f
} catch (Exception e) {
return false;
} |
| Solution content |
|---|
IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
IConnectivityManager cm = IConnectivityManager.Stub.asInterface(b);
try {
cm.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
enableString(mMobileApnReserved));
} catch (Exception e) {
return false;
} |
| File |
|---|
| Tethering.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
int upType = ConnectivityManager.TYPE_NONE;
String iface = null;
<<<<<<< HEAD
try {
LinkProperties defaultProp = cm.getActiveLinkProperties();
if (defaultProp != null) {
String iface = defaultProp.getInterfaceName();
for(String regex : mUpstreamIfaceRegexs) {
if (iface.matches(regex)) return iface;
}
}
} catch (RemoteException e) { }
String[] ifaces = new String[0];
try {
ifaces = mNMService.listInterfaces();
} catch (Exception e) {
Log.e(TAG, "Error listing Interfaces", e);
return null;
}
for (String regex : mUpstreamIfaceRegexs) {
for (String iface : ifaces) {
if (iface.matches(regex)) {
// verify it is active
InterfaceConfiguration ifcg = null;
try {
ifcg = mNMService.getInterfaceConfig(iface);
if (ifcg.isActive()) {
return iface;
}
} catch (Exception e) {
Log.e(TAG, "Error getting iface config", e);
// ignore - try next
continue;
}
}
=======
for (Integer netType : mUpstreamIfaceTypes) {
NetworkInfo info = null;
try {
info = cm.getNetworkInfo(netType.intValue());
} catch (RemoteException e) { }
if ((info != null) && info.isConnected()) {
upType = netType.intValue();
break;
>>>>>>> 7a652bc86a5c7a2b201a48d5c1cfcc9af5d6624f
}
}
|
| Solution content |
|---|
int upType = ConnectivityManager.TYPE_NONE;
String iface = null;
for (Integer netType : mUpstreamIfaceTypes) {
NetworkInfo info = null;
try {
info = cm.getNetworkInfo(netType.intValue());
} catch (RemoteException e) { }
if ((info != null) && info.isConnected()) {
upType = netType.intValue();
break;
}
}
|
| File |
|---|
| Tethering.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Break statement |
| For statement |
| If statement |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Log.d(TAG, "chooseUpstreamType(" + tryCell + "), preferredApn ="
+ mPreferredUpstreamMobileApn + ", got type=" + upType);
}
<<<<<<< HEAD
if (iface != null) {
try {
if (mDunRequired) {
// check if Dun is on - we can use that
NetworkInfo info = cm.getNetworkInfo(
ConnectivityManager.TYPE_MOBILE_DUN);
if (info.isConnected()) {
if (DEBUG) Log.d(TAG, "setting dun ifacename =" + iface);
// even if we're already connected - it may be somebody else's
// refcount, so add our own
turnOnMobileConnection();
} else {
// verify the iface is not the default mobile - can't use that!
info = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
if (info.isConnected()) {
iface = null; // can't accept this one
}
}
} else {
if (DEBUG) Log.d(TAG, "checking if hipri brought us this connection");
NetworkInfo info = cm.getNetworkInfo(
ConnectivityManager.TYPE_MOBILE_HIPRI);
if (info.isConnected()) {
if (DEBUG) Log.d(TAG, "yes - hipri in use");
// even if we're already connected - it may be sombody else's
// refcount, so add our own
turnOnMobileConnection();
}
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling ConnectivityManager", e);
iface = null;
}
=======
// if we're on DUN, put our own grab on it
if (upType == ConnectivityManager.TYPE_MOBILE_DUN ||
upType == ConnectivityManager.TYPE_MOBILE_HIPRI) {
turnOnUpstreamMobileConnection(upType);
>>>>>>> 7a652bc86a5c7a2b201a48d5c1cfcc9af5d6624f
}
if (upType == ConnectivityManager.TYPE_NONE) { |
| Solution content |
|---|
Log.d(TAG, "chooseUpstreamType(" + tryCell + "), preferredApn ="
+ mPreferredUpstreamMobileApn + ", got type=" + upType);
}
// if we're on DUN, put our own grab on it
if (upType == ConnectivityManager.TYPE_MOBILE_DUN ||
upType == ConnectivityManager.TYPE_MOBILE_HIPRI) {
turnOnUpstreamMobileConnection(upType);
}
if (upType == ConnectivityManager.TYPE_NONE) { |
| File |
|---|
| Tethering.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Try statement |