Commit Graph

1875 Commits

Author SHA1 Message Date
Xin Li
3b49ef3445 DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08:00
Maciej Żenczykowski
c728c5e185 Merge "minor change to keep it building"
am: f369b2f771

Change-Id: I63a9b21b59b1192065284f9e44071c368c12e641
2020-01-14 01:06:12 -08:00
Maciej Żenczykowski
f369b2f771 Merge "minor change to keep it building" 2020-01-14 09:03:11 +00:00
Junyu Lai
dfb59a3bd4 Merge changes from topic "sp04"
am: c621ac4b44

Change-Id: Ib2b96e64074a575c4d1a682e34bf6682c2fe4830
2020-01-13 06:12:54 -08:00
junyulai
a51ef24361 [SP04] add unit test for NetworkStatsProvider
am: a97b5c3bb3

Change-Id: Icd440ff9086604cb0baaa4cb3e8e458dcda3bb97
2020-01-13 06:12:48 -08:00
junyulai
573e809597 [SP03] support registerNetworkStatsProvider API
am: 258eb3b9e5

Change-Id: Id3a21676b6063048124c54035207a1c070df7a8c
2020-01-13 06:12:41 -08:00
junyulai
9ea8dae9fc [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
am: 644ec019dd

Change-Id: I17550a2191ccd33a53a195df3cd178d93fbfe952
2020-01-13 06:12:31 -08:00
Junyu Lai
c621ac4b44 Merge changes from topic "sp04"
* changes:
  [SP05] add unit test for onStatsProviderLimitReached in NPMS
  [SP04] add unit test for NetworkStatsProvider
  [SP03] support registerNetworkStatsProvider API
  [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
2020-01-13 14:09:52 +00:00
Artur Satayev
fcda85b772 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
Merged-In: I534e3fd1305e2f4af076986770033478448a665c
2020-01-13 12:39:59 +00:00
junyulai
a97b5c3bb3 [SP04] add unit test for NetworkStatsProvider
Test: atest NetworkStatsServiceTest
Bug: 130855321
Change-Id: I0c19d8bedcb9398da3f464efe01e775fde9f8a78
2020-01-13 14:43:06 +08:00
junyulai
258eb3b9e5 [SP03] support registerNetworkStatsProvider API
This change provides an API that allow external modules to
register a custom provider of NetworkStats to merge the
network statistics that cannot be seen by the kernel to system.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: atest NetworkPolicyManagerServiceTest
Test: m doc-comment-check-docs
Bug: 130855321

Change-Id: I265bc637c40666cde505fde5056d2d9bfc5fb204
2020-01-13 14:43:03 +08:00
junyulai
644ec019dd [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
Extracted from ag/9990011 to make NetworkStatsManager sync with internal
line, given that it is missing in aosp/1198084.

Bug: 126528330

Test: Treehugger
Change-Id: I77f50326869799f51d4636cb7c6d7c97daf531e6
Merged-In: I42117ebfb640e3b0b133183e5e146860bed8471a
2020-01-13 14:42:37 +08:00
Automerger Merge Worker
9bd7141d12 Merge "Allow mainline IPsec(IKE) to statically include @PolicyDirection" am: 1207761344 am: b5189ed2d9
Change-Id: I40382746ab54ed21fe9d8fc68b2c81bdf2b4e464
2020-01-10 00:16:11 +00:00
Yan Yan
1207761344 Merge "Allow mainline IPsec(IKE) to statically include @PolicyDirection" 2020-01-09 23:42:59 +00:00
Automerger Merge Worker
a0e0b34013 Merge "Use new UnsupportedAppUsage annotation." am: 57f5cccd29 am: fe3063fb71
Change-Id: Iea82f97f0ba766ce3f435630175aea48ca47f12f
2020-01-09 16:15:31 +00:00
Treehugger Robot
57f5cccd29 Merge "Use new UnsupportedAppUsage annotation." 2020-01-09 15:46:03 +00:00
Automerger Merge Worker
44358d9d8f Merge "[SP02] Add provider interfaces to system API" am: 2220f75cdf am: c6487568ad
Change-Id: I569fbcc38f44221ff1be355e48ced65359f2e70f
2020-01-09 15:14:16 +00:00
Artur Satayev
7dc15b923f Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
Merged-In: I8789f8499d4dca08580672e9e45ed9a7026dd686
2020-01-09 13:56:05 +00:00
Automerger Merge Worker
cc0ae82905 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e
Change-Id: I771bf8836f9b754fc05fd743de8cc5a15aecddf1
2020-01-09 09:18:36 +00:00
junyulai
b9471063dd [SP02] Add provider interfaces to system API
This change contains a base class that allows external modules
to implement a custom network statistics provider. And a callback
interface that allows the implementation to signal the system.

These interfaces will be used in the follow-up changes that
implement the functionality.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Ib23377c8b9cef02bc32253462b068fd10734d21a
2020-01-09 08:57:37 +00:00
junyulai
55041a4ad2 [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
evitayan
30878b0c76 Allow mainline IPsec(IKE) to statically include @PolicyDirection
@PolicyDirection was hidden API defined in IpSecManager and
mainline module IPsec(IKE) needs to depend on it.

To remove this hidden API dependency, this commit:
- Moves definition of @PolicyDirection to a separate class
- Creates sharing filegroup framework-ike-shared-srcs for mainline
  IKE and include PolicyDirection.java

Bug: 146360859
Test: build, flash, boot
Test: atest FrameworksIkeTests
Change-Id: Ic6d7c06d4b92e16a9a65430365c9acc73932147b
2020-01-08 13:53:14 -08:00
Automerger Merge Worker
d9c69c6105 Merge "Use new UnsupportedAppUsage annotation." am: 9395887931 am: 8081ee1b35
Change-Id: I330594303664e66571a460fdb1a5ab6cb8e5e273
2020-01-08 17:14:42 +00:00
Artur Satayev
164c7569c1 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-08 14:04:40 +00:00
Automerger Merge Worker
a4e599c4b0 Merge "Fix some @hide usage in Tethering" am: b763432e14 am: aff6974b16
Change-Id: Ie88cd6ef541d5bd9fcec2e26c03277c75919a1a0
2020-01-08 01:13:35 +00:00
markchien
c74889d36c Fix some @hide usage in Tethering
Using alternative way to replace some @hide API.

Bug: 144814072
Test: build, flash, boot
      atest TetheringTests

Change-Id: I1e12d69db1ad91dff553e142e17c6a70808e1639
2020-01-07 21:29:52 +08:00
Maciej Żenczykowski
ed3ee3702b minor change to keep it building
This is part of 3 commits in 3 diff git repos, the main one is:
  https://android-review.googlesource.com/c/platform/system/netd/+/1200479
  "share eBPF struct definitions between ebpf and C++ netd"

as a side effect of which 'android::bpf::Stats' becomes simply '::Stats'

Test: builds
Bug: 146787904
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8548b27d1d8a7938f96c9fd9a185dae882e406f6
2020-01-06 23:25:49 +00:00
Automerger Merge Worker
166e658c00 Merge "convert 'Stats stats; memset(&stats, 0, sizeof(Stats));' to 'Stats stats = {};'" am: 30bf98b239 am: d872904d2c
Change-Id: I6025782d2deea26150c21bc682cca80ceca6148a
2020-01-06 15:21:17 +00:00
Automerger Merge Worker
16605fc29d Merge "remove spurious 'struct' on Stats" am: fa88e27173 am: 39b66243ee
Change-Id: I42b04ea2b7a3381b15d49bb6d6ef644277925515
2020-01-06 15:20:29 +00:00
Treehugger Robot
30bf98b239 Merge "convert 'Stats stats; memset(&stats, 0, sizeof(Stats));' to 'Stats stats = {};'" 2020-01-06 14:12:26 +00:00
Treehugger Robot
fa88e27173 Merge "remove spurious 'struct' on Stats" 2020-01-06 14:12:21 +00:00
Automerger Merge Worker
af83fe4801 Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" am: 2ee360b058 am: 5727033c3a
Change-Id: I77d243d82c34a976637f6bdb8f652e9886c3b491
2020-01-03 16:22:21 +00:00
Treehugger Robot
2ee360b058 Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-01-03 15:44:41 +00:00
Daulet Zhanguzin
4461754bd5 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I978d5d0959f7800e859bfb384458ba52adc0c2b0
2020-01-03 14:42:32 +00:00
Maciej Żenczykowski
4421b2b9c2 convert 'Stats stats; memset(&stats, 0, sizeof(Stats));' to 'Stats stats = {};'
Not only is it more concise, but it's also just a tad more correct:
since it really should have been 'sizeof(stats)' not 'sizeof(Stats)'.

Test: builds, atest
Bug: 146787904
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6cf0295878c7b34cedfe3ae44ff7410ef419f8b9
2019-12-30 20:49:36 +00:00
Maciej Żenczykowski
3a4cc11de3 remove spurious 'struct' on Stats
Test: builds, atest
Bug: 146787904
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I824daf0ebdddbac1b11cabfcb248ee4134586768
2019-12-30 20:49:27 +00:00
Automerger Merge Worker
661741804d Merge "Update interface quota limit when network stats updated" am: 2dcf4c0227 am: a992b3aa83
Change-Id: I2eae931385e4d93aa9f19e216079685f0215374e
2019-12-19 10:20:59 +00:00
Junyu Lai
2dcf4c0227 Merge "Update interface quota limit when network stats updated" 2019-12-19 09:07:54 +00:00
junyulai
d7efd7ba07 Update interface quota limit when network stats updated
In previous design, interface quota limit does not changed
when network stats are updated. However, this is incorrect
today since there are some offloaded traffic that cannot
be seen by kernel. If the limit is not updated, the offloaded
traffic might still be able to use whole quota as if there is
no embedded traffic.

This change also removes the re-arm global alert after
advising persist threshold if not changed, given that it will
cause an additional alert while updating interface quota limit.

Bug: 145792619
Test: 1. atest NetworkStatsServiceTest
      2. atest NetworkPolicyManagerServiceTest
      3. manual test: run speedtest, check dumpsys netd

Change-Id: I8d2203e713730d536430a234b1aa8b2468badee3
2019-12-18 10:57:29 +08:00
Aaron Huang
e58fff9f29 Merge "Add TrafficStats methods to public APIs" am: 8aed6e69f0
am: 1abb8de060

Change-Id: Ib98dde2ae3b6cfee05e8d5536565ce72f6722e0b
2019-12-06 03:12:46 -08:00
Aaron Huang
443651d3e2 Add TrafficStats methods to public APIs
Add methods to public APIs for mainline support.

Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
      atest android.net.cts
      atest android.net.wifi.cts

Change-Id: I21a9c0dbdc79b1f1041fc9e23c6a4e1e97ecde92
2019-12-06 16:19:40 +08:00
Paul Hu
b869b18abe Merge "Replace the permission of internal connectivity checks" am: 6be69420df
am: 3256e731e3

Change-Id: I461936789b24940cc81146e9d0fc6c4c455206ed
2019-12-04 08:51:28 -08:00
Xin Li
d88ddd4545 Merge "Merge Android10 QPR1 into AOSP master" am: 2b65793cd6
am: d2e25aa6dd

Change-Id: I3bf58b1afbff9e0a40106771a9f389b1e2c1b940
2019-12-04 08:09:19 -08:00
paulhu
6569cef6a6 Replace the permission of internal connectivity checks
A number of connectivity checks that protect system-only methods
check for CONNECTIVITY_INTERNAL, but CONNECTIVITY_INTERNAL is a
signature|privileged permission. We should audit the permission
checks, and convert checks that protect code that should not be
called outside the system to a signature permission. So replace
all CONNECTIVITY_INTERNAL to other proper permissions.

Bug: 32963470
Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Change-Id: I8f2dd1cd0609056494eaf612d39820e273ae093f
Merged-In: I8f2dd1cd0609056494eaf612d39820e273ae093f
2019-12-04 11:44:45 +08:00
Xin Li
b70005bd44 Merge Android10 QPR1 into AOSP master
Bug: 145570283
Change-Id: I557701733b49b0f231c89165239ba07c0fa288d2
2019-12-02 21:25:07 -08:00
Mark Chien
34fb10e5ee Merge changes from topic "tether_migrate" am: 3c38c89a12
am: 7ee15b3bd9

Change-Id: Ice864e02b2ef9da73f5a69e0668b6856e718988f
2019-11-30 04:31:35 -08:00
markchien
a21bc5f2a8 [Tether07] Migrate Tethering into module am: 4686dd8958
am: 6737c8ba3b

Change-Id: I6e71b418b7303d37144532ab056c21ccbefcb554
2019-11-30 04:31:28 -08:00
Mark Chien
7ee15b3bd9 Merge changes from topic "tether_migrate"
am: 3c38c89a12

Change-Id: I03e43b7a112f91637941e5193bd21b3e714f5dac
2019-11-30 04:26:07 -08:00
markchien
6737c8ba3b [Tether07] Migrate Tethering into module
am: 4686dd8958

Change-Id: I1aaa034e91eae2d6e9abcbbd70741a54a18b3ddc
2019-11-30 04:25:57 -08:00
Mark Chien
3c38c89a12 Merge changes from topic "tether_migrate"
* changes:
  [Tether10]Remove UserManagerInternal usage in Tethering
  [Tether07] Migrate Tethering into module
  [Tether07] Clean up build rule for libtetheroffloadjni
2019-11-30 12:17:47 +00:00