OSDN Git Service

Fix up upstream interface types for case DUN_UNSPECIFIED
authorJayachandran C <jayachandranc@google.com>
Thu, 18 May 2017 06:53:59 +0000 (23:53 -0700)
committerJayachandran C <jayachandranc@google.com>
Tue, 23 May 2017 21:02:46 +0000 (14:02 -0700)
commit58059820275c3a347a48e5e8179bdbc839f9d774
treea84258e1a1966872a24c36c394b6f703b12ea0be
parent65d3a457d2152a431d158352257e3c846fc8a367
Fix up upstream interface types for case DUN_UNSPECIFIED

The existing logic will add TYPE_MOBILE and TYPE_MOBILE_HIPRI
even if the carrier config has TYPE_DUN for DUN_UNSPECIFIED.

A check is added not to modify the upstream interface types
if there is already a cellular interface type. Add TYPE_MOBILE
and TYPE_MOBILE_HIPRI if there is no cellular types found.

Test: Hotspot on Verizon and T-Mobile US.
      Verified the requestNetwork has the DUN capability.

Bug: 38186915
Change-Id: I74fc5c791fee2885bf66df8975e92c2b48f1668c
services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
tests/net/java/com/android/server/connectivity/tethering/TetheringConfigurationTest.java