89 Commits

Author SHA1 Message Date
Chia-chi Yeh
2e46764a70 VPN: implement status report for legacy VPN.
Change-Id: I81c28dafd9588572df76cbc303b0d6a0f41f9bc6
2011-07-04 03:23:12 -07:00
Chia-chi Yeh
c2b8aa0b4c VPN: rename some variables.
Change-Id: I7f15b5ab30f591e26242fca27af25f578809534c
2011-07-03 18:00:47 -07:00
Chia-chi Yeh
100155a310 VPN: convert prepare() into a form which helps solve race conditions.
When someone tries to revoke packageA, it is possible that packageA is
already revoked by packageB. In this case packageB should not be revoked,
and the new prepare() can help solve this problem.

Change-Id: Iee056a191dd99467b8ad1b5379a17b02d404bad1
2011-07-03 17:03:27 -07:00
Chia-chi Yeh
34e7813e96 VPN: minor refinement.
Change-Id: I2b59cbe8554b6c6f8da48c465252489394f32653
2011-07-03 03:07:07 -07:00
Chia-chi Yeh
3281034c1c VPN: merge JNI methods.
Legacy VPN needs to change routes by itself.

Change-Id: I4cf6639f2b00225810f49704ae05797fc70921d9
2011-07-02 16:16:03 -07:00
Chia-chi Yeh
e9107901ae VPN: give legacy VPN a fake package name.
And add more comments.

Change-Id: I0cbc495fcb2c8dd105e16a841619b3b9bd227eae
2011-07-02 01:48:50 -07:00
Chia-chi Yeh
41d1685a22 VPN: integrate legacy VPN.
Change-Id: I00e77664354c05e0edfcd5fb2e3da2ca434ed521
2011-07-01 02:12:06 -07:00
Chia-chi Yeh
8909b10175 VPN: Use List<String> instead for dnsServers and searchDomains.
Change-Id: I5d72c182ad47f59121a04b68ec6c2d164e2d00a8
2011-07-01 01:14:19 -07:00
Chia-chi Yeh
1f7746b39b VPN: rename service(s) to daemon(s) to reduce confusion.
Change-Id: I9739e63c8e41e8b63d024dc4f17283c76bb4ff97
2011-07-01 00:29:06 -07:00
Chia-chi Yeh
383e052472 VPN: fix the build.
Change-Id: Ibeaa067cf95636e09746d16f402c78c99d7cb681
2011-07-01 00:13:25 -07:00
Chia-chi Yeh
a4b87b5e98 VPN: refactor a little bit for the upcoming integration of legacy VPN.
Change-Id: I0fe0dffe59d8d9c9a0fdd05e07b07aa6c8da0a80
2011-06-30 23:21:55 -07:00
Chia-chi Yeh
f4e3bf892e VPN: refactor few JNI methods for the usage of legacy VPN.
Now default routes are handled in JNI instead of VpnBuilder.

Change-Id: Ib026bba6793b64aae0f8356df3d2aaae489d08b4
2011-06-30 12:41:11 -07:00
Chia-chi Yeh
85a7ce02c8 VPN: add a method to handle requests of legacy VPNs.
The code is working but not complete yet.

Change-Id: Id8c8f137665373ad52c626b9d34e5a2cad028597
2011-06-29 16:05:58 -07:00
Wink Saville
bf731e7f90 am 7eff4bb3: am f49e4d3f: Merge "Temporary re-enabling iface name change handling on HO" into honeycomb-LTE
* commit '7eff4bb3f9c0cf0335dd1b2769bcb352b137dbaa':
  Temporary re-enabling iface name change handling on HO
2011-06-27 14:14:45 -07:00
Mike J. Chen
f59c7d0f2a Hookup interface status to other clients
After unreverting the linkstate change patch, hook up notification handlers
that didn't exist when the first patch was created, like
EthernetDataTracker.java and Vpn.java.

For the observers that handle interfaceStatusChanged(), I made
interfaceLinkStatusChanged() call it so they both do the same thing.

Change-Id: I0077e5e5f48f3932ba98f5bf363243892f2de6cc
Signed-off-by: Mike J. Chen <mjchen@google.com>
2011-06-24 15:02:30 -07:00
Mike J. Chen
6143f5f739 Revert "Revert "Propagate new link-status-change message to any NetworkManagementService""
This reverts commit 1a7e67190228a8ff3b92e7e5496a8db8ff306cca.

Bring back the changes from Stan Chesnutt regarding link-status-change
notifications.  The comment from the original patch was:

Propagate new link-status-change message to any NetworkManagementService
observers.  Also fix the syntax of the "interface-status-change" message.  Add
a null handler in the ThrottleService and Tethering classes (plus fix names).

