Commit Graph

1921 Commits

Author SHA1 Message Date
TreeHugger Robot
ada657048c Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-01-03 17:58:18 +00:00
Tobias Thierer
190a471c2c Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-01-03 17:53:55 +00:00
Daulet Zhanguzin
c120601182 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Exempt-From-Owner-Approval: Global refactoring.
Change-Id: Idb1b6ba41af3b52f3376b1157259af3c30328c4e
2020-01-03 17:53:30 +00:00
Automerger Merge Worker
c67821916c Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" am: 2ee360b058 am: 5727033c3a am: af83fe4801
Change-Id: I54b4c3268878a10583dc6a4cf07f07588f0ca6cf
2020-01-03 16:31:22 +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
Daulet Zhanguzin
634844fe4a Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I42117ebfb640e3b0b133183e5e146860bed8471a
2019-12-30 15:41:28 +00:00
Artur Satayev
d55b2c8674 Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 16:55:30 +00:00
Automerger Merge Worker
a8ebc95eb4 Merge "Update interface quota limit when network stats updated" am: 2dcf4c0227 am: a992b3aa83 am: 661741804d
Change-Id: I118f05adf0d5fc4aa665d45b3896d898dfeb3924
2019-12-19 10:37:39 +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
Artur Satayev
fb1d015c12 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
2019-12-18 20:44:45 +00:00
Artur Satayev
c6dee71164 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
2019-12-18 16:37:37 +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
Jeffrey Huang
47427d1d45 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00
Aaron Huang
2fc1d26363 Merge "Add TrafficStats methods to public APIs" am: 8aed6e69f0 am: 1abb8de060
am: e58fff9f29

Change-Id: Iaf7fe6ba60048daecfde44c8348f68727b245d98
2019-12-06 03:19:38 -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
Jeffrey Huang
f9f6d87ced Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00
Automerger Merge Worker
89843fe9cb [automerger skipped] Merge "Replace the permission of internal connectivity checks" am: 6be69420df am: b869b18abe -s ours
am skip reason: Change-Id I8f2dd1cd0609056494eaf612d39820e273ae093f with SHA-1 a262cc1154 is in history

Change-Id: Ib7fe99ba9f914d33da3145b926568bcbe418e6b2
2019-12-04 20:01:55 +00:00
Automerger Merge Worker
b1188209dd Merge "Merge Android10 QPR1 into AOSP master" am: 2b65793cd6 am: d88ddd4545
Change-Id: Ia31d8ba0396b6a5bf63863b4318b7543283851b2
2019-12-04 16:58:08 +00: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
a262cc1154 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
2019-12-04 11:45:51 +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
9e2676c58d [automerger skipped] Merge changes from topic "tether_migrate" am: 3c38c89a12 am: 7ee15b3bd9
am: 34fb10e5ee -s ours
am skip reason: change_id I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1 with SHA1 1ddfba4a60 is in history

Change-Id: I630b00c69238730fe5aa267a658f93edb236acc6
2019-11-30 04:36:38 -08:00
markchien
4663d8e042 [automerger skipped] [Tether07] Migrate Tethering into module am: 4686dd8958 am: 6737c8ba3b
am: a21bc5f2a8 -s ours
am skip reason: change_id I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3 with SHA1 87f0b94f3b is in history

Change-Id: Ie6a28a142e2cf75adfc3d1a45d87e9daa67423e4
2019-11-30 04:36:30 -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
markchien
4686dd8958 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
markchien
87f0b94f3b [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-29 07:05:21 +00:00
Jayachandran Chinnakkannu
b8079c2db7 Merge "Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)" am: 9dcbd6de87 am: 19a25b3ee5
am: 0f6bb0af4e

Change-Id: I8a7f28feb66265be2379beda7bc3fce732e4a294
2019-11-26 09:37:25 -08:00
Jayachandran Chinnakkannu
0f6bb0af4e Merge "Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)" am: 9dcbd6de87
am: 19a25b3ee5

Change-Id: I916e810b6350be9c1a6b24f2a652e05a1fa444fa
2019-11-26 09:31:33 -08:00
Jayachandran Chinnakkannu
19a25b3ee5 Merge "Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)"
am: 9dcbd6de87

Change-Id: Iada558f0d94e08281b6e41825946e5b807618da6
2019-11-26 09:26:07 -08:00
Jayachandran C
27d08940e0 Remove usage of hidden API TelephonyManager.getNetworkTypeName(int)
This CL deletes the reference to this API as its used in a dead code
which is used for debugging only.

Bug: 140908357
Test: Build
Change-Id: I9fa1996ab5fdb5ab884128d06c2e92bab164dea7
2019-11-25 15:19:47 -08:00
Jayachandran Chinnakkannu
27ee5f7d0c Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 73e22ad21d am: 59a00010fb
am: c71f5fc937

Change-Id: Ief1f090f3664d583565f291c89357bfbac58fe17
2019-11-18 01:09:40 -08:00
Jayachandran Chinnakkannu
c71f5fc937 Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 73e22ad21d
am: 59a00010fb

Change-Id: I7613a654dd726bcf5428a5a07ad4369f616bbcfa
2019-11-18 01:05:02 -08:00
Jayachandran Chinnakkannu
59a00010fb Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"
am: 73e22ad21d

Change-Id: I555617ff893acf4c53e6a73d6591b6aaebf3ce50
2019-11-17 22:30:01 -08:00
Jayachandran C
270197bc8d Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL replaces with getSystemService(TelephonyManager.class)

Bug: 140768340
Test: atest frameworks/base/tests/net
Change-Id: I0f14cc5440fa85c81ab90f3199e9e91c1b00f5e1
2019-11-15 19:26:33 -08:00
Artur Satayev
8b319523fe [automerger skipped] Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa am: 5f7358da57
am: 5103212960 -s ours
am skip reason: change_id Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6 with SHA1 817cc44c62 is in history

Change-Id: I1e9b0579e65071e042c4595083427bcc7889c15e
2019-11-13 14:05:06 -08:00
Artur Satayev
5103212960 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa
am: 5f7358da57

Change-Id: Ic691d764839ecf34daa8b53aa92497e013c9a2a7
2019-11-13 10:40:54 -08:00
Artur Satayev
5f7358da57 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps."
am: a98026f7aa

Change-Id: Ia39fbc2200aa7262e4a05b0710b7a382bb01b276
2019-11-13 10:33:06 -08:00
Artur Satayev
122a87695f Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 15:05:56 +00:00
Artur Satayev
817cc44c62 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Joshua Baxter
c528439458 docs: fix a couple of minor typos am: 6eae9bbc0f am: 46cc54fd21 am: ffcb948028
am: a3ef3d991c

Change-Id: I7737e9479ef6adc1ebe4c0e828eb4516daf20c0d
2019-11-06 14:17:40 -08:00