Commit Graph

14 Commits

Author SHA1 Message Date
markchien
bf62258f8c Bump tethering target sdk version to 31
Also add BLUETOOTH_CONNECT permission which is needed for access
PanService if target sdk 31+. The permission would be granted to
privilege application without prompt.

Also remove the min_sdk_version 29 from AndroidManifest because it is
useless that the Android.bp already define min_sdk_version 30.

$aapt dump xmltree TetheringNext.apk AndroidManifest.xml
N: android=http://schemas.android.com/apk/res/android
  E: manifest (line=19)
    A: android:sharedUserId(0x0101000b)="android.uid.networkstack" (Raw: "android.uid.networkstack")
    A: android:versionCode(0x0101021b)=(type 0x10)0x1f
    A: android:versionName(0x0101021c)="Tiramisu" (Raw: "Tiramisu")
    A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f
    A: android:compileSdkVersionCodename(0x01010573)="Tiramisu" (Raw: "Tiramisu")
    A: package="com.android.networkstack.tethering" (Raw: "com.android.networkstack.tethering")
    A: platformBuildVersionCode=(type 0x10)0x1f
    A: platformBuildVersionName="Tiramisu" (Raw: "Tiramisu")
    E: uses-sdk (line=23)
      A: android:minSdkVersion(0x0101020c)=(type 0x10)0x1e
      A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f
    ....
    E: uses-permission (line=35)
      A: android:name(0x01010003)="android.permission.BLUETOOTH_CONNECT" (Raw: "android.permission.BLUETOOTH_CONNECT")

Bug: 204265450
Test: manual testing bluetooth tethering and TH
Change-Id: I6f821020679b9379cada29f6f0816187545a24fb
2022-01-12 07:24:16 +00:00
Remi NGUYEN VAN
9f4a31af59 Merge "Fix ConnectivityManagerTest initialization on Q" am: 72f59b3019 am: 82a32e3f4a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1740779

Change-Id: I40abcac7db563480fe3c13fb5e0178d7a3629652
2021-06-28 07:40:27 +00:00
Remi NGUYEN VAN
0d54d7992d Fix ConnectivityManagerTest initialization on Q
The test can't have TetheringManager as an argument to methods or a
field, otherwise the test runner will crash when scanning the class for
tests because TetheringManager did not exist in Q. Although
testFactoryReset is already skipped on Q, the test runner would fail
at initialization time, before starting the run.

Use CtsTetheringUtils instead. This ensures that TetheringManager does
not have method signatures or members that reference classes that do not
exist on Q, so the test runner can scan the class successfully before
starting the run.

Bug: 188851796
Test: atest ConnectivityManagerTest on Q
Change-Id: I87488d0f23628a1ef2d7af0242513fcc5401d598
2021-06-28 11:24:27 +09:00
Chiachang Wang
a3df1ed5f1 Merge changes I5d3e448e,Id69ac1d3 am: 02eea987c0 am: b675eba4c1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1711429

Change-Id: Iede15400f50e5e0f37a95f59b924d8b7dd698509
2021-06-03 09:22:36 +00:00
Chiachang Wang
4f5c4c4323 Correct the logic for CtsTetheringUtils.isWifiTetheringSupported
The existing isWifiTetheringSupported only check if tethering side
supports wifi tethering or not but not wifi side. A expected
behavior should include both of them, so add the wifi side check
into the helper function. Also update in the existing caller side
due to a new parameter added.

Bug: 186061922
Test: atest MtsTetheringTestLatestSdk
Change-Id: Id69ac1d30ab2bbf23e870193335b139f54672636
2021-06-01 15:08:48 +08:00
markchien
3a23d2e2a6 Test tethered callback with TetheringInterface
The old callback only report interface list, new callback could provide
the mapping of interface and type. Replace old callback usage in cts
with new callback and check whether old callback could get the correct
interface list by comparing the result between old and new callback.

Bug: 162920185
Bug: 152203943
Test: atest CtsTetheringTest on S
      atest CtsTetheringTestLatestSdk on R
      atest MtsTetheringTestLatestSdk on S and R
