Commit Graph

1158 Commits

Author SHA1 Message Date
Chad Brubaker
170386ea78 Add the calling package name to requestRouteToHost
The calling package name will be used to check if an application is a
system application when deciding if a route should be exempt from VPN
routing rules.

Bug: 12937545
Change-Id: I2c09c875fe9bb9685871a0a801ddcbb32fc17405
2014-02-19 11:04:49 -08:00
Dianne Hackborn
5da0d5a316 Start tracking radio up time.
We now always turn on network state tracking for mobile,
and push this information down to battery stats.

In battery stats we use this to both log the changes in
the history and keep track of the total time the mobile
radio was active.

Power computation is switched over to using this information
to help determine power use, which will hopefully make it
more accurate (not counting inaccuracies in knowing when it
actually goes down).

Note yet done is aggregating this data per-uid, to better
emphasize which apps are causing the radio to be up.  Right
now we just spread the total time across all uids weighted
by the total number of packets they have sent and received.

Also put in the battery stats infrastructure for bluetooth to
address issue #12973036: Improve power_profile.xml

Change-Id: I39d11b7ff6ae4f336f253d1cba308d8569de7e0d
2014-02-13 17:55:40 +00:00
Jake Hamby
5f5d4337b1 Add new RIL commands to read/write NV items and reset NV config.
Add new RIL commands and generic code cleanups.

The only changes required for OMA DM support are the
addition of five new methods in ITelephony.aidl for
reading/writing NV items and performing NV config and
radio resets (requires MODIFY_PHONE_STATE), along with
the new RIL request IDs in RILConstants.java.

Bug: 12864208
Change-Id: I958d2571580d98a49936ef2e6822e5ac086acbe2
2014-02-03 15:52:18 -08:00
Hui Lu
abb57909e0 am 3cab7fc1: Merge "Add proxy as another network." into klp-modular-dev
* commit '3cab7fc1b8f06166df3a58cf10d4a0db36bde788':
  Add proxy as another network.
2014-01-31 08:11:57 +00:00
Hui Lu
07f2933a07 Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb
2014-01-30 17:26:18 -05:00
Robert Greenwalt
593cc7af27 Clean up dhcp no-op logging
bug:10553167
Change-Id: I1f6feb9a44e17d45ffc9f28b37bf5690230a3ade
2014-01-23 16:05:25 -08:00
Amith Yamasani
ae31a40841 am 6ac202be: Move some system services to separate directories
* commit '6ac202be31f255c01eba381fe30c431aee3ab50f':
  Move some system services to separate directories
2013-12-19 23:30:35 +00:00
Amith Yamasani
6ac202be31 Move some system services to separate directories
Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
2013-12-19 15:25:37 -08:00
Lorenzo Colitti
fdd455785e am 263c4788: am a58711d5: am b4ccc540: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.
2013-12-09 18:34:44 +00:00
Lorenzo Colitti
a58711d5b5 am b4ccc540: Merge "Add address flags and scope to LinkAddress."
* commit 'b4ccc5407932858e9e4cdc29dafe05e810e35f22':
  Add address flags and scope to LinkAddress.
2013-12-09 10:28:19 -08:00
Lorenzo Colitti
b4ccc54079 Merge "Add address flags and scope to LinkAddress." 2013-12-07 02:43:04 +00:00
Lorenzo Colitti
4ea70b7743 Add address flags and scope to LinkAddress.
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
   Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
   Since most callers don't know about flags and scope, provide
   constructors that default the flags to zero and determine the
   scope from the address. Addresses notified by the kernel will
   have these properly set. Make multicast addresses invalid.
   Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
   address and prefix information between two LinkAddress
   objects. This is necessary because an interface can't have
   two addresses with the same address/prefix but different
   flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
   to identify existing addresses to add/remove using
   isSameAddressAs instead of implicit equals(). Specifically:
   - If addLinkAddress is called with an address that is already
     present, the existing address's flags and scope are updated.
     This allows, for example, an address on an interface to go
     from preferred to deprecated when it expires, without it
     having to be removed and re-added.
   - If removeLinkAddress is called with an address that is
     present but with different flags, it deletes that address
     instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
   notification methods to take just a LinkAddress instead of
   LinkAddress, flags, and scope. While I'm at it, change the
   order of the arguments for consistency with the other
   functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
2013-12-06 13:54:35 +09:00
The Android Open Source Project
93dfe5add6 am dcff5cef: am 35e36de6: am 8a49a518: Merge commit \'bac61807d3bcfff957b358cb9ad77850bd373689\' into HEAD
* commit 'dcff5ceff6ef0050af4c49a8c2a86ab663a88665':
2013-12-06 02:50:46 +00:00
The Android Open Source Project
35e36de659 am 8a49a518: Merge commit \'bac61807d3bcfff957b358cb9ad77850bd373689\' into HEAD
* commit '8a49a518c5eba286f7739a61c9af03e4f222e046':
2013-12-05 17:27:10 -08:00
The Android Open Source Project
8a49a518c5 Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Lorenzo Colitti
a9f3961f77 am 13d9dfb4: am e097407f: am 8fc3d9a2: Merge "Minor changes to LinkAddress."
* commit '13d9dfb495db1431623c712b36cac1fe2f3c2fc0':
  Minor changes to LinkAddress.
