OSDN Git Service

only set PhoneStateListener subId for sdk target >=Q
authorchen xu <fionaxu@google.com>
Fri, 3 May 2019 17:45:41 +0000 (10:45 -0700)
committerchen xu <fionaxu@google.com>
Fri, 3 May 2019 21:20:51 +0000 (14:20 -0700)
commit6b46264c963250eb0dfa11d5edbf66eaf68dfc2b
tree37108322546de9df70632300ecfaea88f5b445a5
parenta9ac86f67931232bf33765e2491f6bec2f0ef10d
only set PhoneStateListener subId for sdk target >=Q

subId from PhoneStateListener is deprecated from Q. And we should
only set subId for informational purpose for Q+ only.
Do not change the legacy behaviour for apps target on preQ SDK level

Bug: 131863032
Test: atest CtsTelephonyTestCases:PhoneStateListenerTest#testOnUnRegisterFollowedByRegister
Change-Id: Iff1758f9645e74690094207d92b5989553b27b25
telephony/java/android/telephony/TelephonyManager.java