Commit Graph

107756 Commits

Author SHA1 Message Date
Hall Liu
61a728aebf Merge "Unhide and update documentation for DisconnectCause" 2020-04-28 17:57:53 +00:00
Benedict Wong
7e2fe6eeee Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" 2020-04-28 17:33:46 +00:00
Hall Liu
6884145ba3 Unhide and update documentation for DisconnectCause
Unhide several constants and update the documentation for
android.telephony.DisconnectCause to reflect where it's being used.

Fixes: 154826441
Test: build
Change-Id: Ib3177367519a704bb469bc494f686c96fb516b85
2020-04-27 17:57:17 -07:00
Philip P. Moltmann
6bb9c7bdc4 Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests TetheringTests:TetheringServiceTest
Bug: 136595429
Merged-In: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Change-Id: Ic3d937e7bb5141798234ed5b2852c1f768e97495
2020-04-20 18:00:03 -07:00
Jack Yu
ecfb37b868 Renamed DisplayInfo to TelephonyDisplayInfo
To reduce ambiguity with android.view.DisplayInfo.

Test: Telephony sanity tests + unit tests
Bug: 151101989
Merged-In: Ic507b6bf082ca5510ff6d1dcde501f5be9ef074f
Change-Id: Ic507b6bf082ca5510ff6d1dcde501f5be9ef074f
(cherry picked from commit ac3ca33567)
2020-04-20 09:22:33 -07: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
Benedict Wong
2ed005834f Add filtering for IPsec algorithms in IKEv2 VPNs
This commit adds support for validating and filtering IPsec algorithms.
Without a public API exposing IKEv2 algorithms (and their respective
public APIs), the allowedAlgorithms can only filter the proposals for
IPsec (Child) SA algorithms.

Additionally, this removes the HMAC_SHA1 from the IKE SA's integrity
algorithm proposals due to insecurity

Bug: 153701879
Test: FrameworksNetTests passing, new tests added
Change-Id: I7e61a1612692db275b751330af5bacbf86836a8c
2020-04-14 18:07:36 -07:00
Chalard Jean
ca241694cb Allow testing of signal strength
- Let any process with NETWORK_SETTINGS register for signal strength
  wakeup.
- Allow agents registering test networks to assign them a signal
  strength.

Test: NetworkAgentTest
Bug: 139268426
Change-Id: I2b4b89be3e69f4853fd6978d2c8f5c8eb4271f21
2020-04-13 21:55:32 +09:00
Chalard Jean
eea3b016ce Add instrumentation to test NetworkAgent.
Test: NetworkAgentTest, new tests using this API
Bug: 139268426
Change-Id: Ia83b1c896df63bb18e2aa4b74d6cc09eba990eb5
2020-04-13 15:44:07 +09:00
Hall Liu
cc8b84c221 Merge changes from topic "phonestatelistener-limit-rvc-dev"
* changes:
  Add gating, logging for PhoneStateListener's limit
  Institute limit on PhoneStateListener
2020-04-11 00:36:13 +00:00
Treehugger Robot
c312053b39 Merge "Fix a theoretical NPE" 2020-04-10 16:25:07 +00:00
Chalard Jean
3854ed0c53 Fix a theoretical NPE
Test: NetworkAgentTests
Bug: 153718627
Change-Id: I08f57cce0cd85d5cd66e9a0ef948224290e9200e
2020-04-10 23:08:00 +09:00
Mitch Phillips
41cd04b822 Don't ask libc for PT feature w/o kernel support.
Check that the kernel supports the Tagged Pointers feature before asking
libc to disable/enable pointer tagging.

Bug: 153114333
Test: Build coral, note no messages from SetHeapTaggingLevel.
Test: atest CtsTaggingHostTestCases

Change-Id: Id5fbd731aa70f7b0a75525387479f6123628a012
Merged-In: Id5fbd731aa70f7b0a75525387479f6123628a012
2020-04-09 15:35:05 -07:00
Cody Kesting
138575a48c Merge "Fix typo in VpnManager Docs." 2020-04-09 21:12:23 +00:00
Nikita Ioffe
cca499411f Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.

Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.

Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.

Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
Merged-In: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
(cherry picked from commit 57300d9057)
2020-04-09 17:56:25 +01:00
Peter Collingbourne
6e478ee41d Merge "Implement initial policy for memory tag checks." 2020-04-08 18:32:33 +00:00
Xin Li
9fd000bfec Merge "DO NOT MERGE - Merge QQ2A.200405.005 into master" 2020-04-08 06:26:03 +00:00
Hall Liu
0a5365b9c0 Add gating, logging for PhoneStateListener's limit
Add gating via PlatformCompat and DeviceConfig and logging via
PlatformCompat to the limit instituted on per-process listeners