Change-Id: I42cbed692024de32275cad234f42ff23ab7e9d8d
Signed-off-by: Mike J. Chen <mjchen@google.com>
2011-06-23 19:24:59 -07:00
Kazuhiro Ondo
1ccb10e25d Temporary re-enabling iface name change handling on HO
Temporary accept interface name change in ConnectivityService.
See bug/4455071.

Bug: 4903011
Change-Id: I7f06c2ca83535b981f047cb671e08550aed7df1a
2011-06-23 14:58:50 -07:00
Robert Greenwalt
7af34ab836 Merge "resolved conflicts for merge of 7a652bc8 to master" 2011-06-22 14:41:09 -07:00
Robert Greenwalt
5ff886e531 resolved conflicts for merge of 7a652bc8 to master
Change-Id: Id0a41cae36f5a3b30f2fe8a202c934153b9cd03f
2011-06-22 13:20:14 -07:00
Mike Lockwood
f59717ddb5 Combine UsbManager.setPrimaryFunction and setDefaultFunction
Due to the property trigger on persist.sys.usb.config,
setting the default function also sets the current function.
Now we combine both of these methods into setCurrentFunction, which has
a "makeDefault" option to make the new function the default.

This change should eliminate some problems with setting properties due to
multiple property triggers happening at the same time.

Change-Id: I9851299e9c2ee20475eada1a8104c0d50bf5a9e1
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-22 15:19:33 -04:00
Robert Greenwalt
ccf83af101 Fix tethering upstream determination.
Used to use iface names, but on mobile ifaces are multipurpose.
Refined to use ConnectivityService types.
bug:4530116

Change-Id: Iaa632d5f540d27ffff683bd7d94f8004bf422e71
2011-06-20 11:09:23 -07:00
Mike Lockwood
3c2a2f6789 Tethering: Use UsbManager to enable/disable RNDIS
Remove obsolete RNDIS support from NetworkManagementService

This change fixes USB tethering, which broke after the new USB gadget driver
changes went in.

Change-Id: Idd987fb2c39c40e81ebc92e6d8dae9fe77ed4ddc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-19 20:50:46 -04:00
Chia-chi Yeh
3f3337a662 VPN: avoid leaking file descriptors.
Change-Id: If70f5af3529d79bddb9d72675cf6eb038ff3ff70
2011-06-17 16:34:32 -07:00
Chia-chi Yeh
7b0b834c3d VPN: move VpnDialogs related methods into VpnConfig.
This might not be the best place for the glue code, but it is
known that choosing VpnBuilder will introduce a dependency
cycle of VpnBuilder, ConnectivityService, and the Vpn class.

Change-Id: I3f03617d1fe1a0b8fb3705c23265676fff51a75c
2011-06-17 14:34:11 -07:00
Chia-chi Yeh
04ba25c418 VPN: migrate from generic Bundle to our own Parcelable VpnConfig.
Note that VpnConfig is for internal use only.
Also remove hidden methods from ConnectivityManager.

Change-Id: Ic298c4dc9a2c6c452bd8f4be6fa84e7ac489c0c4
2011-06-15 17:08:58 -07:00
Chia-chi Yeh
f8905fd13d VPN: change some strings in VPN notifications.
Also remove a small piece of dead code.

Change-Id: Idd10f3d72a92228951278bf360d08ba9bede02d2
2011-06-15 11:06:52 -07:00
Chia-chi Yeh
3663227a8b VPN: add MTU support.
Change-Id: Ia2f06ae1fcf065bde7dafd212b84b37a34f1a47e
2011-06-13 15:05:37 -07:00
Chia-chi Yeh
3667369807 VPN: use ParcelFileDescriptor.adoptFd() instead of doing it in JNI.
This removes the dependency of android_util_Binder.h.
This change also removes some redundant zeroing.

Change-Id: Ie9fedd471dfa198f9a3261e03651f945cefbbf61
2011-06-13 14:32:18 -07:00
Chia-chi Yeh
ff3bdca31f The service part of the user space VPN support.
The dialogs will be in another change.

Change-Id: I0cdfd2ef21ffd40ee955b3cbde5ada65dbfdb0bc
2011-06-08 14:16:42 -07:00
Chia-chi Yeh
5bc7c93ca7 Merge "Do not register the callbacks in the constructor." 2011-06-07 18:18:56 -07:00
TK MUN
60a3117838 am 51704fc9: am cecb710a: am 94260caf: Allow control over search order for tethering upstream interface selection
* commit '51704fc9c2f42e72a86f580c3e2aa977e8b6b006':
  Allow control over search order for tethering upstream interface selection
