Commit Graph

1530 Commits

Author SHA1 Message Date
markchien
ac580f9826 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 19:10:23 +08:00
Paul Hu
6450a662da Merge "[TNU1.2] Add string for client number notification" am: 2435a6539d am: fea464b4ef
Change-Id: Ia03a708c7f23d5b41be2b165fc48f20f92090c37
2020-03-19 10:59:21 +00:00
Mark Chien
43062b8065 [automerger skipped] Merge "Support static address configuration" into rvc-dev am: 6223b8f4e8 -s ours am: 97e28bd342 -s ours am: 3c8a0c9753 -s ours
am skip reason: Change-Id I0399917e7cefa1547d617e688225544c4fc1a231 with SHA-1 f053e4b6f5 is in history

Change-Id: Ia881348345ad2ede4181453a206250123c7ff247
2020-03-19 10:46:19 +00:00
Paul Hu
fea464b4ef Merge "[TNU1.2] Add string for client number notification" am: 2435a6539d
Change-Id: Ibbead3667ec87cae0f2cd8735dabf77d3d6dd07a
2020-03-19 10:45:24 +00:00
Mark Chien
3c8a0c9753 [automerger skipped] Merge "Support static address configuration" into rvc-dev am: 6223b8f4e8 -s ours am: 97e28bd342 -s ours
am skip reason: Change-Id I0399917e7cefa1547d617e688225544c4fc1a231 with SHA-1 f053e4b6f5 is in history

Change-Id: I178d7b119ce2f11ce03acc5491b87224625d60a6
2020-03-19 10:24:50 +00:00
Mark Chien
97e28bd342 [automerger skipped] Merge "Support static address configuration" into rvc-dev am: 6223b8f4e8 -s ours
am skip reason: Change-Id I0399917e7cefa1547d617e688225544c4fc1a231 with SHA-1 f053e4b6f5 is in history

Change-Id: I8a441c075d7a67f9bb5528c66cbf67df7fbacc60
2020-03-19 10:19:58 +00:00
Mark Chien
6223b8f4e8 Merge "Support static address configuration" into rvc-dev 2020-03-19 10:03:56 +00:00
Anton Hansson
65d1e30c0f Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api check-api
Exempt-From-Owner-Approval: approved internally
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
(cherry picked from commit e7c52c7e3f)
2020-03-19 08:51:11 +00:00
markchien
f1332573bb TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 16:32:37 +08:00
paulhu
1957e6a0fb [TNU1.2] Add string for client number notification
Add string for client number notification