Fixes: 152074216
Test: atest CtsTelephonyHostCases
Change-Id: I4d6681d90705b68c3349f4124e434a29b50fd3a2
Merged-In: I4d6681d90705b68c3349f4124e434a29b50fd3a2
2020-04-07 17:13:19 -07:00
Hall Liu
1002495afa Institute limit on PhoneStateListener
Limit apps to 50 concurrently registered instances of PhoneStateListener
via TelephonyManager#listen

Test: atest CtsTelephonyTestCases:PhoneStateListenerTest#testListenerLimit
Bug: 151835251
Change-Id: I8486d86773a1e28b4018620c48003855dae75b9d
Merged-In: I8486d86773a1e28b4018620c48003855dae75b9d
2020-04-07 17:13:14 -07:00
Xiangyu/Malcolm Chen
beccb937dd Merge "Hide APIs exposed for Telephony mainline which is no longer needed in R." 2020-04-07 23:45:00 +00:00
Xin Li
ab1261dddc DO NOT MERGE - Merge QQ2A.200405.005 into master
Bug: 150877681
Change-Id: Iacdd23c38aef7ff04c5d289720318d41cbf18158
Merged-In: I9265f01ed2f6e4aca7728d278f06ceea5633dac5
2020-04-07 15:13:00 -07:00
Treehugger Robot
72746119bc Merge "Fix a stupid NPE" 2020-04-07 05:53:10 +00:00
Cody Kesting
87f0bc2e1a Fix typo in VpnManager Docs.
Bug: 153364039
Test: n/a. Docs change only.
Change-Id: I8259bfc09735515f428bb41d69fedd3ea1961f79
2020-04-06 12:57:58 -07:00
Chalard Jean
67370a01cb Merge "Fix a bug where the legacy extra info is reset on connect." 2020-04-06 06:04:46 +00:00
Chalard Jean
90ef10894c Fix a bug where the legacy extra info is reset on connect.
Bug: 149459996
Test: NetworkAgentTest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I5f8f6d962ee3317e101d19518c767b3c327c0c47
2020-04-06 12:46:19 +09:00
Treehugger Robot
9b88b3732d Merge "Include exception as cause of BadParcelableException" 2020-04-03 18:37:25 +00:00
Peter Collingbourne
f78e085068 Implement initial policy for memory tag checks.
System apps and the system_server receive async tag checks, while all other
app processes have it disabled. Developers may enable async tag checks
per application with:

$ adb shell am compat 135772972 <app.name>

Bug: 135772972
Change-Id: I154623941eec8e79af347453fbca1b062346c85b
Merged-In: I154623941eec8e79af347453fbca1b062346c85b
2020-04-03 11:04:51 -07:00
Eugene Susla
f86d2fb44d Merge "Prevent HandlerThread from losing interrupted flag" 2020-04-03 16:58:18 +00:00
Chalard Jean
1c48f85a21 Fix a stupid NPE
Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).

Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I3e17211c03bc74426bf5e2e414ec322d73b0060b
2020-04-03 07:17:13 +09:00
Charles Munger
368949c23a Include exception as cause of BadParcelableException
Bug: 136208613
Test: Improved error message
Change-Id: I31404ef67f3b3c8788bd5b83ac5db94279f50f7c
2020-04-02 20:25:22 +00:00
Chalard Jean
90c292b13e Merge changes from topics "api-fix-networkagent", "satisfiedby"
* changes:
  Rename satisfiedBy into canBeSatisfiedBy
  Address further API council comments.
2020-04-02 05:51:02 +00:00
Lorenzo Colitti
4fa9742c4d Merge "Only apply VPN isolation if it's fully routed" 2020-04-02 04:10:12 +00:00
Junyu Lai
6baf734a9b Merge changes from topic "sp26-networkstats-cts"
* changes:
  [SP26] add CTS for NetworkStats
  [SP26.2] add a method in NetworkStats that removes empty entries
2020-04-02 02:00:59 +00:00
Malcolm Chen
1cae35384b Hide APIs exposed for Telephony mainline which is no longer needed in R.
The APIs were added in b/144351078, b/148097978 and b/148116922.
b/151665796 is used to revert them.

