Commit Graph

193 Commits

Author SHA1 Message Date
Chalard Jean
63a9f58437 Merge "Expose netId by adding getter API" am: dd9c1f56fc
Change-Id: Iab3bae76255fb4096aa3b2c9da8d6f12bb588d3e
2020-03-25 02:44:04 +00:00
Chalard Jean
dd9c1f56fc Merge "Expose netId by adding getter API" 2020-03-25 02:23:03 +00:00
Treehugger Robot
232904e22b Merge "Add a log message if enabling Ethernet tethering if it is already enabled." am: 93a404041d
Change-Id: I615b8ebc69de6d35a8dcc4e64f578c3687d279cc
2020-03-24 15:13:07 +00:00
Treehugger Robot
93a404041d Merge "Add a log message if enabling Ethernet tethering if it is already enabled." 2020-03-24 14:54:44 +00:00
Lorenzo Colitti
6976fae02e Add a log message if enabling Ethernet tethering if it is already enabled.
Test: builds
Bug: 150644681
Change-Id: I68123e6dd04ccae5da2ecd7526c11d9f835d1d57
2020-03-24 13:28:53 +00:00
markchien
58e3896aa8 Expose netId by adding getter API
Bug: 151156820
Test: m
      atest TetetheringTests

Clean CP from ag/10747732

Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
Merged-In: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
2020-03-24 09:19:26 +00:00
Junyu Lai
aef3194eca Merge "Address API council review comment about TetheringRequest" am: 0d8b1cfa6d
Change-Id: I7c674dcf0ed946b049784a02126cb2f6436bd4cb
2020-03-23 09:58:02 +00:00
junyulai
a8b377747b Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests
Bug: 152055812
Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8
Merged-In: I0158d88e364772f9ac258bd18955edcdad266ad8
(this is a clean cherry-pick from ag/10796412)

Change-Id: I64f1527d79085cc5dfd78c01a6c49c4df87c82e7
2020-03-23 14:14:22 +08:00
Remi NGUYEN VAN
f1d5385bde Merge changes from topic "netstack_constant_cherrypick" am: 1cd0dcc4a9
Change-Id: I4fa3f771fe93e9b6024828d9c725502629c1ccff
2020-03-23 03:48:08 +00:00
Remi NGUYEN VAN
1cd0dcc4a9 Merge changes from topic "netstack_constant_cherrypick"
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-23 03:33:58 +00:00
Remi NGUYEN VAN
fd50cff7c6 Remove usage of Context.NETWORK_STACK_SERVICE
The NetworkStack.getService() API should be used instead.

Bug: 151243982
Test: atest FrameworksNetTests TetheringTests
      Manual tethering test
Merged-In: I7855090bffbe895c8349ad4903b8f2eb55515f0b
(clean cherry-pick from internal branch)

Change-Id: If4af2846a82605e828287a9a4680d5547b76b802
2020-03-23 11:29:06 +09:00
Anton Hansson
1f47f6af86 Merge "Update tethering module api files" am: 7a25ae95c7
Change-Id: I6c234df71f5fca169da457c2b066ce1e7946a0f4
2020-03-20 14:02:32 +00:00
Anton Hansson
7a25ae95c7 Merge "Update tethering module api files" 2020-03-20 13:50:24 +00:00
Anton Hansson
4168cea5e1 Update tethering module api files
Bug: 147768409
Test: m checkapi
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
Change-Id: I3da71661048b1f66522696e9333c2c14a224fe9f
2020-03-20 13:49:34 +00:00
Anton Hansson
5f6db2c1f9 Merge "Add individual API tracking files for modules" am: 4dd8a42cff
Change-Id: I0e1d85dc1bc3936ed849a86bff3a4722deb897d9
2020-03-20 13:01:11 +00:00
Anton Hansson
4dd8a42cff Merge "Add individual API tracking files for modules" 2020-03-20 12:47:52 +00:00
Paul Hu
cb2d2f984c Merge "[TNU1.1] Update tethering notification strings" am: 7f69e09d79
Change-Id: I2b47fc153faeaf63a29b19d9773fb29b305fe2c8
2020-03-20 08:46:24 +00:00
Kumar Anand
74165f0b29 [TNU1.1] Update tethering notification strings
Update string for no upstream and cellular roaming notification.

