Commit Graph

736 Commits

Author SHA1 Message Date
Robert Greenwalt
8a1be0be1f am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '3c417fbf21133340cbbe3539d87c453f81ae3a9d':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:36:44 +00:00
Robert Greenwalt
d4f7652c27 DO NOT MERGE Sanitize WifiConfigs
Do this both on input from apps (giving error) and between wifi and
ConnectivityService (ignoring bad data).  This means removing all
addresses beyond the first and all routes but the first default and
the implied direct-connect routes.

We do this because the user can't monitor the others (no UI), their
support wasn't intended, they allow redirection of all traffic
without user knowledge and they allow circumvention of legacy VPNs.

This should not move forward from JB as it breaks IPv6 and K has
a more resilient VPN.

Bug:12663469
Change-Id: I80912cc08ffa1e4b63008c94630006cf316e7a64
2014-03-28 14:54:53 -07:00
Jeff Sharkey
876ddc9564 Increase readability of connectivity event log.
Bug: 6322766
Change-Id: I556759f5fc1466cdd4db6b4574084a8068dc9909
2012-11-09 15:57:02 -08:00
Dianne Hackborn
dc456a66da Remove extraneous logs.
Change-Id: I4c47d36748de91bd6fddc419afbf59552bf63e9a
2012-11-08 13:13:48 -08:00
Jeff Sharkey
8c87045d09 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Jeff Sharkey
8b36157b58 First step towards cleaning up Global settings.
Remove all @Deprecated @hide settings, and clean up any stragglers.

Bug: 7232125
Change-Id: Ibf67093c728d4a28565129b923edb1701d3b2789
2012-09-26 17:18:49 -07:00
Ashish Sharma
f605dcb8ad Merge "Migrate DATA_ACTIVITY_TIMEOUT_MOBILE/WIFI from Settings.Secure to Settings.Global" into jb-mr1-dev 2012-09-26 13:49:29 -07:00
Ashish Sharma
6c97dcf3c7 Migrate DATA_ACTIVITY_TIMEOUT_MOBILE/WIFI from Settings.Secure to Settings.Global
Bug: 7189605
Change-Id: Id54b8d490d7849bf071c3fbfd8f7358ed873a4e8
2012-09-26 13:45:18 -07:00
Jeff Brown
c67cf56735 Update references to migrated global settings.
Fixed one setting that was migrated but not marked deprecated.

Removed a hidden setting that is no longer used by the new
power manager service.

Bug: 7231172
Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
2012-09-25 15:27:51 -07:00
Irfan Sheriff
32bed2cc47 Captive check for both mobile and wifi
Bug: 7113195
Bug: 7102238
Bug: 7087564

Change-Id: Iac08db9de3935338ad498aa3983d2ca82057dda1
2012-09-20 12:13:06 -07:00
Jeff Sharkey
d53c789d44 Migrate network stats from removed users.
When a user is removed, migrate all network stats belonging to that
user into special UID_REMOVED bucket.  Also removes those stats from
kernel to avoid double-counting if another user is created.

Bug: 7194784
Change-Id: I03f1d660fe3754566326b7749cae8068fc224ea9
2012-09-19 14:54:05 -07:00
Jeff Sharkey
cf6ffaff69 Actually move to Global settings.
Also add better ConnectivityService logging.

Bug: 7157464
Change-Id: Ia235a7e62ed809240913c4782920c1410c7d597d
2012-09-14 13:47:51 -07:00
Jeff Sharkey
69fc5f8bd1 Restrict lockdown and firewall to AID_SYSTEM.
Bug: 7076289
Change-Id: Iafa3054335e8b1c3c8c3b8db2a4191d4ed4c8c41
2012-09-06 17:59:14 -07:00
Dianne Hackborn
e588ca1c19 Fix another issue #7097984 java.lang.SecurityException: Permission Denial:
broadcast asks to run as user -1 but is calling from user 0; this requires

Dupped bug of a different problem.

Change-Id: I15f4ab08b81f5f5746ba1cd183dee4f0b1281df5
2012-09-04 18:48:37 -07:00
Wink Saville
756bc781dd am 0e90f738: am cd2a20f2: am 5a2772e2: Merge "Fix code problem in writePidDns"
* commit '0e90f738aa82d9b30e6b4f43cd321e3f9cad2fc1':
  Fix code problem in writePidDns
2012-08-30 18:16:30 -07:00
Wink Saville
cd2a20f248 am 5a2772e2: Merge "Fix code problem in writePidDns"
* commit '5a2772e23b1dd2fb3840c10d4575bb06bb6f0026':
  Fix code problem in writePidDns