Bug: 151665796
Bug: 144351078
Bug: 148097978
Bug: 148116922
Test: build
Change-Id: I08db8c5c0161747a7e775a8de0daa7077b513f10
Merged-In: I08db8c5c0161747a7e775a8de0daa7077b513f10
2020-04-01 12:46:51 -07:00
Fredrik Roubert
cc7a0e7152 Merge "Add "ftp" to the list of URL schemes that get linkified." 2020-04-01 19:02:51 +00:00
Steven Moreland
2608950d10 Merge "Document linkToDeath behavior on object cleanup." 2020-04-01 18:35:05 +00:00
Nikita Ioffe
67ee6aeb9e Merge "Make init.userspace_reboot.is_supported a rw property" 2020-04-01 13:14:22 +00:00
Mohammad Islam
cf2865a167 Merge changes from topics "abort-individual-session", "apk-checkpoint", "rebrand-to-revert", "supportsCheckPoint"
* changes:
  Enable filesystem checkpoint for staged apk installation
  Allow staging multiple sessions with non-overlapping packages (apk+apex)
  Replace abortActiveSession in StagingManager with revertActiveSessions
  Allow StagingManager to abort individual staged session
  Prevent staging multiple sessions on devices not supporting checkpoint
  Rebrand the term "rollback" to "revert" for apexd
2020-04-01 13:05:58 +00:00
Chalard Jean
3d223986a6 Rename satisfiedBy into canBeSatisfiedBy
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: I076876a6662bde143ef7d315ce3767acafff93c1
Merged-In: I076876a6662bde143ef7d315ce3767acafff93c1
2020-04-01 20:38:30 +08:00
junyulai
fb16574069 [SP26.2] add a method in NetworkStats that removes empty entries
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.

However, change the behavior in the original NetworkStats
is considered risky in current stage.

Thus, this change provide a function that could remove these
empty entries in tests.

Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692
Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
2020-04-01 16:46:08 +08:00
Rubin Xu
080f217945 Only apply VPN isolation if it's fully routed
VPN is considered fully routed if both IPv4 and IPv6 have
either a default route or a prohibit route.

Bug: 145332510
Test: atest FrameworksNetTests
Change-Id: I59cf48552bca98092d1212e3d718fd420add5458
2020-04-01 09:36:29 +01:00
Chalard Jean
47ce6894cc Address further API council comments.
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Copy from ag/10866511
Change-Id: I8a785ae0e74e659c317deaaa28c203356c7766ed
Merged-In: I8a785ae0e74e659c317deaaa28c203356c7766ed
2020-04-01 16:01:04 +08:00
Aaron Huang
e99aa91e87 Merge changes from topics "networkagent_api", "networkprovider_api"
* changes:
  Update the NetworkProvider API for council comments
  Update NetworkAgentConfig API for council comments
  Update the NetworkAgent API for council comments
2020-04-01 05:33:28 +00:00
Sarah Chin
96d59d7532 Merge "Add method to reset network types" 2020-03-31 22:02:20 +00:00
Steven Moreland
16687cbce9 Document linkToDeath behavior on object cleanup.
In Java, this has always been the case, but it wasn't documented.

Bug: 152627219
Test: n/A
Change-Id: I8d93d2876bac8f16101a30afdf06699ece653d25
2020-03-31 14:22:13 -07:00
Sarah Chin
f8bd172434 Merge "Remove Mainline APIs for MmsManger and TelephonyManager" 2020-03-31 20:52:56 +00:00
Sarah Chin
bab3e662df Add method to reset network types
Test: build
Bug: 148218045
Change-Id: Ia6eaba4e40fe47e79f8a7b6bcbadc61151d84823
Merged-In: Ia6eaba4e40fe47e79f8a7b6bcbadc61151d84823
2020-03-31 12:57:03 -07:00
Sarah Chin
5fe2615046 Remove Mainline APIs for MmsManger and TelephonyManager
Test: build
Bug: 144004293
Bug: 147611125
Change-Id: I44682d1f33eee02d1dcf57f4de8ce2df0a9b126d
Merged-In: I44682d1f33eee02d1dcf57f4de8ce2df0a9b126d
2020-03-31 12:47:46 -07:00
Fredrik Roubert
0b4907e839 Add "ftp" to the list of URL schemes that get linkified.
Fixes: 152892738
Change-Id: I888c5b12ebb417309250a25dc70baedad2cf7d7c
2020-03-31 21:40:41 +02:00
Cody Kesting
b187c3c1af Merge "Clarify comments for Connectivity Diagnostics reports." 2020-03-31 17:43:44 +00:00