Commit Graph

14683 Commits

Author SHA1 Message Date
Chalard Jean
5b5731cfb1 Enable policy ranking
Test: Passes all presubmits, been tested in labs
Bug: 184834350
Change-Id: If33884aa245bcc8817bbc9c2fdfab035249e7301
2021-04-21 11:16:44 +00:00
James Mattis
5e6b7f9aa2 Merge "Correctly count nri uid request counts" am: 5ab962df61 am: b039be7617 am: d2c14296e4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655051

Change-Id: Ibec1f37f2062827cf390eb344dd30447bdabec13
2021-04-21 03:17:13 +00:00
James Mattis
d2c14296e4 Merge "Correctly count nri uid request counts" am: 5ab962df61 am: b039be7617
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655051

Change-Id: If4ff10a4793cee3a00aa1d66bf85af19f9e88b72
2021-04-21 02:52:41 +00:00
James Mattis
b039be7617 Merge "Correctly count nri uid request counts" am: 5ab962df61
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655051

Change-Id: I5ab86516030c8758b77c7335da68fd4f01b34a60
2021-04-21 02:23:29 +00:00
James Mattis
5ab962df61 Merge "Correctly count nri uid request counts" 2021-04-21 02:06:33 +00:00
Nazanin Bakhshi
e7897d5495 Merge "Refactoring and mocking to make sure unit test doesn't call the real service" am: 348f5cb01e am: 3779168261 am: deab38d5bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1668228

Change-Id: I92c9fc5f4dcfc0a7f80db78b885945a1021eab20
2021-04-20 17:13:46 +00:00
Nazanin Bakhshi
deab38d5bb Merge "Refactoring and mocking to make sure unit test doesn't call the real service" am: 348f5cb01e am: 3779168261
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1668228

Change-Id: I1a398667cc0a51d0454fb956be8f08871c23af6e
2021-04-20 16:50:40 +00:00
Nazanin Bakhshi
3779168261 Merge "Refactoring and mocking to make sure unit test doesn't call the real service" am: 348f5cb01e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1668228

Change-Id: Iaaa8635c0c1031f6b7e896c879de9744a1215f54
2021-04-20 16:27:56 +00:00
Nazanin Bakhshi
348f5cb01e Merge "Refactoring and mocking to make sure unit test doesn't call the real service" 2021-04-20 15:44:00 +00:00
Treehugger Robot
071a02f92e Merge "Roll forward: add a test for ParseException" am: 55b86dd028 am: 90d389d11f am: 71c81897d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679759

Change-Id: I7b1b1be4fa5bcda94b653dffbc99db65384079ad
2021-04-20 13:12:32 +00:00
Remi NGUYEN VAN
934e933056 Merge "Revert "Add a test for ParseException"" am: 060026feca am: 2d467a1678 am: 3116f6f958
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679758

Change-Id: I9257db040086870412833e8cfb14596f6ac17288
2021-04-20 13:12:01 +00:00
Treehugger Robot
ed8602bbde Merge "Update TEST_MAPPING imports for connectivity" am: e063867f7b am: da2dfee6d5 am: 39b23dc413
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680905

Change-Id: I1acd627f5316b88739c1d10fb5c788751d62938e
2021-04-20 13:10:22 +00:00
Treehugger Robot
71c81897d6 Merge "Roll forward: add a test for ParseException" am: 55b86dd028 am: 90d389d11f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679759

Change-Id: Ie86bf592435383da29eb8b53590d1e208ffd0a2b
2021-04-20 10:22:40 +00:00
Remi NGUYEN VAN
3116f6f958 Merge "Revert "Add a test for ParseException"" am: 060026feca am: 2d467a1678
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679758

Change-Id: Ib586e908b31ccb2c2054ec99ae1be2dea4d39988
2021-04-20 10:22:30 +00:00
Treehugger Robot
90d389d11f Merge "Roll forward: add a test for ParseException" am: 55b86dd028
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679759

Change-Id: I17938abef561d95347869084114ee08f90d81db5
2021-04-20 10:13:47 +00:00
Treehugger Robot
55b86dd028 Merge "Roll forward: add a test for ParseException" 2021-04-20 10:03:56 +00:00
Remi NGUYEN VAN
2d467a1678 Merge "Revert "Add a test for ParseException"" am: 060026feca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1679758

Change-Id: Ifb852d9264a6e1fc5ce82a5eb35d66459a021599
2021-04-20 09:52:35 +00:00
Treehugger Robot
39b23dc413 Merge "Update TEST_MAPPING imports for connectivity" am: e063867f7b am: da2dfee6d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680905

Change-Id: I0d5d0be2d59eca6447419a92039be82a0769a5b4
2021-04-20 09:31:43 +00:00
Remi NGUYEN VAN
060026feca Merge "Revert "Add a test for ParseException"" 2021-04-20 09:25:07 +00:00
Treehugger Robot
da2dfee6d5 Merge "Update TEST_MAPPING imports for connectivity" am: e063867f7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680905

