Commit Graph

369 Commits

Author SHA1 Message Date
Mark Chien
e3979608db Merge "Hide startTethering with type function to module-lib only" into rvc-dev am: 69a60ca655
Change-Id: If4fc10359b84121dae7f6c8041f2ea8fc5d6f760
2020-03-19 15:00:53 +00:00
Mark Chien
69a60ca655 Merge "Hide startTethering with type function to module-lib only" into rvc-dev 2020-03-19 14:55:09 +00:00
TreeHugger Robot
8cbb1680bb Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev am: f80f541d16
Change-Id: I03fd96ffe141f5cf5c2448390aba5be9c28fc96a
2020-03-19 13:52:20 +00:00
TreeHugger Robot
f80f541d16 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev 2020-03-19 13:40:51 +00:00
markchien
b1bfea5367 Hide startTethering with type function to module-lib only
Bug: 151918384
Test: m
Change-Id: Icef8b363aae97dd020d618bcb397f661aa6c4750
2020-03-19 21:04:04 +08:00
Mark Chien
8975e298b7 Merge "TetheringManager API clean up" into rvc-dev am: 8a0af9515d
Change-Id: Id093ec8add4777f1d4a2c3d0890378acdc7ceaed
2020-03-19 12:07:18 +00:00
Mark Chien
8a0af9515d Merge "TetheringManager API clean up" into rvc-dev 2020-03-19 12:04:05 +00:00
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
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
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
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
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
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
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
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
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
063b3720fa [SP25] Rename functions that add Entry conditionally am: abb0596a0a
Change-Id: I5f9924cf5b3eccfcdaa6dda991a102b97cebd11a
2020-03-17 23:35:57 +00:00
junyulai
2770b697e8 [automerger skipped] [SP21] Address comments for API council review about aosp/1172143 am: 4aa86b782b -s ours
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 5752baa6b6 is in history

Change-Id: I80ab45b6a34b66f1bed766b3e2fb72926325021e
2020-03-17 23:35:48 +00:00
junyulai
abb0596a0a [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
2020-03-17 14:59:59 +00:00
junyulai
4aa86b782b [SP21] Address comments for API council review about aosp/1172143
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest
Test: atest TetheringTests NetworkStackTests
Test: m doc-comment-check-docs
Fix: 148552904

Change-Id: I141393f229e772d2eb9f7c156849e379bd71b845
Merged-In: I141393f229e772d2eb9f7c156849e379bd71b845
(cherry picked from aosp/1253717)
2020-03-17 14:57:59 +00:00
Automerger Merge Worker
f465942e66 Merge "Support static address configuration" am: 6d175120a0 am: 7ea8df5599
Change-Id: Ia070e65d6a068cdab0b5338b1f6308465586aff0
2020-03-17 14:01:05 +00:00
Automerger Merge Worker
7ea8df5599 Merge "Support static address configuration" am: 6d175120a0
Change-Id: I9637c44f3e88e5e9d08be59a0eb03e019e9919e1
2020-03-17 13:40:34 +00:00
Mark Chien
6d175120a0 Merge "Support static address configuration" 2020-03-17 13:26:09 +00:00
Automerger Merge Worker
822132113a [automerger skipped] Merge "Create all variants of stubs for tethering" am: 9814b482cb am: dfc41a2298 -s ours
am skip reason: Change-Id I0ed44691b4e7080818442a9d0eb37d874f707195 with SHA-1 6a9c68b619 is in history

Change-Id: I857b4d6c0e7bbfc894219b4d0f9dc6997202ab58
2020-03-17 08:44:50 +00:00
Automerger Merge Worker
dfc41a2298 Merge "Create all variants of stubs for tethering" am: 9814b482cb
Change-Id: Ib819726e0409806ea38d2d5e2ef22f9affb96c93
2020-03-17 08:25:33 +00:00
Automerger Merge Worker
44019d6bab [automerger skipped] Merge "Cleanup the TetheredClients API" into rvc-dev am: 677a3b5e92 -s ours
am skip reason: Change-Id Iecf65859cdeeaac2fa7b817b4f505c510424ac89 with SHA-1 dfdf750417 is in history

Change-Id: I9796cca859f19631e764651a954f10f751b24c39
2020-03-17 04:51:46 +00:00
Remi NGUYEN VAN
677a3b5e92 Merge "Cleanup the TetheredClients API" into rvc-dev 2020-03-17 04:49:06 +00:00
Automerger Merge Worker
136156cc5d [automerger skipped] Merge "[TNU01] Add Tethering notification updater" into rvc-dev am: 517ca12acd -s ours
am skip reason: Change-Id I7faacde7ac84e93ea0dfe03dd33d2cc41c589225 with SHA-1 08294f9c09 is in history

Change-Id: I23d80e43b908b8c163221db24a6367009dd5ad77
2020-03-17 01:46:25 +00:00
Paul Hu
517ca12acd Merge "[TNU01] Add Tethering notification updater" into rvc-dev 2020-03-17 01:38:03 +00:00
markchien
f053e4b6f5 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: I0399917e7cefa1547d617e688225544c4fc1a231
2020-03-17 00:11:16 +08:00
Anton Hansson
064ed493ce Create all variants of stubs for tethering
Add separate publicapi, systemapi and module_libs stubs for tethering.

Bug: 147768409
Test: m
Test: m framework-tethering-stubs-{public,system,module_libs_}api
Change-Id: I0ed44691b4e7080818442a9d0eb37d874f707195
Merged-In: I0ed44691b4e7080818442a9d0eb37d874f707195
2020-03-16 15:54:19 +00:00
Automerger Merge Worker
0010ca0c70 Cleanup the TetheredClients API
Add comments to getters as requested in API review, and remove the
expirationTime private field that was planned to be replaced with
LinkAddress expiration.

Test: atest TetheringTests
Fixes: 150878126
Change-Id: Iecf65859cdeeaac2fa7b817b4f505c510424ac89
Merged-In: Iecf65859cdeeaac2fa7b817b4f505c510424ac89
(cherry picked from commit 594d0eae38c13e2bb03de0b3ae1f8781991c321e)
2020-03-16 10:11:29 +00:00
Automerger Merge Worker
d81a2fc8ec [automerger skipped] Merge "Change TetheringConstants class to final" into rvc-dev am: c78bf0038e -s ours
am skip reason: Change-Id Ia02be3d1d91a08ae4a56b25560ed448c96a693db with SHA-1 4b896ba32b is in history

Change-Id: I51fe5c0cc6e72ed386f380bf8542970a02665869
2020-03-16 09:34:16 +00:00
Automerger Merge Worker
943fb5b686 Change TetheringConstants class to final
Bug: 151322331
Test: m doc-comment-check-docs

Change-Id: Ieca36d81b7799988b8dbb9c0d22de690136303ab
Merged-In: Ia02be3d1d91a08ae4a56b25560ed448c96a693db
(cherry picked from commit 5e2740b24658ba340a6b47a46c89cfd642afe394)
2020-03-16 07:43:05 +00:00
Automerger Merge Worker
f699cd14f5 Merge "Change TetheringConstants class to final" am: 0c5f387efe am: fd2db9bf0a
Change-Id: I5c4a3c1b011b6a0eeda8473b9206c4adf307c168
2020-03-16 05:47:02 +00:00