Merged-In: I2a0b8c43fb340c3eaed7f0f90464199222a24280
Change-Id: I2a0b8c43fb340c3eaed7f0f90464199222a24280
2021-06-01 14:36:09 +08:00
markchien
82f99f95b7 Test tethered callback with TetheringInterface
The old callback only report interface list, new callback could provide
the mapping of interface and type. Replace old callback usage in cts
with new callback and check whether old callback could get the correct
interface list by comparing the result between old and new callback.

Bug: 162920185
Bug: 152203943
Test: atest CtsTetheringTest on S
      atest CtsTetheringTestLatestSdk on R
      atest MtsTetheringTestLatestSdk on S and R
Ignore-AOSP-First: Its dependences CL is not in aosp currently.

Change-Id: I2a0b8c43fb340c3eaed7f0f90464199222a24280
2021-05-20 09:02:39 +00:00
Mark Chien
540f0d3ce3 Merge "Test mts against last stable api level" am: a59a146b36 am: 9015e276aa am: 726b814899
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1686012

Change-Id: I9d2d08b9c9397c247e2afd54b25a21631233c585
2021-05-14 10:26:06 +00:00
markchien
ac3e0bb7fc Fix MtsTetheringTest fail to access hidden tethering api problem
E.g. Accessing hidden method
Landroid/net/TetheringManager$TetheringInterfaceRegexps;
->getTetherableWifiRegexs()Ljava/util/List; (blacklist, linking, denied)

Bug: 183459282
Test: atest MtsTetheringTest on both R and S platform
Ignore-AOSP-First: change already in AOSP.

Change-Id: I3c5f08615fcf897fac59f2493be5337f78c2fdc7
2021-05-13 15:44:18 +00:00
markchien
7193a1b30e Test mts against last stable api level
Create *LatestSdk variant build target which have target sdk specify
to allow test apk install to released platform.

Bug: 182211575
Test: test S MtsTetheringTest in R device
Change-Id: I4d5c5e8c3d74993a67380e0211da31884cbf8792
2021-05-12 22:11:04 +08:00
Remi NGUYEN VAN
eeeed136e0 Allow connectivity tests to use hidden APIs
The tests have been building against hidden APIs to provide additional
coverage.

Test: m TetheringCoverageTests CtsNetTestCases
Bug: 182859030
Ignore-AOSP-First: needs manual cherry-picks
Change-Id: I37d748411a34f25834214a2412c49aed1423e526
2021-04-01 06:37:53 +00:00
Kimberly Kreider
6413dd84cf Enable networking tests to be included in partial MTS files as well as
full mts.

Test: built locally and verified contents.
Bug: 170318013
Change-Id: Idea798841c067002d7b1f47da73a34052a8ab32c
2021-02-22 14:59:54 -08:00
Bob Badour
97e6be27f6 [LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity
Added SPDX-license-identifier-Apache-2.0 to:
  Tethering/Android.bp
  Tethering/apex/Android.bp
  Tethering/bpf_progs/Android.bp
  Tethering/common/TetheringLib/Android.bp
  Tethering/tests/Android.bp
  Tethering/tests/integration/Android.bp
  Tethering/tests/mts/Android.bp
  Tethering/tests/privileged/Android.bp
  Tethering/tests/unit/Android.bp
  tests/cts/hostside/Android.bp
  tests/cts/hostside/aidl/Android.bp
  tests/cts/hostside/app/Android.bp
  tests/cts/hostside/app2/Android.bp
  tests/cts/hostside/certs/Android.bp
  tests/cts/net/Android.bp
  tests/cts/net/api23Test/Android.bp
  tests/cts/net/appForApi23/Android.bp
  tests/cts/net/jni/Android.bp
  tests/cts/net/native/dns/Android.bp
  tests/cts/net/native/qtaguid/Android.bp
  tests/cts/net/util/Android.bp
  tests/cts/tethering/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I8534c580f0e2a17be146300b67b3604817b64507
2021-02-16 04:09:58 -08:00
markchien
4607c5535b Add the flag and default enable selectAllPrefixRange
Also add MtsTetheringTest which only run if tethering mainline
module is installed.

Bug: 166057846
Bug: 170265597
Test: atest TetheringTests
Change-Id: I434dda81eb5fab700d873a8ff3429b4222f0c7e6
2020-10-19 16:50:29 +08:00