Commit Graph

445194 Commits

Author SHA1 Message Date
Lorenzo Colitti
11dde57b7f Merge "Make the Nat464Xlat tests more realistic." 2020-04-20 11:06:08 +00:00
Lorenzo Colitti
a3319d24a3 Merge "Support learning the NAT64 prefix from two different sources." 2020-04-20 11:05:52 +00:00
Jiyong Park
77a58cde80 Merge "Mark some aidl_interface modules as unstable" 2020-04-20 10:11:54 +00:00
Lorenzo Colitti
0a9b1b6a4b Make the Nat464Xlat tests more realistic.
464xlat will never be started on a network that is not connected,
or on a network that has no IPv6 address.

This is a no-op test-only change but it is necessary for an
upcoming change that violates some of the invalid assumptions
currently made by this test and causes it to fail.

Bug: 150648313
Test: test-only change
Change-Id: I41766e9adaa7c24454648b371e6e3cc647693be5
2020-04-20 17:54:20 +09:00
Lorenzo Colitti
e5b220d179 Support learning the NAT64 prefix from two different sources.
The NAT64 prefix from the RA always takes precedence over the
NAT64 prefix from DNS discovery, because it is detected faster,
and detecting it does not require sending any packets.

Bug: 150648313
Test: new unit test
Change-Id: Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902
2020-04-20 16:50:53 +09:00
Jiyong Park
803dc1c218 Mark some aidl_interface modules as unstable
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 152655547
Test: m
Merged-In: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
(cherry picked from commit db589dded4)
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
2020-04-20 07:44:52 +00:00
Aaron Huang
79ae68b5e1 Merge "Add network agent to enhance NetworkProvider test" 2020-04-20 07:20:25 +00:00
Jack Yu
e68ccd06fc Merge "Get rid of SIM record access in DcTracker" 2020-04-19 08:48:13 +00:00
Jack Yu
7d7adf75e0 Get rid of SIM record access in DcTracker
DcTracker uses several SIM related signals for different purposes.
Those signals include SIM record loaded/not-loaded, subscription
changed event, and carrier config changed event. Those signals
are slightly different but not that really important to DcTracker.
What DcTracker cares is
1. Whether SIM is inserted or not.
2. Whether configuration changes or not.

By listening to a single carrier config change event can handle
the cases above.

Removed all SIM record related places in DcTracker. SIM record should
not be accessed by anyone outside of UICC controller.

Test: Manual test + unit tests
Bug: 146168348
Merged-In: Iad45933ea77eb460625a891071535cbeaf8ac3b0
Change-Id: Iad45933ea77eb460625a891071535cbeaf8ac3b0
(cherry picked from commit df3001b935)
2020-04-19 00:25:09 -07:00
Treehugger Robot
ca4379a866 Merge "Enable screen recording in legacy app launch test." 2020-04-17 21:41:57 +00:00
Chalard Jean
565160c302 Merge "[TNU06] Add roaming notification" 2020-04-17 16:08:14 +00:00
Gavin Corkery
feb3b2ace2 Merge "Ensure userspace reboot is supported before logging" 2020-04-17 15:43:02 +00:00
Aaron Huang
e66ba51271 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" 2020-04-17 14:35:41 +00:00
Gavin Corkery
eb52a69444 Ensure userspace reboot is supported before logging
Ensure that userspace reboot is supported before performing any actions.
Any call into UserspaceRebootLogger in the case that userspace reboot
is not supported should be a no-op. It is unexpected to call into
this class on an unsupported device, so log with ASSERT priority
in this case.

Test: atest UserspaceRebootHostTest
Bug: 153648276
Change-Id: Ic3041ff3abe0d2641d3d99fc8e816f1f5c491a34
2020-04-17 14:41:21 +01:00
paulhu
f98918fc2c [TNU06] Add roaming notification
Warn user of potential data charges if the backhaul is
cellular and user is roaming.

Bug: 145629001
Test: atest TetheringTests
Change-Id: I74b4f87c2f6aad09e05d3f2a779f880396885953
2020-04-17 21:25:54 +08:00
Anton Hansson
b7a96816a6 Merge "Remove obsolete dist rules" 2020-04-17 12:29:01 +00:00
Anton Hansson
019256c4a6 Merge "Convert disting of api txt from mk to bp" 2020-04-17 12:21:46 +00:00
Anton Hansson
82ab0c4fbe Remove obsolete dist rules
The API files are disted to the apistubs/ subdir now, and all
known users have been updated to use that path.

Bug: 152479829
Test: No
Change-Id: I224fd5af8ba740c6ad94bbbdb20f5d53509e51f6
2020-04-17 11:42:01 +01:00
Anton Hansson
ba367d3b7d Convert disting of api txt from mk to bp
droidstubs dist now dists the api file, so convert these manual
mk rules into bp dist instead.