Change-Id: I100470cc936fca8dba86a1ad083d4d67139b6aea
2021-04-20 09:06:31 +00:00
Remi NGUYEN VAN
8cb7d32b1a Update TEST_MAPPING imports for connectivity
Connectivity CTS tests were moved from cts/tests/net to
packages/modules/Connectivity.

Bug: 185751610
Change-Id: Id4efd99c419706a52ad5d708888097bd6312d4e6
Test: treehugger is needed to test
2021-04-20 07:10:41 +00:00
Remi NGUYEN VAN
96dc675760 Roll forward: add a test for ParseException
The test simply creates an exception and verifies that it has the
required fields.

The constructor tests are only run on S+ as they are not part of the
API before that.

Change-Id: Ic30a34d3203c1b40923ba783a34f0cfed53a07ae
Test: atest FrameworksNetTests
2021-04-20 16:04:33 +09:00
Remi NGUYEN VAN
7696391a92 Revert "Add a test for ParseException"
This reverts commit 98bab00fc9.

Reason for revert: Test broken on R: b/185751610

Change-Id: I9f5d25c0ba81011848ab3cf7ec44aa329fbb3b0f
2021-04-20 16:04:33 +09:00
markchien
20a8e9413f Change Connectivity resources SDK version to 30
S tethering module fail to sideload in R platform because package
manager fail to parse S version sdk in R platform.

Bug: 182409819
Test: m
Change-Id: I35c63e4bfe7657afe1e7364926ab139b042b403e
2021-04-20 14:19:01 +08:00
James Mattis
fff0b7ce6d Correctly count nri uid request counts
Correctly count nri uid request counts in the per-app functionality in
connectivity currently used by set profile and set oem network
preference APIs. Previously, upon creation, nris would be created prior
to removing them. This would cause the uid request counts to
artificially increase and incorrectly throw an error if the request
count limit was hit even though in actuality an apps request count was
valid.

E.g., if there was an existing request for per-app functionality and
its owning app made a change to the per-app requests, it would double
count the existing requests. If the current count was say, one under the
limit, an error would be thrown even though it was being replaced which
should have resulted in no net change to the request count limit if
working correctly.

This patch will allow for the requests to be removed prior to creation
so that request counts are tabulated correctly.

Bug: 185849563
Bug: 183785319
Test: atest FrameworksNetTests
Change-Id: I13da0c81256cc02bea6aff2fe1ef99d6f6b0e764
2021-04-19 19:28:23 -07:00
Nazanin
8d18299e28 Refactoring and mocking to make sure unit test doesn't call the real service
Bug: 180938364
Test: utest
Change-Id: Ic6a5a84c1d985fa02f8cf52c8c2ff144669b30c1
2021-04-19 17:12:05 -07:00
Aaron Huang
b4f36cd5f8 Merge "Rename getAllNetworkStateSnapshot which should be pluralized" into sc-dev 2021-04-19 16:42:58 +00:00
Chiachang Wang
a5b7b9cfd8 Merge "Update the permission check for dump" am: 8df8f29f8b am: 1e46f3f547 am: 2f059d6005
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1678985

Change-Id: Ie43488b368a8bae1c75b4228f2214dd540a9b8f7
2021-04-19 06:20:15 +00:00
Remi NGUYEN VAN
8917ed4069 Merge "Add a test for ParseException" am: dfb51531e6 am: 3a21c84b20 am: e3f7c9ef21
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675625

Change-Id: I303ef3cdfaddf6b7a4aea661dbbceb7ab8d3eeca
2021-04-19 06:19:46 +00:00
Chiachang Wang
2f059d6005 Merge "Update the permission check for dump" am: 8df8f29f8b am: 1e46f3f547
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1678985

Change-Id: Id4c40e177621f39174cd4cf6cd39cc40033302b8
2021-04-19 06:18:01 +00:00
Chiachang Wang
1e46f3f547 Merge "Update the permission check for dump" am: 8df8f29f8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1678985

Change-Id: I48703e74bea2a878ded3850dc5be6ec12e5c8e87
2021-04-19 05:52:38 +00:00
Remi NGUYEN VAN
e3f7c9ef21 Merge "Add a test for ParseException" am: dfb51531e6 am: 3a21c84b20
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675625

Change-Id: I17a061ba6395b03250bca4162efe2d439113e1e6
2021-04-19 05:42:08 +00:00
Chiachang Wang
8df8f29f8b Merge "Update the permission check for dump" 2021-04-19 05:37:09 +00:00
Remi NGUYEN VAN
3a21c84b20 Merge "Add a test for ParseException" am: dfb51531e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675625

Change-Id: I2ef380a3b4c2f0170c77baa11ca3cbcf10b21bed
2021-04-19 05:19:30 +00:00
Remi NGUYEN VAN
dfb51531e6 Merge "Add a test for ParseException" 2021-04-19 04:57:31 +00:00
Chiachang Wang
70348a2672 Update the permission check for dump
ServicePermissionsTest#testDumpProtected expects to see nothing
from dump() if the caller does not have the required permission.

