summaryrefslogtreecommitdiff
path: root/tests/net/java/com
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Merge changes from topic "restricted-networking-mode"Patrick Rohr2020-12-031-5/+126
| |\ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | * changes: Add Restricted Mode Firewall Chain Clean Up NetworkManagementService Tests
| | * | | | Add Restricted Mode Firewall ChainPatrick Rohr2020-11-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding new allowlist firewall chain to support restricted networking mode. See go/restricted-networking-mode. Bug: b/157505406 Bug: b/170323408 Test: atest NetworkManagementServiceTest Change-Id: I8e39b3d7b129ad74224d0c1311135b7b48f6514f
* | | | | | Clean Up NetworkManagementService Tests am: 73a74fa6dd am: b2e7bdd8ac am: ↵Patrick Rohr2020-12-031-5/+119
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d64997a880 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1505233 Change-Id: I24c7401ae08da82ad8e03db1b507abe50e92dd1b
| * \ \ \ \ \ Clean Up NetworkManagementService Tests am: 73a74fa6ddPatrick Rohr2020-12-031-5/+119
| |\ \ \ \ \ \ | | |/ / / / / | |/| / / / / | | |/ / / / | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1505233 Change-Id: Ia14b1784f36d54f0ba73d5841afedcf8a55a18f2
| | * | | | Clean Up NetworkManagementService TestsPatrick Rohr2020-11-301-5/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up tests, so I can easily add more for restricted networking mode. I merged the NetworkManagementInternalTests with the NetworkManagementServiceTests. Test: atest NetworkManagementServiceTest Change-Id: If8c3cc1883cfb2524eeb78e23165fc868130f0e7
* | | | | | Merge changes Ic5a3e169,I76daa3ab am: 8ca385688d am: 88f10e63bb am: bb86b5e45eLorenzo Colitti2020-12-022-107/+115
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1512888 Change-Id: If54ea6526d4426e6e52eec40c72f3ddd625842fe
| * | | | | Merge changes Ic5a3e169,I76daa3abLorenzo Colitti2020-12-022-107/+115
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Refactor applyUnderlyingCapabilities and its test. Move applyUnderlyingCapabilities to ConnectivityService.
| | * | | | | Refactor applyUnderlyingCapabilities and its test.Lorenzo Colitti2020-12-021-59/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces verbose assertions and makes the test more compact. I'm not sure whether it's actually more valuable, since the current code, while more verbose, is probably more straightforward to understand. Also add a test for passing in a null underlying network (i.e., follow default network). This requires a minor refactoring in ConnectivityService because the applyUnderlyingCapabilities does not currently treat null specially. Bug: 173331190 Test: test-only change Change-Id: Ic5a3e16969ea9e1a529706850f148cb0d5fd8e09
| | * | | | | Move applyUnderlyingCapabilities to ConnectivityService.Lorenzo Colitti2020-12-012-107/+112
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is essentially a straighforward move of code from Vpn to ConnectivityService, and from VpnTest to ConnectivityServiceTest. Bug: 173331190 Test: passes existing tests, moved tests pass Change-Id: I76daa3abcc777e9c3ba57efb750de0e2e2f3bb74
| * / | | | Deprecated UserManager.getUsers(excludeDying) / added getAliveUsers()Felipe Leme2020-12-013-5/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing method is confusing (the argument used to be called includeDying) and it puts the burden on the caller (which need to understand what the parameter means). Furthermore: - The majority of calls are for getUsers(excludeDying=true). - The calls for getUsers(excludeDying=false) are equivalent to calls to getUsers() Test: m Test: a VpnTest ConnectivityServiceTest PermissionMonitorTest Bug: 157921703 Change-Id: Ife767a40b7b7790ba28b5377046de822ddbf275c Merged-In: Ife767a40b7b7790ba28b5377046de822ddbf275c (cherry picked from commit 6dc6d2b96498bcca132913dbfc6338f8f9f6c697)
* | | | | Merge changes If2201f39,Ia1c366c5 am: 6ec2a15480 am: d650ae9f8e am: d4e61ada27Lorenzo Colitti2020-11-301-32/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1509889 Change-Id: Ic2857aae38dfa7ccf9996689e198f9e175045462
| * | | | Merge changes If2201f39,Ia1c366c5Lorenzo Colitti2020-11-301-32/+7
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Stop calling Vpn#updateCapabilities in CS. Stop accessing VPNs in checkConnectivityDiagnosticsPermissions.
| | * | | | Stop calling Vpn#updateCapabilities in CS.Lorenzo Colitti2020-11-271-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, make Vpn#onUserAdded and Vpn#onUserRemoved notify CS of UID range changes through the VPN's NetworkAgent. After this change, ConnectivityService no longer touches the VPN's NetworkCapabilities directly, which is a much cleaner design. Bug: 173331190 Test: passes existing tests in ConnectivityServiceTest Change-Id: If2201f392cdb5f00c89a97683ad4ce6bda7b89e5
| | * | | | Stop accessing VPNs in checkConnectivityDiagnosticsPermissions.Lorenzo Colitti2020-11-271-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, checkConnectivityDiagnosticsPermissions takes the VPN lock to examine the VPN's underlying networks. Use the underlying network data that is available in ConnectivityService instead. Bug: 173331190 Test: passes existing tests in ConnectivityServiceTest Change-Id: Ia1c366c5e9974d4d2c4b38030e66c007d62020ff
* | | | | | Merge changes I982543cd,I41c3bf6c,Id3e5f6e1 am: 86d837daa8 am: e5334a1b25 ↵Lorenzo Colitti2020-11-302-14/+25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 487c745309 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1511316 Change-Id: I91ccdc9a5f4426d9c1623b869c0411b9af203c36
| * | | | | Add a provider to VPNChalard Jean2020-11-301-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: FrameworksNetTests NetworkStackTests Change-Id: I982543cdee358bb62d3b56a7fd9d71dc18908b65
| * | | | | Migrate VPN to the public NetworkAgent API.Chalard Jean2020-11-302-12/+15
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On top of being a cleanup this is useful for the S Network Selection project that will need to enrich the Network Agent API, and as such should not have to support legacy agents. Test: FrameworksNetTests NetworkStackTests Bug: 167544279 Change-Id: Id3e5f6e19829c64074cd6a52c5f950cee56b860b
* | | | | Move applying underlying caps from Vpn to ConnectivityService. am: ↵Lorenzo Colitti2020-11-281-1/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d182c40d8c am: 17199d78a2 am: dbcfe78633 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1501815 Change-Id: I924998ffa45ba630d8688007878f339264e7108e
| * | | | Move applying underlying caps from Vpn to ConnectivityService.Lorenzo Colitti2020-11-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to ConnectivityService to track underlying networks directly instead of through the Vpn class. 1. Communicate all information necessary to propagate underlying network capabilities to ConnectivityService via NetworkAgent. This includes: a. Underlying networks: - Add SystemApi for NetworkAgent to declare its underlying networks to ConnectivityService, and use it in Vpn. - Add a new declaredUnderlyingNetworks member to NetworkAgentInfo and store the underlying networks in it. Move propagation of underlying network capabilities to mixInCapabilities, which is a natural place for it. b. "Always metered" bit: - Communicate this to ConnectivityService via the existing NOT_METERED capability. Store it in a new declaredMetered boolean in NetworkAgentInfo to separate it cleanly from the NOT_METERED bit in the capabilities, which depends on whether the underlying networks are metered or not. In order to ensure that this is only ever changed when a NC update is received from a NetworkAgent, define a new processCapabilitiesFromAgent similar to the existing processLinkPropertiesFromAgent. 2. Ensure that propagating underlying network capabilities does not read the VPN's NetworkCapabilities. In order to do this, ensure that all relevant information on underlying networks and metering is sent to ConnectivityService at NetworkAgent registration time. CS still calls Vpn#updateCapabilities when a user is added/removed, but that is deleted in a future CL. 3. Slightly generalize propagating underlying network capabilities because there may be other network types that also have underlying networks that aren't VPNs (e.g., VCN). - Introduce a new supportsUnderlyingNetworks() boolean method in NetworkAgentInfo. - Rename updateAllVpnsCapabilities to propagateUnderlyingNetworkCapabilities. This commit does not move the actual logic of calculating the underlying capabilities out of Vpn.java. That can be done in a subsequent change once CS stops calling getUnderlyingNetworks(). This commit also does not modify any of the other code in CS that directly accesses VPNs' underlying networks. Bug: 173331190 Test: passes existing tests in ConnectivityServiceTest Test: CTS test in r.android.com/1511114 Test: atest CtsNetTestCases:Ikev2VpnTest HostsideVpnTests Change-Id: I5f76cb1aa4866efed3d5c4590e931fdb0e994f8d
* | | | | Merge changes Id4632e1b,I31985822,Ibbf96a25 am: e087ceed21 am: 63c28f8838 ↵Treehugger Robot2020-11-261-13/+99
|\| | | | | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | am: 96549dc212 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1511309 Change-Id: Ife8d852541eb8c96e9ada8d7037441514b7237bc
| * | | Merge changes Id4632e1b,I31985822,Ibbf96a25Treehugger Robot2020-11-261-13/+99
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Test passing an underlying network array with null network in it. Make testVpnNetworkActive more deterministic. Add a test for restricted profile added/removed with VPN up.
| | * | | Test passing an underlying network array with null network in it.Lorenzo Colitti2020-11-261-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code treats these nulls as if they weren't there. Bug: 173331190 Test: test-only change Change-Id: Id4632e1b004c09910b4b7613f7233d2c19e2f0ac
| | * | | Make testVpnNetworkActive more deterministic.Lorenzo Colitti2020-11-261-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test is a bit brittle because it sets the underlying networks while the VPN is undergoing validation by NetworkMonitor. The test does attempt to disable validation, but that's not actually possible - the only thing that's possible is to tell NetworkMonitor to validate immediately without sending any probes. So the underlying network change races with the validation. I'm not sure why the test isn't flaky. It might be because both the network change and the validation result in a capabilities change, and the test expects "a capabilities change" without expressing what change that should be. Make this a bit more predictable by ensuring that the network validates before the underlying networks are set. This is useful because an upcoming CL will change the way underlying network capabilities are propagated. With this test CL, both the old and the new code pass. Bug: 173331190 Test: test-only change Change-Id: I319858228e8d097c0b60a107029f296385f91269
| | * | | Add a test for restricted profile added/removed with VPN up.Lorenzo Colitti2020-11-261-0/+71
| | | |/ | | |/| | | | | | | | | | | | | | | | | Bug: 173331190 Test: test-only change Change-Id: Ibbf96a259a73068d110a159d54059720121117cc
* | | | Merge changes Ibed6cdd4,I51e3c00d,Ibf37f94b am: 2b30cd28ea am: a7d5a0c9e5 ↵James Mattis2020-11-211-0/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: d2bdb8bf14 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498660 Change-Id: I68386af717aa15099a09f45b57d945f352396f3b
| * | | Update requestsSortedById() to sort by collectionJames Mattis2020-11-191-0/+38
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update requestsSortedById() to sort NetworkRequestInfo by their nested collection of NetworkRequest objects vs a single request. Before the NetworkRequestInfo with the request with the lowest requestId would be sorted to the top. Now the NetworkRequestInfo which contains the request with the lowest requestId will be sorted to the top. Bug: 173292541 Bug: 171991028 Test: atest FrameworksNetTests Change-Id: I51e3c00d59443e37ddbf168c423d13df8d14fa64
* | | Merge "Make MockVpn more realistic and easier to use." am: e191d8d958 am: ↵Lorenzo Colitti2020-11-191-286/+214
|\| | | | | | | | | | | | | | | | | | | | | | | b1296e900d am: 82f6a11a45 am: 09a0ad7235 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1501814 Change-Id: I1beca5148b05724042e3c2415015f2ffa3ed2be5
| * | Merge "Make MockVpn more realistic and easier to use."Lorenzo Colitti2020-11-191-286/+214
| |\ \
| | * | Make MockVpn more realistic and easier to use.Lorenzo Colitti2020-11-191-286/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MockVpn is very difficult to use because it requires the test caller keeping track of both the MockVpn object and an accompanying TestNetworkAgentWrapper. It's also not very realistic: for example, connect() doesn't actually connect anything, it just makes it so that if ConnectivityService tries to update the capabilities, the attempt will not be ignored. Also, unlike the real code in Vpn, it connects with empty NetworkCapabilities (in particular, with empty UID ranges). Make this easier to use and a bit more realistic by: - Allowing TestNetworkAgentWrapper to take a "NetworkCapabilities template" that will form the initial capabilities sent when the agent registers with ConnectivityService. This allows the VPN to register its agent with its UID ranges already set, like the production code does. - Providing separate methods to register the NetworkAgent and mark it connected for cases where the test needs to make changes to the NetworkAgent before connecting (e.g., poking NetworkMonitor). - Putting the TestNetworkAgentWrapper inside MockVpn and driving it through MockVpn's methods. In order not to have too many wrapper functions (and because we can't delegate like in Kotlin), there's still an agent() method that returns the TestNetworkAgentWrapper. Bug: 173331190 Test: test-only change Change-Id: I749ff325bc13ac96f512270b86d1f67686eec378
* | | | Merge changes I3711b362,I49421183,Icc0701cb,I2f5ccc1d am: cbd6dbc553 am: ↵Lorenzo Colitti2020-11-191-49/+226
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f58d0c7de6 am: 3fc6919483 am: 8bef265085 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1501951 Change-Id: I5c7847bac88b574737ab80e5a20e9e22afb5b2e4
| * | | Merge changes I3711b362,I49421183,Icc0701cb,I2f5ccc1dLorenzo Colitti2020-11-191-49/+226
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Increase test coverage for VPN info sent to NetworkStatsService. Simplify MockVpn. Test a VPN with an underlying network that does not yet exist. Minor fixes to NetworkCapabilities#toString.
| | * | Increase test coverage for VPN info sent to NetworkStatsService.Lorenzo Colitti2020-11-191-20/+149
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 173331190 Test: test-only change Change-Id: I3711b362f31cb92b759e9f5c9d244fb88d9bd5e7
| | * | Simplify MockVpn.Lorenzo Colitti2020-11-191-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL removes four methods in MockVpn by slightly changing the test code to leverage the actual methods implemented by the (production) Vpn superclass. This works because setting mInterface results in isRunningLocked() returning true, which makes a number of methods behave as if the VPN is connected (which is what the test expects). The more realistic behaviour exposes a minor bug in the treatment of underlying networks. Add a TODO to fix it. Bug: 173331190 Test: test-only change Change-Id: I49421183538ba61ca790af71e309ece36b653bf9
| | * | Test a VPN with an underlying network that does not yet exist.Lorenzo Colitti2020-11-191-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test checks that if a VPN declares an underlying network that does not exist, the capabilities of that network are applied to the VPN as soon as the network starts to exist. Bug: 173331190 Test: test-only change Change-Id: Icc0701cb4cea7d91f7738c1e426e94cd26686b74
* | | | Merge "Replace InterfaceConfiguration usage with stable aidl" am: 7bb9047252 ↵Chiachang Wang2020-11-182-18/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: c4265887df am: 286794b8fc am: 8a951ec3ef Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1488356 Change-Id: I60b7d3c863121e4f766913c4b536795f6cc3b758
| * | | Merge "Replace InterfaceConfiguration usage with stable aidl"Chiachang Wang2020-11-182-18/+21
| |\ \ \ | | |/ / | |/| |
| | * | Replace InterfaceConfiguration usage with stable aidlChiachang Wang2020-11-182-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace InterfaceConfiguration with InterfaceConfigurationParcel for the incoming ConnectivityService mainline since mainline modules could not use @hide API. Bug: 170598012 Test: atest FrameworksNetTests Change-Id: I17ce8741e985fd30e3c8f0c34e79564a82890dc6
* | | | Merge changes I6a48d4db,I6741c41c,Ifec6bde5,Icd0717c5 am: 02bd168520 am: ↵Junyu Lai2020-11-121-23/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | de83629fc1 am: 9672f71a14 am: f3fe586b5d Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1490617 Change-Id: I2c5895c223a5843cfe11a1736a243b6847ad1b9a
| * | | Add hardware tethering traffic in testTethering testjunyulai2020-11-121-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | Test: atest com.android.server.net.NetworkStatsServiceTest#testTethering Bug: 162292214 Change-Id: Ifec6bde5fd3231f2135f12536c42e42ec6b707de
| * | | Remove unused getTetherStatsjunyulai2020-11-061-18/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before Android R, getTetherStats were used to collect tethering iface stats of all clients who extends ITetheringStatsProvider, which typically contains NetdTetheringStatsProvider and OffloadController. However, this always returns 0 since Android R, because: 1. OffloadController implemented NetworkStatsProvider and no longer reports stats through getTetherStats. 2. NetdTetheringStatsProvider always return 0 by design since non-offloaded iface tethering stats are already included in native iface stats. This change is a no-op refactoring to remove unused getTetherStats and update test which is not pratical. Fix for offloaded tethering stats will be in follow-up CLs. Test: atest FrameworksNetTests TetheringTests Bug: 162292214 Change-Id: Icd0717c5c2807ae3bd98626b897e4b148f142815
* | | Merge "Replace Context @hide APIs" am: a1c0a06580 am: d5ee31aba5 am: ↵Paul Hu2020-11-051-2/+8
|\| | | | | | | | | | | | | | | | | | | | | | | f4ceac073a am: 349b7e3bd9 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458063 Change-Id: I5241814fffc4ef794c07abca748d650c720576eb
| * | Merge "Replace Context @hide APIs"Paul Hu2020-11-051-2/+8
| |\ \
| | * | Replace Context @hide APIspaulhu2020-11-041-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connectivity service module is using some Context @hide APIs but they are not able to call after CS becomes a mainline module. Thus, replace them with similar System APIs. Bug: 170593746 Test: atest FrameworksNetTests Test: Manully check that receiving intent and starting activity can work normally. Change-Id: I0f5b53ce0da4e3fc0f927896e9a9e444048401bd
* | | | Merge "Replace AppOpsManager @hide APIs" am: a80bc72775 am: 5e56187d53 am: ↵Paul Hu2020-11-051-36/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 22c7f24f4b am: 1d7f371302 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1469126 Change-Id: I3edb79a9e05efb0c898a393a7ab98cd9d3305466
| * | | Merge "Replace AppOpsManager @hide APIs"Paul Hu2020-11-051-36/+46
| |\ \ \
| | * | | Replace AppOpsManager @hide APIspaulhu2020-11-031-36/+46
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connectivity service module is using some AppOpsManager @hide APIs but they are not able to call after CS become a mainline module. Thus, replace them with similar System APIs. Bug: 170593746 Test: atest FrameworksNetTests Change-Id: I51f66b64fcc3ebdbc2fddff8371eb8d9ff134137
| * / / DO NOT MERGE: Introduce DPMS shim for active DO/PO checkEran Messeri2020-11-041-5/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a shim into DevicePolicyManagerInternal & DevicePolicyManagerService so that NetworkStatsAccessTest would not diverge from internal development branches. The DevicePolicyManagerService refactoring on the internal branch removed isActiveAdminWithPolicy in favour of isActiveDeviceOwner and isActiveProfileOwner. These methods are being made available in AOSP for NetworkStatsAccessTest. Bug: 170459325 Test: atest NetworkStatsAccessTest Change-Id: Ic7e0898989fb8222aaba2b35436765c04eb3250c
* | | Merge "NetworkNotificationManager gets NotificationManager locally" am: ↵Treehugger Robot2020-10-301-1/+9
|\| | | | | | | | | | | | | | | | | | | | | | | a13966feea am: 0e2959a56b am: adfd73bd18 am: c59b775963 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459882 Change-Id: Ib82fdb4eb61b7d52e0011271da81c30606dbe3c3
| * | NetworkNotificationManager gets NotificationManager locallypaulhu2020-10-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's confusing that NetworkNotificationManager uses NotificationManager to put up notifcation which is passed from ConnectivityService. And that NotificationManager should be gotten from a context with UserHandle.ALL because the notification should notify to all users. But the future developer may not know this and pass incorrect NotificationManager probably. Therefore, adjust the design that NetworkNotificationManager will get NotificationManager locally. Bug: 170593746 Test: atest FrameworksNetTests Change-Id: Id65c998052b7b223171c5194ea46b49d7e84729d
* | | Merge "Replace NotificationManager @hide APIs" am: ff4b8b180c am: 6ae7712499 ↵Paul Hu2020-10-303-40/+45
|\| | | | | | | | | | | | | | | | | | | | | | | am: 2eb8179219 am: 070bbe9823 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1452435 Change-Id: Iaf9363492fb24714750314765439a4edec7d948c