diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-08-15 04:26:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-14 16:46:52 +0000 |
commit | 82d6d337b389ef088879a5e527d44c75c41c5b44 (patch) | |
tree | f8ec3f4a58e5b3fb1d11d0bb8cb143106b857fdf /core | |
parent | a3dabf0ffcad703260f0c93015443921d80f3136 (diff) | |
parent | 9da2f1e007268a42248a1778aa9b560e3ce3b704 (diff) | |
download | frameworks_base-82d6d337b389ef088879a5e527d44c75c41c5b44.zip frameworks_base-82d6d337b389ef088879a5e527d44c75c41c5b44.tar.gz frameworks_base-82d6d337b389ef088879a5e527d44c75c41c5b44.tar.bz2 |
Merge "Some networks may have null ifaces, I guess?" into lmp-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/net/LinkProperties.java | 3 | ||||
-rw-r--r-- | core/java/com/android/internal/os/BatteryStatsImpl.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index 47b74ab..6160bc2 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -17,6 +17,7 @@ package android.net; import android.annotation.NonNull; +import android.annotation.Nullable; import android.net.ProxyInfo; import android.os.Parcelable; import android.os.Parcel; @@ -124,7 +125,7 @@ public final class LinkProperties implements Parcelable { * * @return The interface name set for this link or {@code null}. */ - public String getInterfaceName() { + public @Nullable String getInterfaceName() { return mIfaceName; } diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java index ee0d14b..a745b20 100644 --- a/core/java/com/android/internal/os/BatteryStatsImpl.java +++ b/core/java/com/android/internal/os/BatteryStatsImpl.java @@ -45,6 +45,7 @@ import android.telephony.DataConnectionRealTimeInfo; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.TelephonyManager; +import android.text.TextUtils; import android.util.ArrayMap; import android.util.Log; import android.util.LogWriter; @@ -3744,6 +3745,7 @@ public final class BatteryStatsImpl extends BatteryStats { } public void noteNetworkInterfaceTypeLocked(String iface, int networkType) { + if (TextUtils.isEmpty(iface)) return; if (ConnectivityManager.isNetworkTypeMobile(networkType)) { mMobileIfaces = includeInStringArray(mMobileIfaces, iface); if (DEBUG) Slog.d(TAG, "Note mobile iface " + iface + ": " + mMobileIfaces); |