After the refactor the ConnectivityService#dump(). It does not
leak real information for those callers without permission but
show the title of dumpsys, i.e. it shows "DUMP OF SERVICE HIGH
connectivity". This breaks the test since the test expects to
see nothing.

Move the permission check to the front of dump call stack since
there is no way to call other private dump related methods.

Bug: 185425662
Test: atest android.security.cts.ServicePermissionsTest
Test: adb shell dumpsys connectivity
Change-Id: I173c968a4f1c4d6f618ed87725a6ccda8d309988
2021-04-19 11:09:15 +08:00
Aaron Huang
20605e540a Rename getAllNetworkStateSnapshot which should be pluralized
Address API review feedback, ConnectivityManager#getAllNetworkStateSnapshot
should be pluralized so rename the method to getAllNetworkStateSnapshots

Bug: 183972554
Test: make, FrameworksNetTests
      FrameworksServicesTests
Change-Id: Ic18d17d05984fa2466c962c7843c0ef7183ce77c
2021-04-17 14:08:49 +08:00
Junyu Lai
e41512c1bd [automerger skipped] Merge "[VCN20] Change requestBackgroundNetwork argument order" am: bd7b4a4a65 am: 0e6e9b34a0 am: a0808bbac3 -s ours
am skip reason: skip tag Change-Id Id281678fe85ce0894b0e92e11c0283d4d1b4ecdb with SHA-1 56ed9a3349 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675630

Change-Id: Icd3d0fe11a9de3c98d55fb91e935dc537a28af48
2021-04-16 17:16:07 +00:00
Junyu Lai
a0808bbac3 Merge "[VCN20] Change requestBackgroundNetwork argument order" am: bd7b4a4a65 am: 0e6e9b34a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675630

Change-Id: I2b4369cb4127f130076ced52ba020db99f617cd7
2021-04-16 16:52:07 +00:00
Junyu Lai
0e6e9b34a0 Merge "[VCN20] Change requestBackgroundNetwork argument order" am: bd7b4a4a65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675630

Change-Id: I73df5528088176070af6e54e01358b1edec27b50
2021-04-16 16:25:55 +00:00
Junyu Lai
bd7b4a4a65 Merge "[VCN20] Change requestBackgroundNetwork argument order" 2021-04-16 16:04:31 +00:00
Junyu Lai
d175339d58 Merge "[VCN19] Rename get/setSubIds to get/setSubscriptionIds" into sc-dev 2021-04-16 15:59:16 +00:00
TreeHugger Robot
6b6eabfea8 Merge "[NS13] Remove the last usage of the legacy int" into sc-dev 2021-04-16 11:09:37 +00:00
Chalard Jean
3d71e308e0 [NS13] Remove the last usage of the legacy int
Note that this requires removing part of a test, because
that part is testing that the a 50 bonus of the legacy
int is stronger than the validation penalty, which is
not a mechanic we want to have. When WiFi is unvalidated
and cell is unvalidated, cell should be kept in case it
validates, like is described in comments in
isNetworkPotentialSatisfier ; however this test is
checking that it *IS* reaped off if the wifi score is
strong enough. This should be incorrect, and should not
be tested, so this patch removes the check.

Test: ConnectivityServiceTest
Bug: 184834350
Change-Id: I8966abee59fea2d9f10f082aba87df6588b72762
2021-04-16 18:13:10 +09:00
Lorenzo Colitti
1a4fe368af Merge "Don't expose raw IBinder APIs." am: 6e535a1294 am: 5bc05685a3 am: 0b8438b700
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: Ic45558c739cfb065e5c9d6fb5ebf485ceb9a630f
2021-04-16 08:48:41 +00:00
Aaron Huang
0df7210cf4 Merge "Handle null pointer cases in ConnectivityService" am: 7b38530eac am: 0f2b3c67e7 am: 57a82edf0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669646

Change-Id: I8460ed44fb1bc72a8533d2e57012ccc623f8ca73
2021-04-16 08:47:59 +00:00
Lorenzo Colitti
0b8438b700 Merge "Don't expose raw IBinder APIs." am: 6e535a1294 am: 5bc05685a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: I42ef2c83eefc6dc4967e71be82f48cca38d74f43
2021-04-16 08:13:03 +00:00
Aaron Huang
57a82edf0b Merge "Handle null pointer cases in ConnectivityService" am: 7b38530eac am: 0f2b3c67e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669646

Change-Id: I2821348230f093569e8149779a88d31ce2b0b322
2021-04-16 08:12:18 +00:00
Lorenzo Colitti
5bc05685a3 Merge "Don't expose raw IBinder APIs." am: 6e535a1294
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1676436

Change-Id: Ic954df4bcbb444797d62077047cd74182ac06164
2021-04-16 07:42:57 +00:00
Aaron Huang
0f2b3c67e7 Merge "Handle null pointer cases in ConnectivityService" am: 7b38530eac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669646

Change-Id: I30a02b57b58cbd3197faa614d036daec7ff06bd6
2021-04-16 07:29:00 +00:00