diff options
| author | 2019-01-22 16:17:35 -0800 | |
|---|---|---|
| committer | 2019-01-25 16:10:55 -0800 | |
| commit | eae57b26e604b94a1ebb0c12009e12806f2e5f9a (patch) | |
| tree | 63054d830fb4ca6566370f255a0a032da29cbc51 | |
| parent | bfd44b60ef7d7dbb1fb5dcd6d4cc109f929aaaa9 (diff) | |
CallQuality is set to empty instead of null
Bug: 110107501
Test: manual
Change-Id: Ifb289c1c61d7cf16a7c6b60b181b94cf759f75d8
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/TelephonyRegistry.java | 5 | ||||
| -rw-r--r-- | telephony/java/android/telephony/CallQuality.java | 4 | ||||
| -rw-r--r-- | telephony/java/android/telephony/PhoneStateListener.java | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 6d2473673051..ebc7a9b8cd83 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5874,7 +5874,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 122112b7a7d4..41d8d9c0548a 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 } |