summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jordan Liu <jminjie@google.com> 2019-01-28 21:55:14 -0800
committer android-build-merger <android-build-merger@google.com> 2019-01-28 21:55:14 -0800
commitb9f55143bc8e26bdeb2d8c877dfea1c42edbc17d (patch)
tree054c81fd60c4e9d5acb44a0d02056d4e1d9958ff
parentf366fade2e90cbec933c51de0ae99a788d5ace9c (diff)
parentbaa788a7aad0d286de561c1cd8e2825886d6ff22 (diff)
Merge "CallQuality is set to empty instead of null" am: b3f282daa1 am: aee66949ef
am: baa788a7aa Change-Id: Ic6c251059d763df6f79520a5cae259f4a44601cf
-rw-r--r--api/system-current.txt2
-rw-r--r--services/core/java/com/android/server/TelephonyRegistry.java5
-rw-r--r--telephony/java/android/telephony/CallQuality.java4
-rw-r--r--telephony/java/android/telephony/PhoneStateListener.java2
4 files changed, 9 insertions, 4 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index e0af359c999b..635f9423e5f5 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -7527,7 +7527,7 @@ package android.telephony {
}
public class PhoneStateListener {
- method public void onCallAttributesChanged(android.telephony.CallAttributes);
+ method public void onCallAttributesChanged(@NonNull android.telephony.CallAttributes);
method public void onCallDisconnectCauseChanged(int, int);
method public void onPreciseCallStateChanged(android.telephony.PreciseCallState);
method public void onPreciseDataConnectionStateChanged(android.telephony.PreciseDataConnectionState);
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index e5436178217d..10b126f17715 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -206,9 +206,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
private Map<Integer, List<EmergencyNumber>> mEmergencyNumberList;
- private CallQuality mCallQuality;
+ private CallQuality mCallQuality = new CallQuality();
- private CallAttributes mCallAttributes;
+ private CallAttributes mCallAttributes = new CallAttributes(new PreciseCallState(),
+ TelephonyManager.NETWORK_TYPE_UNKNOWN, new CallQuality());
private int[] mSrvccState;
diff --git a/telephony/java/android/telephony/CallQuality.java b/telephony/java/android/telephony/CallQuality.java
index b27f6b44370f..cbe622847130 100644
--- a/telephony/java/android/telephony/CallQuality.java
+++ b/telephony/java/android/telephony/CallQuality.java
@@ -92,6 +92,10 @@ public final class CallQuality implements Parcelable {
mCodecType = in.readInt();
}
+ /** @hide **/
+ public CallQuality() {
+ }
+
/**
* Constructor.
*
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 9fee5932dadc..af324debbd57 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -701,7 +701,7 @@ public class PhoneStateListener {
* @hide
*/
@SystemApi
- public void onCallAttributesChanged(CallAttributes callAttributes) {
+ public void onCallAttributesChanged(@NonNull CallAttributes callAttributes) {
// default implementation empty
}