Bug: 122085773
Test: atest TetheringTests
Change-Id: Icc4e59ce3b2d8d4c1c7883c2f9d040d3ce563f09
2020-03-19 15:48:23 +08:00
markchien
dc651f03da Expose netId by adding getter API
Bug: 151156820
Test: m
      atest TetetheringTests
Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
(cherry picked from commit 8831c4b54178753013d568c0b76bbf7487db8122)
2020-03-19 15:57:31 +09:00
Automerger Merge Worker
14a630ce4e Merge "[automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad -s ours am: 4d02c9369a -s ours am: 3c86cbd479 -s ours" into rvc-qpr-dev-plus-aosp 2020-03-19 06:35:26 +00:00
Paul Hu
ec597320e0 [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad -s ours am: 4d02c9369a -s ours am: 3c86cbd479 -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 57e22c5ab9 is in history

Change-Id: I75906f95862b679ddec38f353adca8f84d98ee92
2020-03-19 06:35:22 +00:00
Automerger Merge Worker
52c992ef2a Merge "[automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad am: a8bdb00717 am: ae2488d50b am: c84f62e69a -s ours" into rvc-qpr-dev-plus-aosp 2020-03-19 06:35:20 +00:00
Paul Hu
6900ec60fa [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad am: a8bdb00717 am: ae2488d50b am: c84f62e69a -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 3355cc4f06 is in history

Change-Id: Id85f3640395b4a8ad4daf016015172b237a49e33
2020-03-19 06:35:14 +00:00
Paul Hu
1d729f450f [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad am: a8bdb00717 -s ours am: 7eb214c4c4 -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 3355cc4f06 is in history

Change-Id: I381af2103d8a3d66c92e73ede2615352fbab8160
2020-03-19 06:35:13 +00:00
Paul Hu
3c86cbd479 [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad -s ours am: 4d02c9369a -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 57e22c5ab9 is in history

Change-Id: I512bf5f89f1ae69bfbd1c90ebcd9708824743fea
2020-03-19 06:18:09 +00:00
Paul Hu
7eb214c4c4 [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad am: a8bdb00717 -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 3355cc4f06 is in history

Change-Id: If7c9139689d3e76653f00017a567d39d3612b47c
2020-03-19 06:17:58 +00:00
Paul Hu
4d02c9369a [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 3355cc4f06 is in history

Change-Id: I705409f05587f01fa3e2ebfd1e3f5e7e58002d97
2020-03-19 06:01:14 +00:00
Automerger Merge Worker
9462a3c9f0 Support static address configuration
Application can specify static ipv4 server and client address to setup
tethering and this is one shot configuration. Tethering service would
not save the configuration and the configuration would be reset when
tethering stop or start failure.

When startTethering callback fired, it just mean tethering is requested
successful. Therefore, callers may call startTethering again if
startTethering successful but do not receive following tethering active
notification for a while. Tethering service never actually does anything
synchronously when startTethering is called:
  -startProvisioningIfNeeded just posts a message to the handler thread.
  -enableTetheringInternal doesn't do anything synchronously, it just
  asks the downstreams to get their interfaces ready and waits for
  callbacks.
If tethering is already enabled with a different request,
tethering would be disabled and re-enabled.

Bug: 141256482
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest

Change-Id: I2b2dd965a673e6f1626738d41b5d443f0f9fbd0e
Merged-In: I0399917e7cefa1547d617e688225544c4fc1a231
(cherry picked from commit 5d6723e24e21154bef3967585a8adc069e007f49)
2020-03-19 12:39:46 +08:00
Paul Hu
57e22c5ab9 [TNU1.1]Add tethering notification strings
Add string for no upstream and cellular roaming notification.

Bug: 145629001
Bug: 147818698
Test: atest TetheringTests
Change-Id: I30f68d83344f66fb3ef77abf3f8748c3eb1276f0
Merged-In: I30f68d83344f66fb3ef77abf3f8748c3eb1276f0
(cherry picked from aosp/1260112)
2020-03-19 02:55:03 +00:00
Paul Hu
26decd0653 Merge "[TNU1.1]Add tethering notification strings" am: 09bc9bf0b9 am: 7afa946477 am: 9cff3fb9f3 am: fa44aaf188
Change-Id: I99bb9db506ed257d461867764541240ceef37acd
2020-03-19 02:14:31 +00:00
Remi NGUYEN VAN
187793f0b2 Merge changes from topic "netstack_api_review" into rvc-dev am: 06b45ca764 am: 59c179fe57 am: a3fb98a404
Change-Id: I329d99d2d497bac4934a19e64b6f9dd44bcf4ae1
2020-03-19 02:12:35 +00:00
Remi NGUYEN VAN
1a284dd631 Merge changes from topic "netstack_api_review" into rvc-dev am: 06b45ca764 am: bd5a4e48ad am: 3ec748ae7c
Change-Id: I5d1266da521ab666227e7c439bcb5868358ced7b
2020-03-19 02:10:21 +00:00
Paul Hu
fa44aaf188 Merge "[TNU1.1]Add tethering notification strings" am: 09bc9bf0b9 am: 7afa946477 am: 9cff3fb9f3
Change-Id: Ibadef4f8b47240dc3186ca7c9e0e2f95e0260545
2020-03-19 02:06:41 +00:00
Remi NGUYEN VAN
a3fb98a404 Merge changes from topic "netstack_api_review" into rvc-dev am: 06b45ca764 am: 59c179fe57
Change-Id: If15c30d0ff420eb8872d06cc34242dce94beeb22
2020-03-19 02:04:12 +00:00
Remi NGUYEN VAN
3ec748ae7c Merge changes from topic "netstack_api_review" into rvc-dev am: 06b45ca764 am: bd5a4e48ad
Change-Id: I1ae96f7fc1ed1289e6aadd63a3b6631c2fab622e
2020-03-19 01:53:30 +00:00
Paul Hu
9cff3fb9f3 Merge "[TNU1.1]Add tethering notification strings" am: 09bc9bf0b9 am: 7afa946477
Change-Id: I8f2e406c8abb7c2cf0443198b78fb739018993ab
2020-03-19 01:45:42 +00:00
Paul Hu
7afa946477 Merge "[TNU1.1]Add tethering notification strings" am: 09bc9bf0b9
Change-Id: If2d4ec6631a903659889089e287dc489cd9cb163
2020-03-19 01:36:36 +00:00
Paul Hu
09bc9bf0b9 Merge "[TNU1.1]Add tethering notification strings" 2020-03-19 01:33:01 +00:00
Remi NGUYEN VAN
59c179fe57 Merge changes from topic "netstack_api_review" into rvc-dev am: 06b45ca764
Change-Id: Iddd40677121e331eb50b74aa379dabaf4632219d
2020-03-19 01:30:57 +00:00
Remi NGUYEN VAN
06b45ca764 Merge changes from topic "netstack_api_review" into rvc-dev
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-19 01:21:29 +00:00
markchien
245352ed07 Assign specific client address to dhcp server
Bug: 141256482
Test: manual
      atest TetheringTests

Change-Id: Ief76c98c843ba5420224cbf0f34464f366c891b7
2020-03-19 01:47:25 +08:00
Anton Hansson
95495bf36c [automerger skipped] Merge "Add individual API tracking files for modules" into rvc-dev am: 4693140499 -s ours am: 424426ad20 -s ours am: 2a4f2ec6a9 -s ours
am skip reason: Change-Id Iaf2ef5b5751eb208d119ddbc74481239366fe581 with SHA-1 a5428687e4 is in history

Change-Id: I8e128a279e8ca746bfff52d0d0a7223f79e3bae8
2020-03-18 16:29:27 +00:00
Anton Hansson
2a4f2ec6a9 [automerger skipped] Merge "Add individual API tracking files for modules" into rvc-dev am: 4693140499 -s ours am: 424426ad20 -s ours
am skip reason: Change-Id Iaf2ef5b5751eb208d119ddbc74481239366fe581 with SHA-1 a5428687e4 is in history

Change-Id: Ibc7f6be60ed3d9460cc01de3aa33027609acd442
2020-03-18 16:16:16 +00:00
Anton Hansson
424426ad20 [automerger skipped] Merge "Add individual API tracking files for modules" into rvc-dev am: 4693140499 -s ours
am skip reason: Change-Id Iaf2ef5b5751eb208d119ddbc74481239366fe581 with SHA-1 a5428687e4 is in history

Change-Id: I7d747bc98bb8e6114956ea503d894f8b30fda46b
2020-03-18 16:15:49 +00:00
Anton Hansson
7bd3af51d5 Add individual API tracking files for modules am: a5428687e4 am: 2d539f230d
Change-Id: I381ab8289a28877a2b6bf7be7bee6fd9e23a60cd
2020-03-18 13:49:35 +00:00
Anton Hansson
2d539f230d Add individual API tracking files for modules am: a5428687e4
Change-Id: I2556fecd5628f6fcf081d46b4e929e8cf4b88fcb
2020-03-18 13:34:13 +00:00
Anton Hansson
a5428687e4 Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api
Exempt-From-Owner-Approval: Approved in master
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
(cherry picked from commit b602b0b2f18d96866a5d7e5d27958af774d1f802)
2020-03-18 13:14:20 +00:00
Anton Hansson
49bdf5615f Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api
Exempt-From-Owner-Approval: Approved in master
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
2020-03-18 11:03:12 +00:00
Remi NGUYEN VAN
b8fecf4b32 Remove usage of Context.NETWORK_STACK_SERVICE
The NetworkStack.getService() API should be used instead.

Bug: 151243982
Test: atest FrameworksNetTests TetheringTests
      Manual tethering test
Change-Id: I7855090bffbe895c8349ad4903b8f2eb55515f0b
2020-03-18 18:31:39 +09:00
Junyu Lai
3c69be5dc1 [automerger skipped] Merge "[SP25] Rename functions that add Entry conditionally" am: 2a17338e44 am: d1c1d3554e -s ours am: 4f707d613f -s ours am: b7c3feed44 -s ours
am skip reason: Change-Id I9495a198cf247e6c79100f7ac1edcea370b071de with SHA-1 abb0596a0a is in history

Change-Id: I67dd1a6963aa14cf3443af12ba28cd9af74cff44
2020-03-18 04:30:25 +00:00
Junyu Lai
b7c3feed44 [automerger skipped] Merge "[SP25] Rename functions that add Entry conditionally" am: 2a17338e44 am: d1c1d3554e -s ours am: 4f707d613f -s ours
am skip reason: Change-Id I9495a198cf247e6c79100f7ac1edcea370b071de with SHA-1 abb0596a0a is in history

Change-Id: I214ca8cb07535dbe33be18aa9a49d31811451ff5
2020-03-18 04:16:40 +00:00
Junyu Lai
4f707d613f [automerger skipped] Merge "[SP25] Rename functions that add Entry conditionally" am: 2a17338e44 am: d1c1d3554e -s ours
am skip reason: Change-Id I9495a198cf247e6c79100f7ac1edcea370b071de with SHA-1 abb0596a0a is in history

Change-Id: I19399123661123386472ff3f39d268d85917cbe1
2020-03-18 04:02:05 +00:00
Junyu Lai
d1c1d3554e Merge "[SP25] Rename functions that add Entry conditionally" am: 2a17338e44
Change-Id: I7e0698f0e60d4c26864ceb728b74a265351a8506
2020-03-18 03:45:41 +00:00
Junyu Lai
2a17338e44 Merge "[SP25] Rename functions that add Entry conditionally" 2020-03-18 03:16:41 +00:00
paulhu
3355cc4f06 [TNU1.1]Add tethering notification strings
Add string for no upstream and cellular roaming notification.

Bug: 145629001
Bug: 147818698
Test: atest TetheringTests
Change-Id: I30f68d83344f66fb3ef77abf3f8748c3eb1276f0
2020-03-18 09:49:51 +08:00
junyulai
36a172910e [SP25] Rename functions that add Entry conditionally
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.

Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record conditionally,
name them addEntry.
  addValues -> addEntry

Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Fix: 148895143
Change-Id: I9495a198cf247e6c79100f7ac1edcea370b071de
Merged-In: I9495a198cf247e6c79100f7ac1edcea370b071de
(cherry picked from ag/10700816)
2020-03-18 00:29:15 +00:00
junyulai
b2168bc19b [SP25] Rename functions that add Entry conditionally am: abb0596a0a am: 063b3720fa am: 7ba6e2e145
Change-Id: I03ab61b256773bd19fb99fa2698ca13ba0b9fb69
2020-03-18 00:08:47 +00:00
junyulai
e79d222269 [automerger skipped] [SP21] Address comments for API council review about aosp/1172143 am: 4aa86b782b -s ours am: 2770b697e8 -s ours am: 0d3b23946a -s ours
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 5752baa6b6 is in history

Change-Id: I1ba4a8a293f97fc6739a8cd4e5ba3ac443749180
2020-03-18 00:08:39 +00:00