OSDN Git Service

Return copies for get methods
authorJack Yu <jackyu@google.com>
Tue, 16 Apr 2019 15:20:18 +0000 (08:20 -0700)
committerJack Yu <jackyu@google.com>
Fri, 19 Apr 2019 17:29:01 +0000 (10:29 -0700)
commitb79342f28897523665c5b6e3c5961ba1ef31eb49
tree7b4f70d201c707e4e40923824e37ee2e627da300
parentdc4d14b37a93ed9067dde0b9085d7f48847bfad6
Return copies for get methods

NetworkRegistrationInfo and ServiceState are not
immutable class. Their get methods should return a new
copy of object so the caller won't modify its state.

Bug: 130538118
Test: Unit tests + manual

Merged-In: I51662a92b0b6189a8c8aa017085affedac417190
Change-Id: I51662a92b0b6189a8c8aa017085affedac417190
(cherry picked from commit 37538594e68dea9a1965ffb8307b259d8cf3717b)
telephony/java/android/telephony/DataSpecificRegistrationInfo.java
telephony/java/android/telephony/NetworkRegistrationInfo.java
telephony/java/android/telephony/ServiceState.java
telephony/java/android/telephony/VoiceSpecificRegistrationInfo.java