2012-08-30 18:11:30 -07:00
Wink Saville
5a2772e23b Merge "Fix code problem in writePidDns" 2012-08-30 17:36:06 -07:00
Dianne Hackborn
2298689dc1 Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
2012-08-30 14:33:22 -07:00
Irfan Sheriff
0ad0d13d5a Captive portal handling
We now notify the user of a captive portal before switching to the network as default.
This allows background applications to continue to work until the user confirms he
wants to sign in to the captive portal.

Also, moved out captive portal handling out of wifi as a seperate component.

Change-Id: I7c7507481967e33a1afad0b4961688bd192f0d31
2012-08-27 22:27:06 -07:00
Jeff Sharkey
ebcc7978c1 Always-on VPN.
Adds support for always-on VPN profiles, also called "lockdown." When
enabled, LockdownVpnTracker manages the netd firewall to prevent
unencrypted traffic from leaving the device. It creates narrow rules
to only allow traffic to the selected VPN server. When an egress
network becomes available, LockdownVpnTracker will try bringing up
the VPN connection, and will reconnect if disconnected.

ConnectivityService augments any NetworkInfo based on the lockdown
VPN status to help apps wait until the VPN is connected.

This feature requires that VPN profiles use an IP address for both
VPN server and DNS. It also blocks non-default APN access when
enabled. Waits for USER_PRESENT after boot to check KeyStore status.

Bug: 5756357
Change-Id: If615f206b1634000d78a8350a17e88bfcac8e0d0
2012-08-27 12:35:05 -07:00
Jeff Sharkey
64d8b3be3a Migrate legacy VPN arguments to system_server.
Generate the racoon and mtpd daemon arguments in system_server,
instead of accepting them from Settings.

Bug: 5756357
Change-Id: I42c1a644f6add477fe4222342640d7db15982cb8
2012-08-24 11:29:58 -07:00
Jeff Sharkey
366e0b75b7 Begin moving VPN to NetworkStateTracker pattern.
Created base tracker that handles common bookkeeping, and move VPN
to become a tracker.  VPN status is now reflected in NetworkInfo, and
is mapped to LegacyVpnInfo.

Legacy VPN now "babysits" any init services it starts, watching for
when they stop unexpectedly.

Bug: 5756357
Change-Id: Iba7ec79da69469f6bd9a970cc39cf6b885b4c9c4
2012-08-23 16:41:06 -07:00
Robert Greenwalt
adb8bf98d9 Update TCP buffer size when switching network type
Import of non-merging change 41612 from AOSP

When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Change-Id: Ic44a557677ffe629e83ce1f522a9f058bee6e7b2
2012-08-20 12:28:51 -07:00
Robert Greenwalt
70ccd5bf80 am 89ab6757: (-s ours) am 6626398a: Merge "Fix for updating TCP buffer size when switching network type"
* commit '89ab67578e4e06c41f0e96d840de952d10895233':
  Fix for updating TCP buffer size when switching network type
2012-08-17 13:44:54 -07:00
Robert Greenwalt
89ab67578e am 6626398a: Merge "Fix for updating TCP buffer size when switching network type"
* commit '6626398a72ae592e3a9184c9b0868df0fc1f1724':
  Fix for updating TCP buffer size when switching network type
2012-08-17 13:28:25 -07:00
Magnus Strandberg
daa042513c Fix for updating TCP buffer size when switching network type
When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Change-Id: Iaa527c84f56cae108f4c7276bbed10552faaff6c
2012-08-17 11:38:44 +02:00
Haoyu Bai
e246244e82 Setup idletimer for network interface.
Cherry-picked from commit 8ce570b0f3 in
master. DO NOT MERGE

Change-Id: I6101c7ae041b4cc1237ce7a9983753dbdfa301d3
2012-08-10 15:58:34 -07:00
Jeff Sharkey
9844730f62 Merge "Isolate NetworkStateTracker creation, test." into jb-mr1-dev 2012-08-08 16:25:41 -07:00
Jeff Sharkey
6b9021d76c Isolate NetworkStateTracker creation, test.
Change ConnectivityService to use a factory when creating
NetworkStateTrackers, which gives us a good place to inject mocks
for testing.  Add initial tests to verify that network routes are
added and removed as networks changed.

Change-Id: I11cbc61a84c2ed4afa2670036295b1494eab26e1
2012-08-08 16:23:41 -07:00
Jeff Sharkey
976942a8ee Merge "Include network type that caused broadcast." into jb-mr1-dev 2012-08-06 13:40:44 -07:00
Jeff Sharkey
47905d1f1d Include network type that caused broadcast.
Network type can be obtained through EXTRA_NETWORK_INFO, but offer
it as first-class extra since the returned NetworkInfo is deprecated.