2011-06-06 12:57:24 -07:00
TK MUN
51704fc9c2 am cecb710a: am 94260caf: Allow control over search order for tethering upstream interface selection
* commit 'cecb710a6de249a3847da2f07464a1aecf9459ac':
  Allow control over search order for tethering upstream interface selection
2011-06-06 11:51:22 -07:00
TK MUN
94260caf2f Allow control over search order for tethering upstream interface selection
Change-Id: If02c9b2bb61b68ebafafadc23ba17a332bc8004f
Signed-off-by: TK MUN <tk.mun@samsung.com>
2011-05-25 10:32:06 -07:00
Chia-chi Yeh
008ff39b7c Do not register the callbacks in the constructor.
Change-Id: Ic7509c35cfb17b022a2af3cc14170942d6510e2d
2011-05-23 15:08:29 -07:00
Kazuhiro Ondo
8904c3d814 am b22a9fd9: am 01758e81: Linkproperties update via unsol data call state change.
* commit 'b22a9fd9bb32133cbc7dc4fc7752dbf68e52dffe':
  Linkproperties update via unsol data call state change.
2011-05-18 17:48:37 -07:00
Kazuhiro Ondo
01758e81b3 Linkproperties update via unsol data call state change.
Handles the scenario of radio technology handover with IP continuity.
Once RIL/Modem finished a handover operation, an unsol data call state
change will be send up to FW notifying all link propertes changes.
FW will then re-configure the device with new link properties
including iptable used by Tethering.

Change-Id: I05e29f66ac3db8ba4274d3662642607742ba1d12
2011-05-17 20:53:40 -07:00
Chia-chi Yeh
c9338305bf Extract NetworkManagementService out from Tethering to ConnectivityService.
and also some minor refactoring.

Change-Id: I0e74f30ef1b035d9ed37571c512fedc15d05db77
2011-05-11 17:06:07 -07:00
Wink Saville
64c42cae44 Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.
Change-Id: Ib4b33894da75f5f156066092fb145b478e52f7d7
2011-04-18 14:55:10 -07:00
Irfan Sheriff
c0e0dbb454 DO NOT MERGE Pick upstream intf with valid IP conf
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: I3e8ab5ef30b69f1adab755d83f5b65c078f73936
2011-03-25 10:09:55 -07:00
Robert Greenwalt
7e48e76cab Merge "Start using NetworkUtils.numericToInetAddress." 2011-03-02 12:10:51 -08:00
Robert Greenwalt
e590373ea7 Start using NetworkUtils.numericToInetAddress.
Generates InetAddresses without risking an accidental dns lookup.  For use with supposedly
numeric-only ip address strings.

Change-Id: I694f3976ce1c6382854706f6557ea88a289add3a
2011-03-02 11:37:32 -08:00
Mike Lockwood
40bbf9295d DO NOT MERGE: Backport USB accessory support to gingerbread
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 23:09:12 -08:00
Mike Lockwood
c4308f01c9 Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 08:07:20 -08:00
Mike Lockwood
f13ec7a3ac DO NOT MERGE: Clean up USB notifications:
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: I1dea480f4b0daf14247cf37c5f2060498882c002
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-27 18:39:26 -08:00
Mike Lockwood
7916432b3c DO NOT MERGE UsbManager: squashed commit of:
USB: Add functions for querying if a USB function is supported and enabled.

Rename android.hardware.Usb to UsbManager and UsbObserver to UsbService

Change-Id: I920a211934d993eab8ce744c1cc7b05342389286
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-27 18:39:21 -08:00
Robert Greenwalt
b979f79158 Remove more use of netmask
bug:2542681
Change-Id: Ifd75672739ee8262d4df22afd8173e4f3f67260d
2011-02-14 14:32:33 -08:00
Robert Greenwalt
ed12640932 Bind addr and prefixLength together in LinkAddress
bug:2542681
Change-Id: I90200446216d78c676498144946832afe75efdb8
2011-01-28 15:34:55 -08:00
Robert Greenwalt
fc8e55850b am 678c6a35: am d14239a2: Merge "Fix tethering when switching default connection" into honeycomb
* commit '678c6a358dc14beb7825b30346ab09df432ba1fe':
  Fix tethering when switching default connection
2011-01-25 10:34:53 -08:00
Robert Greenwalt
05d8936f27 Fix tethering when switching default connection
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
2011-01-23 16:04:05 -08:00
Robert Greenwalt
547e4e757b Fix Tethering's handling of a system restart.
A crash of the system server leaves us out of sync with the kernel network setup.
Try to recover.

bug:3241213
Change-Id: I70c0daa0d54ecee6e203bcba2460e8d069305a89
2011-01-18 16:52:16 -08:00