2013-12-04 01:35:11 +00:00
Lorenzo Colitti
e097407f80 am 8fc3d9a2: Merge "Minor changes to LinkAddress."
* commit '8fc3d9a2d9a0533f5a95c9508cf6a0abef07d7e3':
  Minor changes to LinkAddress.
2013-12-03 17:26:06 -08:00
Lorenzo Colitti
8fc3d9a2d9 Merge "Minor changes to LinkAddress." 2013-12-04 01:21:07 +00:00
Lorenzo Colitti
64eb7fdb64 Minor changes to LinkAddress.
1. Simplify the parceling code. Since the InetAddress inside a
   LinkAddress can never be null, we don't need to special-case
   the case where it is.
2. Add / update method documentation.
3. Write a unit test.

Change-Id: Iba0a8cecc683d55d736419965e72ee33dd66dc22
2013-12-03 19:46:36 +09:00
Lorenzo Colitti
ff6daa9aff am 025b1edc: am f226bc60: Merge "Use LinkAddress in address notifications."
* commit '025b1edcd92142305d6f1e50a9224d8a7f8b628a':
  Use LinkAddress in address notifications.
2013-12-02 20:53:06 +00:00
Lorenzo Colitti
025b1edcd9 am f226bc60: Merge "Use LinkAddress in address notifications."
* commit 'f226bc606af9ce5aceff6b05fc4b0200c94cb248':
  Use LinkAddress in address notifications.
2013-11-26 17:56:45 -08:00
Lorenzo Colitti
6ee1306c53 am 48a93c46: am 9d4ac970: Merge "Pass DNS server info notifications to observers."
* commit '48a93c46f390d2cd74c9bce61121386f93bde13a':
  Pass DNS server info notifications to observers.
2013-11-26 08:48:34 -08:00
Lorenzo Colitti
3b6f820e6b am 4eeb8ad4: am eede7e89: Merge "Minor cleanups to NetdCallbackReceiver.onEvent."
* commit '4eeb8ad49491ccb155e171ca89cb89c337e7723c':
  Minor cleanups to NetdCallbackReceiver.onEvent.
2013-11-26 08:48:30 -08:00
Lorenzo Colitti
48a93c46f3 am 9d4ac970: Merge "Pass DNS server info notifications to observers."
* commit '9d4ac9703657142b190d3c256de7c3329e5a4b29':
  Pass DNS server info notifications to observers.
2013-11-26 08:38:48 -08:00
Lorenzo Colitti
4eeb8ad494 am eede7e89: Merge "Minor cleanups to NetdCallbackReceiver.onEvent."
* commit 'eede7e89c94b3bb56c26aec137c53d592d3bc7c3':
  Minor cleanups to NetdCallbackReceiver.onEvent.
2013-11-26 08:38:45 -08:00
Lorenzo Colitti
3ac3fea4e7 Use LinkAddress in address notifications.
Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
2013-11-26 21:55:15 +09:00
Lorenzo Colitti
ea5c0e2c48 Pass DNS server info notifications to observers.
These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

[Cherry-pick of d3b7821c8f]

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
2013-11-25 17:27:17 +09:00
Lorenzo Colitti
1f7e433a86 Minor cleanups to NetdCallbackReceiver.onEvent.
- Clean up identical error messages.
- Fix the array length check for InterfaceAddressChange.

[Cherry-pick of 4f85a08091]

Bug: 9180552
Change-Id: Id871f481445b530c3ad749725f1548df0e3a1228
2013-11-25 17:25:45 +09:00
The Android Open Source Project
2c3004bf9e am ac29b5a6: am b4c0ead9: (-s ours) Merge commit \'b873a17ce7be0a9771c24999adca6964431728f6\' into HEAD
* commit 'ac29b5a6746279f156f9471633498f29e39c14ff':
2013-11-22 19:31:23 -08:00
The Android Open Source Project
ac29b5a674 am b4c0ead9: (-s ours) Merge commit \'b873a17ce7be0a9771c24999adca6964431728f6\' into HEAD
* commit 'b4c0ead90f29f49cf494aa1d39a143b417e62545':
2013-11-22 17:40:32 -08:00
The Android Open Source Project
b4c0ead90f Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Lorenzo Colitti
3b49b08e33 Merge "Pass DNS server info notifications to observers." 2013-11-22 01:27:15 +00:00
John Spurlock
10cbbeebcc Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Robert Greenwalt
2b1ac58fdf am 6668bcdc: am a8a448da: am e568672c: Merge "Fix NPE in ConnectivityService" into klp-dev
* commit '6668bcdc88226c2f36f5ba4084661477e0e517c4':
  Fix NPE in ConnectivityService