Bug: 6936247
Change-Id: Ief59577afd2bd930f0f4c5650b413feef86bfbc3
2012-08-06 11:45:01 -07:00
Jeff Sharkey
60e6c1ac06 Make generic BaseNetworkObserver.
This makes it easier to add new INetworkManagementEventObserver events
in future.

Change-Id: I432263d745558de4b878f313c1951230ed9db2b1
2012-08-05 14:32:41 -07:00
Jeff Sharkey
a1ef1bec2a Split NST handler events away from CS internals.
Instead of sharing event space, use a different handler backed by
the same looper.

Change-Id: I11f1e4701c341665770ca640f3cba0c295bb7561
2012-07-26 14:09:09 -07:00
Haoyu Bai
b5da575fc7 Network data activity change intent for network interfaces.
The activity notification is received from netd, an intent
DATA_ACTIVITY_CHANGE is then raised for other part of the system to
consume.

Change-Id: Idfcc4763c51c5b314c57f546c12557082f06bebf
2012-07-17 17:13:03 -07:00
Wink Saville
e0bdc06669 am 406feb59: (-s ours) Create telephony-common and mms-common - DO NOT MERGE
* commit '406feb595d96f0b585a192922109d97a3fc3699b':
  Create telephony-common and mms-common - DO NOT MERGE
2012-07-17 12:36:56 -07:00
Wink Saville
406feb595d Create telephony-common and mms-common - DO NOT MERGE
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
   frameworks/opt/mms

telephony-common was created by moving some of
   frameworks/base/telephony
to:
   frameworks/opt/telephony

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
2012-07-17 12:23:09 -07:00
Wink Saville
64e3f78abb Create telephony-common and mms-common
These have been created to reduce the size and complexity
of frameworks/base.

mms-common was created by moving all of
  frameworks/base/core/java/com/google/android/mms
to:
   frameworks/opt/mms

telephony-common was created by moving some of
   frameworks/base/telephony
to:
   frameworks/opt/telephony

Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
2012-07-11 16:02:08 -07:00
Catherine Liu
e6228bdbd7 Fix code problem in writePidDns
When app call startUsingNetworkFeature() to keep alive, there is a
code problem in writePidDns() to update the net.dnsX.<pid> property.

Change-Id: I83b02da4808f106c9ca00e350ad38e4bd5cba689
2012-06-29 16:09:35 -05:00
The Android Open Source Project
da0ba6beec Reconcile with jb-release
Change-Id: I4200341adee9a73e326fb9f0c6eefa3d8e01a2b9
2012-06-19 07:15:35 -07:00
The Android Automerger
fd9cdfb85d merge in jb-release history after reset to jb-dev 2012-06-19 07:03:42 -07:00
Nicolas Falliere
5889983f0b am 56bb344c: Merge "Added or fixed doctrings for required permissions." into jb-dev
* commit '56bb344ccfd3d261cea9987c98a17d0820279b17':
  Added or fixed doctrings for required permissions.
2012-06-18 17:42:57 -07:00
Nicolas Falliere
7842df58d0 Added or fixed doctrings for required permissions.
Bug: 6591338
Change-Id: Ia2092f9994854701b5fa1425c371817367ae07ec
2012-06-18 17:22:34 -07:00
The Android Open Source Project
29cdec9fd3 Reconcile with jb-release nakasi-factoryrom-release
Change-Id: I2b5e77195eae1a9676c2530a9023290936e55255
2012-05-29 09:39:33 -07:00
The Android Automerger
7da38575b5 merge in jb-release history after reset to jb-dev 2012-05-29 08:58:07 -07:00
Robert Greenwalt
6568a45c99 am 1ed1de7a: Merge "Modify logging to debug this issue" into jb-dev
* commit '1ed1de7ab2ae03f82500dbf6272bf036d89bd0c9':
  Modify logging to debug this issue
2012-05-24 12:30:20 -07:00
Robert Greenwalt
1e6991edcf Modify logging to debug this issue
Logging exec time on startUsingNetworkFeature as we've had some reports suggesting it's
causing ANRs.
Remove some logging from NDC so it's local log is more useful.

bug:6492166
Change-Id: I258ff6c59bff2c65935242d50496d84720c5d493
2012-05-24 10:47:10 -07:00
The Android Open Source Project
ce77d5e629 Reconcile with jb-release
Change-Id: I68d329b7abda2aedfd3fd98419f3b3167ccfbc2a
2012-05-22 13:05:14 -07:00
The Android Automerger
fb6ba30c68 merge in jb-release history after reset to jb-dev 2012-05-20 07:39:45 -07:00
The Android Automerger
8eedde7053 merge in jb-release history after reset to jb-dev 2012-05-19 11:42:49 -07:00
The Android Automerger
1ee6c89564 merge in jb-release history after reset to jb-dev 2012-05-19 10:05:49 -07:00