Fixed that APN context stuck in SCANNING state
authorJack Yu <jackyu@google.com>
Thu, 11 May 2017 20:47:56 +0000 (13:47 -0700)
committerJack Yu <jackyu@google.com>
Fri, 12 May 2017 21:26:07 +0000 (14:26 -0700)
commit0f70a4c00d7ddac31b444d86e49e9b76fa2e658d
treedf80303a4b39b5a0fed86a53be5d4daf0e7bcbf8
parent87056c26aaca5063bd21e8d5acce229d34dc3840
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.

Test: Telephony sanity tests
bug: 38113800
Merged-In: I6edd7555327f41ee713a256edfe641a41ca6f969
Change-Id: I6edd7555327f41ee713a256edfe641a41ca6f969
src/java/com/android/internal/telephony/dataconnection/DcTracker.java