From 0a0ba099ed89270a9346748ccfe2265def595e9e Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Thu, 15 Jul 2010 15:51:48 -0700 Subject: Fix Emulator boot. Catch a NPE that doesn't seem to happen on devices. Change-Id: I47d599afbed76798d8d312a59e30b89664363e93 --- core/java/android/net/MobileDataStateTracker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/java') diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index e74db67..f067392 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -205,8 +205,8 @@ public class MobileDataStateTracker implements NetworkStateTracker { setDetailedState(DetailedState.DISCONNECTED, reason, apnName); if (mNetworkProperties != null) { - NetworkUtils.resetConnections(mNetworkProperties.getInterface(). - getName()); + String iface = mNetworkProperties.getInterfaceName(); + if (iface != null) NetworkUtils.resetConnections(iface); } // TODO - check this // can't do this here - ConnectivityService needs it to clear stuff -- cgit v1.1