Generates InetAddresses without risking an accidental dns lookup. For use with supposedly
numeric-only ip address strings.
Change-Id: I694f3976ce1c6382854706f6557ea88a289add3a
If the default connection is suitable use that rather than a random interface.
This permits us to deterministically switch back to wifi after hanging out on
DUN APN.
bug:3374236
Change-Id: Iee5137b9f09c358f262e7a62f20282e79f7d889f
A crash of the system server leaves us out of sync with the kernel network setup.
Try to recover.
bug:3241213
Change-Id: I70c0daa0d54ecee6e203bcba2460e8d069305a89
As a work around for the issue of picking
the wrong interface, add a check for selecting
an upstream interface that has a valid IP configuration
Bug: 3362306
Change-Id: I01084517cff756c97660b2cfbfa8e9bf26673148
Use matching feature type when turning tethering off or the request is ignored.
Also, turn on DUN apn right away so that we don't fail aggressive test cases.
Also don't report connections for enabled apn's that we're no longer connected to.
bug:3332880
bug:3338033
Change-Id: I7db2dfd4879f03465bc9f6d39488c078570dcaf3
A bit of a hack so that first trySetupData call uses the proper APN in
strange edge cases. Made a new startUsingNetworkFeature string
that ConnectivityService knows means always pass the request to telephony
even if telephony connections are not currently available.
bug:3133178
Change-Id: I2559b9cbaed4b4ec02bdf7ea78e6003ee2be64f2
Add support for separate USB connected and configuration events
Include both USB connected/disconnected and configuration state
in USB_STATE Intent
Remove redundant USB_CONNECTED and USB_DISCONNECTED Intents
Now we just have the sticky USB_STATE broadcast
Move USB disconnnect rebouncing from Tethering to UsbService
Change-Id: Id13eb0c5d51152d2a538985d680ba1db7d2241dc
Signed-off-by: Mike Lockwood <lockwood@android.com>
InterfaceConfiguration changed to use InetAddress and stop with the string->int->string
conversions.
bug:2542681
Change-Id: I11c4954547333c43bb840fa0469ddde57b0d043b
In preparation for an upcoming change that will make UsbService into a real system service
Change-Id: Id85d624cfc6b10b49a08105cfaaacc667a492c12
Signed-off-by: Mike Lockwood <lockwood@android.com>
Remember, the system and main logs are
- Shared resources
- Primarily for recording problems
- To be used only for large grained events during normal operation
Bug: 3104855
Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
We were using somebody elses dns without permission - rude. Switch to using
secondary google public dns.
bug:3045768
Change-Id: I042262bb96d3efed4c0265dc7ff6ac418e4d4f1e
This change is already in master
On some devices, switching the USB configuration to enable RNDIS can
result in multiple USB disconnect/reconnect events being generated.
Change-Id: I14b02aaca11bb708f6b3334e41a2f4d4fa7b7296
Signed-off-by: Mike Lockwood <lockwood@android.com>
On some devices, switching the USB configuration to enable RNDIS can
result in multiple USB disconnect/reconnect events being generated.
Change-Id: Id0bfe54293bd51211f84976be2d72f8b1ad0100d
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit 'd5786b982c90632a4b35fd2d984c4edc4bbdfb0b'
* commit 'd5786b982c90632a4b35fd2d984c4edc4bbdfb0b':
Tethering: Use new ACTION_USB_STATE broadcast to monitor USB connected state
Replaces use of battery status, which will not work on devices that do not
charge over USB.
Change-Id: I1e123bb534d46b890461ddfdee24f81da5798756
Signed-off-by: Mike Lockwood <lockwood@android.com>
Rather than come out of the user-modifiable APN DB, the DUN APN data will
come first from a built-in resource and then potentially overriden by a secure
setting (which is gservices upgradable).
Also made the "require-dun" setting secure-setting overridable.
bug:2736390
Change-Id: I1e4644c3839f06c977b83797641f3948785146a2
An ANR has been reported because somebody else was hogging the Netd
link. We can't pause the server thread for that, so make a new thread.
bug:2609904
Change-Id: I0430a08621da1cda0a0010ce15826cceee59a529
We weren't notifying the second tethered iface of it's upstream iface name so its traffic
was not getting routed correctly.
We also weren't clearing out our connected iface name when we untethered, so the route rules
weren't getting flushed when the last tether came down.
Change-Id: I34e5d672ea882c89c8f582d69d6dc421cb52d4b4
Previously we only supported a single range - this was inadequate for
multiple interfaces. Adding a second range so we can support
both usb and wifi tethering.
Also moving out of the zero-conf range as our dhcp client won't
accept ip addrs in that range (no nexus to nexus wifi action).
bug: 2537963
bug: 2533491
bug: 2538303
Change-Id: I600b421343c28c2f9839ed2076122ae3d0ff5d3d
If the phone is configured to require a DUN connection when on mobile but also accepts
wifi upstream connections, there was a bug in the logic and you'd be left with no
upstream connection.
bug:2533914
Change-Id: I30d44764f578be4cf2c29ee90d39e8563dda06fb
Used to see multiple notifications if usb tethering and wifi tethering were both used.
bug:2527862
Change-Id: Idc6299c0a70564dd7c8d8d7fe13bde83723134ae
Tethering will now persist to on (until turned off) through upstream net drops,
tunnels, switches to wifi or 2G, mms sends, etc. It will also strive to use
the most natural connection and only go to HiPri/Dun APNs when needed.
bug:2519915
bug:2501837
Change-Id: Iedf6647daad8df507d7c87d1130b204b0a0acc7b
Now Tethering gets notified of UMS changes. Turns out UMS Broadcasts
have attached data with a file scheme and the filter had to be set
correctly.
bug:2504908
Change-Id: I67d979000196c90068fe59846b4fa2bbf6ea00d8
Also make the usb interface configuration more robust so retries are possible.
Makes all Tethering errors recoverable - no harm letting them try again anyway. Worst case
is they need to reboot.
when USB is connected and disconnected.
This is needed because the UMS broadcasts will not be sent when UMSis disabled.
Change-Id: I4488fee2c19ac9c901596d1430ea371df97e4325
Signed-off-by: Mike Lockwood <lockwood@android.com>