2013-11-18 10:37:51 -08:00
Robert Greenwalt
6668bcdc88 am a8a448da: am e568672c: Merge "Fix NPE in ConnectivityService" into klp-dev
* commit 'a8a448da25c62f54cac3318c17c69e851a4ecde9':
  Fix NPE in ConnectivityService
2013-11-18 10:33:46 -08:00
Robert Greenwalt
cf8c894ef3 Fix NPE in ConnectivityService
bug:11727708
Change-Id: Ia8ca9d1e23f021feaf4b772ec38d1d0e89b0cd2a
2013-11-18 09:43:59 -08:00
Lorenzo Colitti
d3b7821c8f Pass DNS server info notifications to observers.
These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
2013-11-18 12:04:14 +09:00
Robert Greenwalt
bfe9d334c4 am 989bbbdd: resolved conflicts for merge of 639aed71 to klp-dev-plus-aosp
* commit '989bbbdddc450a8e380b5f5318bb6e38a89637ae':
  Fix for the invalid Global Proxy Setting
2013-11-13 18:48:31 -08:00
Robert Greenwalt
8fa42e3cfb am 2a1fb433: am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev
* commit '2a1fb433e5ed5d5fd52f7018483481fc6aac9435':
  Fix for the invalid Global Proxy Setting
2013-11-13 18:47:57 -08:00
Robert Greenwalt
989bbbdddc resolved conflicts for merge of 639aed71 to klp-dev-plus-aosp
Change-Id: I220a034cf3293a4a29d8683f20812adac112bddd
2013-11-13 17:50:35 -08:00
Robert Greenwalt
2a1fb433e5 am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev
* commit '4c514f2a688bdae319c919987092ccfee690f390':
  Fix for the invalid Global Proxy Setting
2013-11-13 16:29:12 -08:00
Robert Greenwalt
639aed7172 am 3d666581: Merge "Fix for the invalid Global Proxy Setting"
* commit '3d66658106600473851b8b868b20b8c11fad8c7d':
  Fix for the invalid Global Proxy Setting
2013-11-13 16:27:56 -08:00
Robert Greenwalt
3d66658106 Merge "Fix for the invalid Global Proxy Setting" 2013-11-14 00:23:04 +00:00
Raj Mamadgi
08e512b425 Fix for the invalid Global Proxy Setting
Adding validation for Global Proxy setting before it is
being set.

Proxy is validated at the boot time also to make sure
the value set is valid.

Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
bug:11598568

Change-Id: Idff5ae81119d8143da096b5291ecbfbc5875cbd4
2013-11-14 00:08:21 +00:00
Robert Greenwalt
f4f53e0f33 am b6344cef: am 48eded0e: am 18490abd: Merge "Fix NPE in ConnectivityService"
* commit 'b6344cefc4ebdcbb050681a569f2933704a00a77':
  Fix NPE in ConnectivityService
2013-11-13 10:33:56 -08:00
Robert Greenwalt
b6344cefc4 am 48eded0e: am 18490abd: Merge "Fix NPE in ConnectivityService"
* commit '48eded0e8fdf594cb53c4137c7cc62d90af87f97':
  Fix NPE in ConnectivityService
2013-11-13 10:27:46 -08:00
Robert Greenwalt
48eded0e8f am 18490abd: Merge "Fix NPE in ConnectivityService"
* commit '18490abd9bcb401f0d75a314056fb2a44dd61f07':
  Fix NPE in ConnectivityService
2013-11-13 10:25:30 -08:00
Ken Mixter
7caa36a51a Fix NPE in ConnectivityService
Could occur when requestRouteToHostAddress is called on a network
with no associated tracker.  Code later in the method handles
this case gracefully but code introduced in JB throws an exception.

Change-Id: I6c8a0e313ecbcca120aeb5dd0802a72114749aa1
2013-11-12 22:17:46 -08:00
Raj Mamadgi
6bc5edab73 Fix for the invalid Global Proxy Setting
b/11598568

Adding validation for Global Proxy setting before it is
being set.

Proxy is validated at the boot time also to make sure
the value set is valid.

Change-Id: Ib93d24a80af1a329694f07c47bd81dfcc1e1b874
Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
2013-11-12 21:14:02 -05:00
Lorenzo Colitti
4f85a08091 Minor cleanups to NetdCallbackReceiver.onEvent.
- Clean up identical error messages.
- Fix the array length check for InterfaceAddressChange.

Bug: 9180552
Change-Id: Id871f481445b530c3ad749725f1548df0e3a1228
2013-11-04 18:30:20 +09:00