Bug: 145629001
Bug: 147818698
Test: atest TetheringTests
Change-Id: I7302cf351b0a9a42ad5a543f61ab084de189f282
2020-03-19 15:57:33 -07:00
Mark Chien
62be3f6a96 Merge "TetheringManager API clean up" am: 9bfe7f7b3e
Change-Id: I93e9bb5f596fff27de236b56cf21f9edb3c0204a
2020-03-19 16:17:27 +00:00
Treehugger Robot
cc2fb141f3 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: 2dd2453ae0
Change-Id: If0000228b44b9f379c6e1499d7d86d7738889ee2
2020-03-19 16:16:58 +00:00
Mark Chien
9bfe7f7b3e Merge "TetheringManager API clean up" 2020-03-19 16:09:21 +00:00
Treehugger Robot
2dd2453ae0 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" 2020-03-19 15:51:32 +00:00
Treehugger Robot
beac7a732f Merge "Release the interface request when Ethernet tethering is stopped." am: 0cc7c00396
Change-Id: Ia0491c302528ce0a727c1ffa77a1fc3a7508f601
2020-03-19 15:08:46 +00:00
Treehugger Robot
0cc7c00396 Merge "Release the interface request when Ethernet tethering is stopped." 2020-03-19 14:59:12 +00:00
Lorenzo Colitti
d44de5a624 Release the interface request when Ethernet tethering is stopped.
When the Ethernet interface becomes unavailable (e.g., because
the cable was unplugged or the interface was removed), or when
setEthernetTethering(false) is called, release the Ethernet
interface request.

This ensures that:
- The Ethernet interface immediately becomes available for use in
  client mode.
- If an interface later becomes available, tethering is not
  automatically started. This is consistent with what happens for
  other downstream types such as wifi and USB. Evey time one of
  those downstreams goes down, tethering is stopped and will not
  be restarted.

Test: manual
Bug: 148824036
Change-Id: Iaf85e800569f2e08c39f7ebb96f8aa34f6e53133
2020-03-19 22:35:28 +09:00
markchien
ec0b68d491 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
Merged-In: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 11:36:07 +00:00
markchien
8146b56d01 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: I45cb21d5bc919f6d32c42650326597d5173ea028
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 19:32:50 +08: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
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
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
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
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
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
dfc41a2298 Merge "Create all variants of stubs for tethering" am: 9814b482cb
Change-Id: Ib819726e0409806ea38d2d5e2ef22f9affb96c93
2020-03-17 08:25:33 +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
fd2db9bf0a Merge "Change TetheringConstants class to final" am: 0c5f387efe
Change-Id: I3446ad5a368b9f127066ba1e133a7191afe80c2b
2020-03-16 05:33:55 +00:00
Mark Chien
0c5f387efe Merge "Change TetheringConstants class to final" 2020-03-16 05:25:40 +00:00
Automerger Merge Worker
52534a2358 Merge "Give tethering bluetooth privilege permission" am: 1d68778a35
Change-Id: I4410ec8ae4331b663fe22edfd2705e3126ae1d82
2020-03-16 04:48:50 +00:00
Mark Chien
1d68778a35 Merge "Give tethering bluetooth privilege permission" 2020-03-16 04:46:44 +00:00
Automerger Merge Worker
be47eb855f Merge "[SP21] Address comments for API council review about aosp/1172143" am: 12b21035c4
Change-Id: Ief866c87b9e69b892fca435e8555080ffdad4af7
2020-03-16 03:05:06 +00:00
Automerger Merge Worker
7d28e4e36e Merge "Cleanup the TetheredClients API" am: 89711eaefe
Change-Id: I3aa44ae9b4d9ec5c34bca067d1ec2486d9dbb2c0
2020-03-16 03:04:26 +00:00
Automerger Merge Worker
2a24054c31 [SP21] Address comments for API council review about aosp/1172143 am: 5752baa6b6
Change-Id: I8634d6f6ed65ec6b10009a90b147881fe1fc4530
2020-03-16 03:03:51 +00:00
Junyu Lai
12b21035c4 Merge "[SP21] Address comments for API council review about aosp/1172143" 2020-03-16 02:41:19 +00:00
markchien
4b896ba32b Change TetheringConstants class to final
Bug: 151322331
Test: m doc-comment-check-docs
Change-Id: Ia02be3d1d91a08ae4a56b25560ed448c96a693db
2020-03-15 22:54:57 +08:00