Fix Wimax-less build.

A build with the wimax network type defined but wimax disabled
causes an NPE in ConnectivityService's constructor.

bug:5237167
Change-Id: I929eac217e1afa0e61346fdbc3e96a7d3ad09a54
This commit is contained in:
Robert Greenwalt
2011-11-10 16:55:20 -08:00
parent 5255f307fb
commit cafd8583a1

View File

@@ -514,7 +514,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
continue;
}
mCurrentLinkProperties[netType] = null;
if (mNetConfigs[netType].isDefault()) mNetTrackers[netType].reconnect();
if (mNetTrackers[netType] != null && mNetConfigs[netType].isDefault()) {
mNetTrackers[netType].reconnect();
}
}
IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);