diff options
| author | 2019-12-11 19:13:39 +0000 | |
|---|---|---|
| committer | 2019-12-11 19:13:39 +0000 | |
| commit | ce7d2e8fe3404c02de3db3d2280176a139a97d70 (patch) | |
| tree | 1c21a95059d6602d5fd0f41ca9a0916c99438b40 | |
| parent | 79c83587c3674035484d76c7b001230ec40fec56 (diff) | |
| parent | be15dbaee553cc4004db4ef65807efd1d1e8bf22 (diff) | |
Merge "Remove hidden API usage: CallQuality no-argument constructor."
| -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 423061879a64..8be9da248e54 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); + } } |