Jack Yu [Tue, 23 May 2017 18:00:27 +0000 (11:00 -0700)]
Fixed file descriptor leak in telephony unit tests
The handler thread in SimulatedCommands was not closed after
each unit test run. Fixed by adding a dispose method to quit
the thread.
Also use quit() instead of quitSafely() for all thread quiting
because we don't care if the messages were dispatched or not
after the test. This can fix some messages sending to dead
threads non-harmful exceptions in the output debug messages.
Test: Telephony unit tests
bug: 29579544
Change-Id: I112e46b0147a1950046a35cd9ac2498560c6ee1b
Jack Yu [Thu, 11 May 2017 20:47:56 +0000 (13:47 -0700)]
Fixed that APN context stuck in SCANNING state
1. When data retry fails at trySetupData, we should apply
FAILED state to the APN context otherwise it will be
in SCANNING state forever since we are not going to
schedule for the next retry.
2. When we get a new network request in applyNewState,
if the APN is in SCANNING state, we should trySetupData
immediately instead of waiting for the next retry,
which might still minutes/hours away from now.
Jayachandran C [Fri, 5 May 2017 23:40:09 +0000 (16:40 -0700)]
Set isGsm flag based on currently camped voice and data RATs
Use currently camped RATs to determine isGsm the flag
instead of checking both phone type and camped RATs.
Test: Verified the signal bar for the following use cases
Idle:
- SRLTE (1x & LTE) mode
- hVoLTE mode
- 2G only, 3G preferred, LTE preferred
- Cellular and IWLAN registered
Voice calls:
- CS calls on 1x, GSM, UMTS for all possible voice, data RATs
- IMS calls on LTE and IWLAN for all possible voice, data RATs
Jayachandran C [Sun, 7 May 2017 19:55:51 +0000 (12:55 -0700)]
Set CDMA data roaming based on TSB58 roaming indicator if voice is not in service
Existing implementation:
1. CDMA voiceRoaming is set based on regState and roaming indicator.
2. CDMA dataRoaming is set based on regState only.
3. CDMA dataRoaming is overwritten with voiceRoaming if voice is
in service.
Issue:
If voice is not in service then the CDMA dataRoaming set based on
regState alone could be incorrect because it didn't use roaming
indicator from modem.
Fix:
This change sets CDMA dataRoaming based on TSB58 roaming indicator
(similar to setting voiceRoaming) if voice is not service.
Note: As per VoiceRegStateResult from radio types.hal the TSB58
roaming indicator shall be sent if device is registered on a
CDMA or EVDO system.
Test: Forced device to Evdo only and verified roaming state
Bug: 37917767
Change-Id: I3cc7fff61cea296afe17215a33b1b4c80972db13
Jayachandran C [Thu, 11 May 2017 18:40:28 +0000 (11:40 -0700)]
Map CODE_LOCAL_ENDED_BY_CONFERENCE_MERGE to NORMAL disconnect cause
This change also optimizes imports
Test: Following scenarios for VoLTE and CS call and
verified the cause sent in PreciseCallState.
1) Conference call merge
2) Conference call, one remote party ends the call
3) Conference call, all remote parties end the call
4) Conference call, hangup locally
5) Normal call and hangup locally
6) Normal call and remote party ends the call
Brad Ebinger [Wed, 10 May 2017 22:54:49 +0000 (15:54 -0700)]
Reset IMS Capabilities when IMS disconnects
When IMS deregisters, reset the IMS capabilities
to false so we do not accidently return the wrong
result for TelephonyManager.isVolteAvailable()
if the ImsService does not set the capabilities to
false before deregistering.
Test: Telephony Unit Tests
Bug: 36374918
Change-Id: I42b066f8a97770f23d71a0c646f384f7cbfdb57b
Brad Ebinger [Sat, 6 May 2017 00:45:36 +0000 (17:45 -0700)]
Notify ImsService Status Callbacks correctly
Adds support in the ImsServiceController for multiple
Feature listeners for one feature. Also adds support for
signaling the ImsFeature to remove the binder callback when
the feature is removed.
Stops Phone from listening to IMS_SERVUICE_UP/DOWN when
using the ImsResolver.
Bug: 38001858
Test: Unit Tests
Merged-In: I920605b32160fdce9fcd3b4c0100804d3590397f
Change-Id: I920605b32160fdce9fcd3b4c0100804d3590397f
fionaxu [Sat, 6 May 2017 00:21:52 +0000 (17:21 -0700)]
voicemail notification settings cleanup
- remove UI preference for voicemail notification ringtone & vibration
settings as they are not functioning with notification channel
introduced
- have a new Notification Preference under voicemailSettings which will
navigate to the system settings screen for that channel.
- modify telephonymanager API getVoiceMailRingToneUri and
isVoiceMailVibrationEnabled from sharedPreference to NotificationChannel
data.
- more cleanup work needed till next API bump for telephonyManager APIs
setVoicemailVibrationEnabled and setVoicemailRingToneUri
Bug: 37912316
Test: Manaul test
Change-Id: Ic28713c012672b991b8f131545c06e1dbfd6765f
Hall Liu [Fri, 5 May 2017 23:23:34 +0000 (16:23 -0700)]
Synchronize on mImsPhone to avoid NPE
During a disconnect, the binder thread from the IMS stack may set
mImsCall to null simulataneously with the main thread calling methods on
mImsCall after a null check. Adding synchronization to prevent an NPE.
Change-Id: Id7874e802d56ab7d3912c779dedd1cccdb923db6
Test: no deadlocks while calling Fixes: 37945103
On DSDS MSIM devices, when Default Data Subscription event
is received, the ImsService may choose to switch which
Slot ID is active.
This change better handles that switch and removes a
crash that was happening due to
ImsServiceProxy#getFeatureStatus getting called
circularly.
Bug: 37361882
Test: Run Telephony unit test
Merged-In: If0f2e3c90de378421bc17d029bf1e6a3ced6bb34
Merged-In: I2cfef49f833e330289f172bae7e422f5afa5fc40
Change-Id: If61332d8c2d4dacb96d27d706abac6afc612749b
There a few issues here:
1. The queuing of MMI codes for handUssdRequest was not working properly.
I have removed it in favor of returning an error if there is an ongoing
MMI code. The functionality was pretty broken and despite my efforts I
could not sort all of it out well enough to be confident that it could be
fixed.
2. There was no attempt to retry handleUssdRequest calls on IMS.
3. There was a missing fallback to CS for regular MMI requests.
Move intents ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED,
ACTION_DEFAULT_SUBSCRIPTION_CHANGED and EXTRA_SUBSCRIPTION_INDEX
from Intent class to SubscriptionManager class.
notify carrier apps on carrier action reset, usually when sim loaded
or sim absent. only sent those reset signals to configured carrier apps
carrier apps could reply on this new intent instead of sim_state_changed
to avoid unnecessary wake-ups, for example an VZW app might be awake
even under AT&T due to the general SIM_STATE_CHANGED broadcast.
Bug: 34626476
Test: Manual test on TMO and READY/ZIP SIM
Change-Id: Icc8bd843ddaccd3a96950831c45ff6825fb0cc9e
Jack Yu [Tue, 11 Apr 2017 17:33:47 +0000 (10:33 -0700)]
Added unmetered use only data connection support
If a data network is brought up while data is turned off because
the request APN is unmetered, when data is enabled again, this data
network needs to be torn down so a full capable data network can
be re-established.
Test: Unit tests
bug: 30936226
Change-Id: Ia233c80fa14980713bfe66bef61f1c6f4a8c1c0d