summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Schwarzenbach <easchwar@google.com> 2018-03-22 13:49:25 -0700
committer Eric Schwarzenbach <easchwar@google.com> 2018-03-23 12:10:09 -0700
commit4e93e44115a9a9c86dff8bb88be35520df4a7659 (patch)
tree3b5e24dfde5ddc0e95ed97a384da9a2f925b3eb1
parent0715570648114f4c12134aaadf0877f6d3cf0397 (diff)
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 Merged-In: Idc3f034bbea8f6c3f11dcd125f760b121d2c91d9 (cherry picked from commit c119a863501cc21bfe4853ad46987a2021041e2b)
-rw-r--r--telephony/java/android/telephony/ServiceState.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index d2e7ae58073e..473fa5af319f 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.os.Bundle;
import android.os.Parcel;
@@ -495,9 +494,8 @@ public class ServiceState implements Parcelable {
*
* @return Current serving cell bandwidths
*/
- @Nullable
public int[] getCellBandwidths() {
- return mCellBandwidths;
+ return mCellBandwidths == null ? new int[0] : mCellBandwidths;
}
/**