Bug: 149293194
Test: m dist sdk && find out/dist/apistubs -name /android\.txt
Change-Id: I96052b427dc01a6d24b040ad0006129d4d1e48fb
Merged-In: I96052b427dc01a6d24b040ad0006129d4d1e48fb
2020-04-17 11:38:20 +01:00
Aaron Huang
a02afbf2f3 Move DhcpInfoTest to frameworks/base/tests/net/common
Address comment from aosp/1162443.
Move to FrameworksNetCommonTests so that it can be run in
cts test and presubmit test.

Also change package name from android.net.cts to android.net

Bug: 154299158
Test: atest FrameworksNetTest
      atest CtsNetTestCasesLatestSdk:android.net.DhcpInfoTest
Change-Id: I42a965ae5cb748fdd80b4d5c0f8b26f36f74be72
2020-04-17 18:26:20 +08:00
Aaron Huang
dd84405937 Add network agent to enhance NetworkProvider test
Add network agent to test more situation that could get the
onNetworkRequested callback.

Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: Id494a1697cc1b73e8e56ae585a69faec31c59f52
2020-04-17 17:26:07 +08:00
Treehugger Robot
ec1cb14990 Merge "Add <Request Active Source> when CEC is on or TV wakes up." 2020-04-17 07:18:46 +00:00
Aaron Huang
334a3ef519 Merge changes from topic "cts-networkprovider"
* changes:
  Add cts test for NetworkProvider
  Adjust permission of NetworkProvider related API
2020-04-17 03:59:47 +00:00
Bruce Chen
82ec72ab55 Merge "Add testTransportTypesEqual to dnsmanager test cases" 2020-04-17 02:59:15 +00:00
Junyu Lai
d2c1c23454 Merge "[SP27.3] Rename TestableNetworkStatsProvider" 2020-04-17 02:24:55 +00:00
Betty Chang
00de08f436 Merge "[Telephony] Show 4G icon instead of 3G icon for UMTS network in ATT" 2020-04-17 02:06:18 +00:00
Jack Yu
0b8a2182ca Merge "Set legacy MTU field for backward compatibility" 2020-04-17 01:14:48 +00:00
Jordan Liu
e9cd9bd1fc Merge "Implement #equals in Geometries subclasses" 2020-04-16 22:13:17 +00:00
Jordan Liu
def1360b0b Implement #equals in Geometries subclasses
Bug: 148482334
Test: atest CbGeoUtilsTest
Change-Id: Ifc9aeaf378ac3221fc25690ed6ce33108cf2f56f
Merged-In: Ifc9aeaf378ac3221fc25690ed6ce33108cf2f56f
2020-04-16 14:04:11 -07:00
Amit Mahajan
26fc0b143d Merge "Remove permission requirement for SMS_DB_LOST intent." 2020-04-16 20:05:06 +00:00
Lorenzo Colitti
15fb9f8c26 Merge "Add a function to process LinkProperties coming from an agent." 2020-04-16 16:25:29 +00:00
Lorenzo Colitti
75519a7a3c Merge "Support changing the NAT64 prefix without removing it." 2020-04-16 16:24:57 +00:00
Hannah.Hsu
a1e468917b Add <Request Active Source> when CEC is on or TV wakes up.
Bug: 130316162
Test: manual
Change-Id: Iae1b22a19d4bf308cadb45590346f46325b222c3
2020-04-16 12:43:14 +00:00
Orion Hodson
c0fe0ae29f Merge "Add explicit dependencies on jni_headers" 2020-04-16 10:29:06 +00:00
chenbruce
0ec39cf1c4 Add testTransportTypesEqual to dnsmanager test cases
A test that ensures that NetworkCapabilities.TRANSPORT_* is eaual
to IDnsResolver.TRANSPORT_* for every possible value of each.

Bug: 153267602
Test: atest FrameworksNetTests
Change-Id: I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417
2020-04-16 18:04:16 +08:00
changbetty
a2b708531d [Telephony] Show 4G icon instead of 3G icon for UMTS network in ATT
Bug: 153624066
Test: make
Change-Id: Idc3f0f645a3c2c653061e6dac546f3469b2bc757
Merged-In: Idc3f0f645a3c2c653061e6dac546f3469b2bc757
2020-04-16 16:28:30 +08:00
Orion Hodson
63f06b738d Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
2020-04-16 08:26:14 +00:00
Paul Hu
0ca532a78c Merge "[TNU05.1] Address aosp/1237036 leftover comments" 2020-04-16 08:25:24 +00:00
Lorenzo Colitti
7ea5f9fac5 Add a function to process LinkProperties coming from an agent.
There are tasks that need to be performed when receiving
LinkProperties directly from a NetworkAgent (either at
registration time or in subsequent updates).

