resolved conflicts for merge of dec3dda8 to honeycomb-plus-aosp
Change-Id: If14c7fc51c4549524c2f39797a902093582bae6d
This commit is contained in:
@@ -540,11 +540,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
* active
|
* active
|
||||||
*/
|
*/
|
||||||
public NetworkInfo getActiveNetworkInfo() {
|
public NetworkInfo getActiveNetworkInfo() {
|
||||||
enforceAccessPermission();
|
return getNetworkInfo(mActiveDefaultNetwork);
|
||||||
if (mActiveDefaultNetwork != -1) {
|
|
||||||
return mNetTrackers[mActiveDefaultNetwork].getNetworkInfo();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NetworkInfo getNetworkInfo(int networkType) {
|
public NetworkInfo getNetworkInfo(int networkType) {
|
||||||
@@ -576,18 +572,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
* none is active
|
* none is active
|
||||||
*/
|
*/
|
||||||
public LinkProperties getActiveLinkProperties() {
|
public LinkProperties getActiveLinkProperties() {
|
||||||
enforceAccessPermission();
|
return getLinkProperties(mActiveDefaultNetwork);
|
||||||
for (int type=0; type <= ConnectivityManager.MAX_NETWORK_TYPE; type++) {
|
|
||||||
if (mNetConfigs[type] == null || !mNetConfigs[type].isDefault()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
NetworkStateTracker t = mNetTrackers[type];
|
|
||||||
NetworkInfo info = t.getNetworkInfo();
|
|
||||||
if (info.isConnected()) {
|
|
||||||
return t.getLinkProperties();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LinkProperties getLinkProperties(int networkType) {
|
public LinkProperties getLinkProperties(int networkType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user