diff options
| author | 2019-12-10 10:54:50 -0800 | |
|---|---|---|
| committer | 2019-12-10 15:17:22 -0800 | |
| commit | be15dbaee553cc4004db4ef65807efd1d1e8bf22 (patch) | |
| tree | d32414804fa2f251c9cc6d1645f0bcfe6f636217 | |
| parent | 87630910190dee7ad03750130e35170fe564655c (diff) | |
Remove hidden API usage: CallQuality no-argument constructor.
Bug: 140908357
Test: make
Change-Id: I4ad0aec7db8d588e8260479bdf4039a025903320
| -rw-r--r-- | services/core/java/com/android/server/TelephonyRegistry.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index 226a363badba..a576fb2eca4f 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -449,9 +449,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mOtaspMode[i] = TelephonyManager.OTASP_UNKNOWN; mCallDisconnectCause[i] = DisconnectCause.NOT_VALID; mCallPreciseDisconnectCause[i] = PreciseDisconnectCause.NOT_VALID; - mCallQuality[i] = new CallQuality(); + mCallQuality[i] = createCallQuality(); mCallAttributes[i] = new CallAttributes(new PreciseCallState(), - TelephonyManager.NETWORK_TYPE_UNKNOWN, new CallQuality()); + TelephonyManager.NETWORK_TYPE_UNKNOWN, createCallQuality()); mCallNetworkType[i] = TelephonyManager.NETWORK_TYPE_UNKNOWN; mPreciseCallState[i] = new PreciseCallState(); mRingingCallState[i] = PreciseCallState.PRECISE_CALL_STATE_IDLE; @@ -546,9 +546,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mOtaspMode[i] = TelephonyManager.OTASP_UNKNOWN; mCallDisconnectCause[i] = DisconnectCause.NOT_VALID; mCallPreciseDisconnectCause[i] = PreciseDisconnectCause.NOT_VALID; - mCallQuality[i] = new CallQuality(); + mCallQuality[i] = createCallQuality(); mCallAttributes[i] = new CallAttributes(new PreciseCallState(), - TelephonyManager.NETWORK_TYPE_UNKNOWN, new CallQuality()); + TelephonyManager.NETWORK_TYPE_UNKNOWN, createCallQuality()); mCallNetworkType[i] = TelephonyManager.NETWORK_TYPE_UNKNOWN; mPreciseCallState[i] = new PreciseCallState(); mRingingCallState[i] = PreciseCallState.PRECISE_CALL_STATE_IDLE; @@ -1743,7 +1743,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { if (mPreciseCallState[phoneId].getForegroundCallState() != PreciseCallState.PRECISE_CALL_STATE_ACTIVE) { mCallNetworkType[phoneId] = TelephonyManager.NETWORK_TYPE_UNKNOWN; - mCallQuality[phoneId] = new CallQuality(); + mCallQuality[phoneId] = createCallQuality(); } mCallAttributes[phoneId] = new CallAttributes(mPreciseCallState[phoneId], mCallNetworkType[phoneId], mCallQuality[phoneId]); @@ -2757,4 +2757,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { return "UNKNOWN"; } } + + /** Returns a new CallQuality object with default values. */ + private static CallQuality createCallQuality() { + return new CallQuality(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + } } |