Commit Graph

3143 Commits

Author SHA1 Message Date
TreeHugger Robot
6b7bf94740 Merge "incidentd: dumping jobscheduler to proto" 2018-01-09 23:15:19 +00:00
Benedict Wong
e65973c571 Merge "Add validation to IpSecConfig algorithm setters" am: a954f20f46 am: c93df5ca1c
am: 764a0b739a

Change-Id: I7ff85771945c68025ce8d66ca85313bac087b3a5
2018-01-09 21:23:35 +00:00
Kweku Adams
85f2fbcb1f incidentd: dumping jobscheduler to proto
Bug: 65750819
Test: flash device and check incident.proto output
Also test: $ cts-tradefed run cts-dev --module CtsIncidentHostTestCases --test com.android.server.cts.JobSchedulerIncidentTest
Change-Id: I4abc01ca893edcbaf4d2254e4f807e06f5cb91f8
2018-01-09 12:05:39 -08:00
Benedict Wong
764a0b739a Merge "Add validation to IpSecConfig algorithm setters" am: a954f20f46
am: c93df5ca1c

Change-Id: I45289bc8e8b93f7eb912a76a10b951b1a615338a
2018-01-09 19:51:19 +00:00
Benedict Wong
a954f20f46 Merge "Add validation to IpSecConfig algorithm setters" 2018-01-09 18:18:28 +00:00
nharold
2687681596 Merge changes from topic "ipsec-resource-id-cleanup" am: 2b36299c73 am: d7319df4d0
am: a07d0e463d

Change-Id: Ib96b30bcb1b47c23d0a18cf043dd042409c61322
2018-01-08 20:29:11 +00:00
nharold
a07d0e463d Merge changes from topic "ipsec-resource-id-cleanup" am: 2b36299c73
am: d7319df4d0

Change-Id: If6ab575e2f30fc70d73e6f8787c87f3c7a2ab09d
2018-01-08 20:16:08 +00:00
Jeff Sharkey
9f2dc0527e Add DataUnit to clarify SI-vs-IEC units.
Mirrors the design of TimeUnit and ChronoUnit which many developers
are already familiar with, making it easy to pick up and use.

Yes, this is an enum.

Bug: 70915728
Test: bit FrameworksCoreTests:android.util.DataUnitTest
Change-Id: Id0cfdac5c81ed89c3c9ece23c964acba4a4f8471
2018-01-07 19:06:01 -07:00
Benedict Wong
4f25570acd Add validation to IpSecConfig algorithm setters
Adds checks to ensure that users can only set the correct types of
algorithms for the Authentication, Encryption and Authenticated
Encryption algorithms.

Bug: 65223935
Test: Added tests in IpSecConfigTest, and passed on aosp_marlin-eng
Change-Id: I462c77d9eb5710b8d03a48866453649d3b6fc6bf
2018-01-04 16:56:40 -08:00
Nathan Harold
6119d8d1d0 IpSec Invalidate the Resource IDs on close()
To facilitate error checking we should invalidate
the resource IDs of all objects when we close() them.
Today, the resource ID is invalidated on the Transform
object but not on the SPI or Encap Socket. This CL
unifies the behavior.

Bug: 70641274
Test: cts - IpSecManagerTest
Change-Id: I28caec3e913902c748c6a50b4ef742ccef8b1b09
2018-01-04 15:28:29 -08:00
Jeff Sharkey
717f52f2dd Intent to manage subscription plans.
Define an API for carrier apps to provide a deep-link into their app
for the user to see more details about their billing relationship,
such as upgrading plans.

The createManageSubscriptionIntent() method is ready for OS
components to use when deciding if they should show a "MANAGE"
button in their UI, and the returned Intent is fully constructed
and ready to roll.

Test: builds, boots
Bug: 64133169
Change-Id: I9b2775b7cba5313f517996870135eb4682082873
2018-01-04 16:11:51 -07:00
Ricky Wai
62bc5f84be Merge "Make Network watchlist use ConfigUpdater to get watchlist" 2018-01-03 14:16:40 +00:00
Ricky Wai
ebe3624628 Make Network watchlist use ConfigUpdater to get watchlist
Bug: 63908748
Test: test_network_watchlist_full.sh samples/network-watchlist-sample.xml

Change-Id: I9dcca568d3f19f2937786c9c184324b43dc08ff2
2017-12-22 11:49:51 +00:00
Chenbo Feng
71436b32e9 Merge "Use NetworkStatsService to get stats for apps" am: 693d8a2ab1 am: fa7f4015fc
am: 09a81e4da1

Change-Id: I90ce68a72afbf596e28d987e925795709d24dd52
2017-12-21 19:49:25 +00:00
Chenbo Feng
09a81e4da1 Merge "Use NetworkStatsService to get stats for apps" am: 693d8a2ab1
am: fa7f4015fc

Change-Id: I14f614a86214bd4f006415c48b9a8323e06c737f
2017-12-21 19:15:29 +00:00
Hugo Benichi
824565dfba MacAddress: address api review comments
1) toSafeString() is renamed to toOuiString()
2) toOuiString() returns a String that only contains the first 3 bytes
   of the mac address.

Bug: 70336442
Test: runtest frameworks-net
Change-Id: I798d8fec32dbff5687a682028e5d90eb941f81c1
Merged-In: I798d8fec32dbff5687a682028e5d90eb941f81c1

(cherry pick from commit a0ecf38d30)
2017-12-21 08:34:05 +09:00
Chenbo Feng
d3d9c4ed9b Use NetworkStatsService to get stats for apps
Move the native implementation of TrafficStats to NetworkStatsService
and apps need to get the NetworkStatsService binder interface from
system_server in order to get the network usage stats since boot. This
implementation can hide the detail of retrieving network traffic
information from apps and the NetworkStatsService can choose which
methoed it use to get the data depending on the kernel version of the
device.

Bug: 30950746
Test: CtsNetTestCases -t android.net.cts.TrafficStatsTest
Change-Id: I53bbefd19aa0b783b9b4b42ea4d76db3e9ec07a3
2017-12-19 19:57:44 -08:00
Benedict Wong
ebf59a8962 Merge "[ipsec-qtaguid] Tag sockets upon creation of encap sockets" am: d0ac50bcad am: 8caa274ade
am: 9de5c77303

Change-Id: I4140f386687c579044f9b5fe59dd7e05f86000fe
2017-12-19 00:41:55 +00:00
Benedict Wong
9de5c77303 Merge "[ipsec-qtaguid] Tag sockets upon creation of encap sockets" am: d0ac50bcad
am: 8caa274ade

Change-Id: I2f27c76a1f493ff4f0bd423c06f159e629866d4d
2017-12-19 00:27:57 +00:00
Hugo Benichi
fe9e89820d Merge changes I798d8fec,I4a2d5866 am: c5212b6654
am: 99be302c71

Change-Id: I41b507c4e4bf9b8b9082f5e7eaab8985b5bbef41
2017-12-19 00:06:00 +00:00
Benedict Wong
d0ac50bcad Merge "[ipsec-qtaguid] Tag sockets upon creation of encap sockets" 2017-12-18 23:50:52 +00:00
Hugo Benichi
c5212b6654 Merge changes I798d8fec,I4a2d5866
* changes:
  MacAddress: address api review comments
  Expose the MacAddress class in the api
2017-12-18 23:43:06 +00:00
TreeHugger Robot
679436ad60 Merge "Add isMobileDataEnabled in TelephonyManager." 2017-12-18 22:08:38 +00:00
Benedict Wong
570970f6b2 Merge "[CHERRY-PICK] API for apps to tag sockets with their own UID." am: bef8c59634
am: 826657a9c2

Change-Id: Ia06653e6c1cccddcd2de17dd88a9ef47263f5c79
2017-12-18 21:56:41 +00:00
Benedict Wong
babe5d7364 [ipsec-qtaguid] Tag sockets upon creation of encap sockets
Added calls to tag encap sockets to that of the UID for which the encap
socket is being created on behalf of. This ensures that all data
accounting generated for the UDP-encap-ESP socket is correctly billed to
the right UID.

Bug: 62994731
Test: New tests added to IpSecServiceTest.java, passing
Change-Id: I15365ea9c982fd7b4e3cdeff314ddfba2289c86e
2017-12-18 19:46:06 +00:00
Jeff Sharkey
a4239cf798 [CHERRY-PICK] API for apps to tag sockets with their own UID.
This enables app A to create a socket, pass it to app B, and have
app B accept blame for the traffic performed on that socket.

Also adds helpful public APIs for tagging raw FileDescriptor sockets
instead of making developers go through shady SocketImpl wrappers.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 63932076
Change-Id: I08925c843974675fc82e4080cec2eaab9ab7cd41
Merged-In: I08925c843974675fc82e4080cec2eaab9ab7cd41
(cherry picked from commit 70dc4f4d16)
2017-12-18 19:44:40 +00:00
Hugo Benichi
a0ecf38d30 MacAddress: address api review comments
1) toSafeString() is renamed to toOuiString()
2) toOuiString() returns a String that only contains the first 3 bytes
   of the mac address.

Bug: 70336442
Test: runtest frameworks-net
Change-Id: I798d8fec32dbff5687a682028e5d90eb941f81c1
2017-12-18 09:22:47 +09:00
Hugo Benichi
3f4848102c Expose the MacAddress class in the api
Test: built,  flashed, $ runtest frameworks-net
Bug: 69390696
Change-Id: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d
Merged-In: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d

(cherry picked from commit d411cf61ed)
2017-12-18 09:21:26 +09:00
nharold
ccb9365019 Merge "Use consistent naming for allocating SPI." am: bf48afea49 am: 4753ed4b1b
am: f71c95dfe4

Change-Id: Ib6845ab0d7f385fbd1d59c0179771542e12c8be0
2017-12-14 21:48:58 +00:00
nharold
f71c95dfe4 Merge "Use consistent naming for allocating SPI." am: bf48afea49
am: 4753ed4b1b

Change-Id: Ib5d89044313341790b1ee9271642072ddce181af
2017-12-14 21:36:32 +00:00
nharold
bf48afea49 Merge "Use consistent naming for allocating SPI." 2017-12-14 21:10:16 +00:00
Hugo Benichi
e3f872cf06 Merge "Extend connectivity OWNERS" am: 64c2488056
am: 3304263594

Change-Id: I816a15beedcfc9f200d00da7282e54992a096555
2017-12-14 03:25:36 +00:00
Hugo Benichi
959ee4a7b1 Extend connectivity OWNERS
Also remove 'build.master@android.com' which is deprecated, not
declared by anybody else, and makes the linter unhappy.

Bug: 70394432
Test: built
Merged-In: I9c0ba41386129379f82259fcc5e745562b014fae

(cherry pick from commit 626eed2ac8)

Change-Id: Ie802113d61f693d73f7234b44ac2a9bd462b3fbf
2017-12-14 09:56:56 +09:00
Hugo Benichi
3220790917 Merge "Extend connectivity OWNERS" 2017-12-13 23:36:51 +00:00
Malcolm Chen
b455e722b1 Add isMobileDataEnabled in TelephonyManager.
Added a new hidden API isMobileDataEnabled in TelephonyManager.
Rename related APIs to isUserMobileDataEnabled,
isUserMobileDataEnabled and setUserMobileDataEnabled to better
clarify their functionality.

Bug: 69814555
Test: build
Change-Id: I2f186f1e7550cafbe4ee3a5af293c39274cbfeaa
2017-12-13 14:44:39 -08:00
Jonathan Basseri
5fb929032d Use consistent naming for allocating SPI.
Throughout the IPsec code (API, system server, netd) we use "reserve"
SPI and "allocate" SPI interchangeably. This renames to use "allocate"
everywhere for self-consistency and consistency with the kernel
(ALLOCSPI).

In javadoc, I am leaving the word "reserve" in several places because it
is still an accurate description of how the method behaves.

Bug: 69128142
Test: TreeHugger should be enough
Change-Id: I8ea603b4612303b0393beef04032671fa53d2106
2017-12-12 13:50:35 -08:00
Hugo Benichi
626eed2ac8 Extend connectivity OWNERS
Also remove 'build.master@android.com' which is deprecated, not
declared by anybody else, and makes the linter unhappy.

Bug: 70394432
Test: built
Change-Id: I9c0ba41386129379f82259fcc5e745562b014fae
2017-12-12 09:14:23 +09:00
Hugo Benichi
54edf5df21 Merge "DefaultNetworkEvent: fix two bugs with validation times" am: c0d951c3e0 am: 144d9e9f83
am: 51e563aefb

Change-Id: Ide65494bfe095533a06c4b33002fbd260306f8a0
2017-12-11 00:37:22 +00:00
Hugo Benichi
51e563aefb Merge "DefaultNetworkEvent: fix two bugs with validation times" am: c0d951c3e0
am: 144d9e9f83

Change-Id: Iad5a7cda8b73f638aa7db8ae38bdccef1cbeae85
2017-12-11 00:24:33 +00:00
Hugo Benichi
c0d951c3e0 Merge "DefaultNetworkEvent: fix two bugs with validation times" 2017-12-10 23:54:13 +00:00
Hugo Benichi
71a1b532b5 DefaultNetworkEvent: fix two bugs with validation times
This patch fixes two bugs around the validation time calculation for
default network metrics:
  - for events representing the absence of a default network, the
    validation time was not correctly set to 0.
  - for events representing a default network, the validation time was
    always set to the duration time. This was overlooked by commit
    380a063858.

Also fix a minor printing padding issue in DefaultNetworkEvent#toString

Test: manually inspected the output of $ adb shell dumpsys connmetrics
      while enabling and disabling wifi.

Change-Id: I0eb4ccdf7a61d3097d0661104cb40d738e59772a
2017-12-09 13:02:51 +09:00
Hugo Benichi
fc9696e489 Merge "Expose the MacAddress class in the api" 2017-12-05 23:58:32 +00:00
Hugo Benichi
f5cf390e41 Merge "Fix bug in MacAddress.fromString()" am: cdb84d2fc7 am: 9d077ecd9d
am: 5d2bd6bf0c

Change-Id: I7df23a45618825b874658ccbbf1d1fda6b164954
2017-12-05 10:09:35 +00:00
Hugo Benichi
5d2bd6bf0c Merge "Fix bug in MacAddress.fromString()" am: cdb84d2fc7
am: 9d077ecd9d

Change-Id: If67d0b8fcc2270d4b152d4e07c79725b457574c6
2017-12-05 10:01:19 +00:00
Hugo Benichi
9d077ecd9d Merge "Fix bug in MacAddress.fromString()"
am: cdb84d2fc7

Change-Id: If4c85f0a5ea259f53f9cffa6eacb58fcde1fd1df
2017-12-05 09:47:50 +00:00
Jeff Sharkey
e888a8c606 Merge "API for apps to tag sockets with their own UID." 2017-12-05 05:00:46 +00:00
Hugo Benichi
d2c5b1925b Fix bug in MacAddress.fromString()
Test: runtest frameworks-net
Bug: 69390696
Change-Id: I83f01e4915092e08ed201d9b6738bb02498d3bba
2017-12-05 13:14:08 +09:00
nharold
b8ab1d404b Merge "Validate IpSecAlgorithm Length" am: 68b81299d2 am: 5e3d66e78b
am: 7a8f0dc0c0

Change-Id: I1a28d860ac7125afc1f82ac17d1834b0121c0e11
2017-12-05 02:46:06 +00:00
nharold
7a8f0dc0c0 Merge "Validate IpSecAlgorithm Length" am: 68b81299d2
am: 5e3d66e78b

Change-Id: I1ffaa4de392777c5199a411aef9cd10f4e7c3666
2017-12-05 02:37:14 +00:00
nharold
5e3d66e78b Merge "Validate IpSecAlgorithm Length"
am: 68b81299d2

Change-Id: I23f7612c119e67f9a1647568aeefde38a365f8da
2017-12-05 02:28:10 +00:00