From c119a863501cc21bfe4853ad46987a2021041e2b Mon Sep 17 00:00:00 2001 From: Eric Schwarzenbach Date: Thu, 22 Mar 2018 13:49:25 -0700 Subject: [PATCH] Change null behavior of getCellBandwidths Returns empty array instead of null when there are no cell bandwidths. Bug: 73751023 Test: make, runtest Change-Id: Idc3f034bbea8f6c3f11dcd125f760b121d2c91d9 --- telephony/java/android/telephony/ServiceState.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 9c831b9be0ddd..e971d08aae7a5 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -17,7 +17,6 @@ package android.telephony; import android.annotation.IntDef; -import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; import android.os.Bundle; @@ -496,9 +495,8 @@ public class ServiceState implements Parcelable { * * @return Current serving cell bandwidths */ - @Nullable public int[] getCellBandwidths() { - return mCellBandwidths; + return mCellBandwidths == null ? new int[0] : mCellBandwidths; } /**