Currently, the only example of such a task is calling
ensureDirectlyConnectedRoutes. This is currently done in
handleUpdateLinkProperties, which is often unnecessary,
because that method iscalled in many other cases than when
receiving properties directly from an agent. Ensuring directly
connected routes only needs to be done when receiving
LinkProperties from the agent, because ConnectivityService does
not directly manipulate routes.

This CL does not do much except remove these superfluous calls
and add the method. A future CL will add more code to the method.

Bug: 150648313
Test: atest ConnectivityServiceTest
Change-Id: Ibeeb5f79e8afd3350c935934713d7882f2e0281f
2020-04-16 16:23:07 +09:00
Aaron Huang
17d97269e6 Add cts test for NetworkProvider
It will skip whole tests on Q device since NetworkProvider class
is introduced in R.

Result on Q device would be:
[1/1] android.net.NetworkProviderTest#skippedClassForDevSdkMismatch: IGNORED (3ms)

Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: If7bfc7fae503e3497c37754697d0b148ff4cab3b
2020-04-16 06:40:20 +00:00
paulhu
dc5c86ddd9 [TNU05.1] Address aosp/1237036 leftover comments
Bug: 147818698
Test: atest TetheringTests
Change-Id: Ife738339aeae00d2063fea6918b50204daef24fc
2020-04-16 14:39:12 +08:00
Aaron Huang
1aa791cd22 Adjust permission of NetworkProvider related API
- Allow an app holds NETWORK_SETTINGS to acess registerNetworkProvier()
  and unregisterNetworkProvider().
- To access declareNetworkRequestUnfulfillable(), allow an app holds
  MANAGE_TEST_NETWORKS to declare a unfulfillable request that contains
  TRANSPORT_TEST transport.

This makes easier to write cts to test.

Bug: 153612373
Bug: 153614605
Test: atest FrameworksNetTests
      atest CtsNetTestCases:android.net.NetworkProviderTest
Change-Id: Ic9809e731aa811a51c2f82d189372169d99a5ed9
2020-04-16 14:03:55 +08:00
Paul Hu
8e8224c97b Merge "Add TetheringCoverageTests" 2020-04-16 06:00:07 +00:00
Treehugger Robot
ad70ff1e44 Merge "Allow non-system server code to AppOpsManager.checkOp and NoteOp" 2020-04-16 04:33:28 +00:00
Jack Yu
1992920e74 Set legacy MTU field for backward compatibility
For IWLAN, MTU is not negotiated as part of the RA. The interface
MTU is still necessary here to ensure full backward compatibility.
To workaround this, we set legacy mtu field with the larger value
of mtu v4 and mtu v6.

Fix: 153470573
Test: FrameworkTelephonyTests
Merged-In: I0671618817a295cc4e9c75df17501de338dbe155
Change-Id: I0671618817a295cc4e9c75df17501de338dbe155
(cherry picked from commit 8d41fd3a92)
2020-04-15 20:17:39 -07:00
Mark Chien
c826614862 Merge "Remove sendMessage inside EntitlementManager" 2020-04-16 02:07:55 +00:00
Paul Hu
cef08983cf Merge "[TNU05] Add no upstream notification" 2020-04-16 01:31:06 +00:00
Amit Mahajan
e253c746b4 Remove permission requirement for SMS_DB_LOST intent.
So that messaging app can listen to it for debuggability.

Test: basic sanity
Bug: 152559647
Merged-in: Ie1b980a6bfbbc7887948cfc41e4928e9f160da98
Change-Id: Ie1b980a6bfbbc7887948cfc41e4928e9f160da98
(cherry picked from commit 6eb456615f)
2020-04-15 17:15:11 -07:00
Philip P. Moltmann
128b9106ad Allow non-system server code to AppOpsManager.checkOp and NoteOp
1. Allow checkOp from any caller, not only callers with
  android.permission.UPDATE_APP_OPS_STATS. This is ok as checkOp does not
  update any stats
2. Clear the binder identity when calling noteOp so that it is checked
  if the service can perform the operation, not the caller.

Test: Verified that RecognitionService can be used by third party apps
Bug: 152436092
Merged-In: Ie6fe90b5737a1cd24e45446ea91560940b41c8fc
Change-Id: Icfd46548b1c23b499b712ad795eab0c417b8586f
2020-04-15 23:44:41 +00:00
Gopinath Elanchezhian
583c704e11 Enable screen recording in legacy app launch test.
Bug: b/151967185

Test: AppLaunchTest
Change-Id: I3e14b3119b08432ad8b81e57685354867407e7e3
2020-04-15 15:55:40 -07:00