Commit Graph

654852 Commits

Author SHA1 Message Date
qinyige1
28367ba78a [PeopleService] Catch exception when failed to query call log.
It's unnecessary to throw exception when failed to query call
log in PeopleService. So catch this exception to avoid system
server crash.

Bug: 204923224
Test: PeopleServiceTest
Change-Id: I77ee31ff456455721c3401f36d4a79390db2f9b5
2021-11-17 10:10:26 +08:00
Yifan Hong
27c03c7f68 Merge "Add OWNERS for BatteryService" 2021-10-22 05:40:22 +00:00
Bernardo Rufino
6a793fe262 Merge "Change out value type for Parcel::hasFileDescriptorsInRange()" 2021-10-21 10:13:15 +00:00
Lucas Lin
528c63e564 Merge "Set underlying networks into NetworkCapabilities directly" 2021-10-21 08:33:29 +00:00
Jing Ji
8787386e84 Merge "Fix potential race condition due to missing lock" 2021-10-20 23:58:28 +00:00
Treehugger Robot
b0914ffd45 Merge "Fix queryRawContactEntity api" 2021-10-20 20:25:15 +00:00
Jing Ji
7ee3a1fec3 Fix potential race condition due to missing lock
Bug: 194991626
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: CtsIncidentHostTestCases:ProcStatsProtoTest
Change-Id: I1dc7c03d031248fb945dc2cf9dd47ad590ec672c
Merged-In: I1dc7c03d031248fb945dc2cf9dd47ad590ec672c
2021-10-20 13:19:08 -07:00
Treehugger Robot
d51c3f3a2c Merge "AbsoluteVolume change custom call to official API" 2021-10-20 20:09:14 +00:00
Yifan Hong
99bc2d42a2 Add OWNERS for BatteryService
... to point to owners of health HAL. BatteryService
contains large usage of the health HAL.

Test: pass
Bug: 177269435
Change-Id: I38e7ec9e2ab25dec67ab674e9f169360f4690f1e
2021-10-20 12:53:53 -07:00
Treehugger Robot
c12df4f3b1 Merge "Add accessibility framework team to the owners for UiAutomation. Bug:159651900 Test: n/a" 2021-10-20 18:45:13 +00:00
Treehugger Robot
09b947cd02 Merge "Migrate Connectivity modules to use modules-utils" 2021-10-20 13:43:58 +00:00
Bernardo Rufino
68a6b0d1a3 Change out value type for Parcel::hasFileDescriptorsInRange()
Test: atest -d android.os.cts.ParcelTest
Change-Id: Idfcad04de35750d291f3351378e8420e5b890abf
2021-10-20 11:22:52 +01:00
Neil Fuller
5b274f5eef Merge "Add android.net tests to postsubmit" 2021-10-20 09:48:52 +00:00
Neil Fuller
8f15a06f5a Merge "Fix error prone warnings" 2021-10-20 09:35:44 +00:00
William Escande
5b4de494a0 Fix queryRawContactEntity api
Bug: 203535224
Tag: #refactor
Test: build
Change-Id: Id2e4be7a7985c47e81b6bafee5c35d0df3f33d8f
2021-10-19 21:21:48 +02:00
Treehugger Robot
f637a0d63d Merge changes I6d3584f3,Ifdaada39
* changes:
  Fix SntpClient 2036 issue (2/2)
  Fix SntpClient 2036 issue (1/2)
2021-10-19 18:58:55 +00:00
Neil Fuller
a0db5578fc Fix error prone warnings
Fix warnings introduced by previous commits and add @RunWith annotation
to new tests for consistency with existing tests.

Bug: 199481251
Test: Treehugger only
Change-Id: Iaec4caa80b15112bce84268adc6d763198f0ff61
2021-10-19 18:45:14 +01:00
Neil Fuller
c9bbe6b59e Fix SntpClient 2036 issue (2/2)
Fix issue with SntpClient after the end of NTP era 0 (2036).

This is the second of two commits. This commit makes the actual fixes
and makes tests pass.

Before this change SntpClient converted to Unix epoch times too eagerly.
NTP 64-bit timestamps are lossy: they only hold the number of seconds /
factions of seconds in the NTP era and the era is not transmitted. The
existing code assumed the era was always era 0, which ends in 2036.

As explained at https://www.eecis.udel.edu/~mills/y2k.html,
the lossiness of the type is not an issue providing that the maths is
implemented carefully: the NTP timestamps are only ever subtracted from
each other, are always assumed to be in the same or adjacent NTP eras,
and are used to calculate offsets that are applied to client Unix epoch
times.

This commit:

+ Switches to use a dedicated Timestamp64 type, avoiding the use
of the Unix epoch.
+ Switches to use a dedicated Duration64 type for holding the
32-bit signed difference between two Timestamp64 instances.
+ Simplifies the readTimeStamp() and writeTimeStamp() methods.
+ Adds missing validation covered by a TODO. The code was randomizing
the lower bits of the client transmit timestamp, but then not checking
the result as it should, presumably because it was difficult to know
what value was sent. Easily fixed with a dedicated type.
+ Stops randomizing the lower bits of various other timestamps
unnecessarily.
+ Fixes some naming to add clarity.

Bug: 199481251
Test: atest core/tests/coretests/src/android/net/sntp/Timestamp64Test.java
Test: atest core/tests/coretests/src/android/net/sntp/Duration64Test.java
Test: atest core/tests/coretests/src/android/net/SntpClientTest.java
Merged-In: I6d3584f318b0ef6ceab42bb88f20c73b0ad006cb
Change-Id: I6d3584f318b0ef6ceab42bb88f20c73b0ad006cb
2021-10-19 18:22:43 +01:00
Neil Fuller
f663ab4276 Fix SntpClient 2036 issue (1/2)
Fix issue with SntpClient after the end of NTP era 0 (2036).

This commit is 1/2. It makes some refactoring changes, lint fixes, adds
tests and introduces types that will be used in 2/2. Some of the added
tests fail and demonstrate the issue being fixed with the current
implementation.

-----

Failures that demonstrate the bug:

android.net.SntpClientTest#testRequestTime_era1ClientEra1Server

STACKTRACE:
junit.framework.AssertionFailedError: expected=5, actual=-4294967295995, allowedSlop=1
	at junit.framework.Assert.fail(Assert.java:50)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at android.net.SntpClientTest.assertNearlyEquals(SntpClientTest.java:502)
	at android.net.SntpClientTest.checkRequestTimeCalcs(SntpClientTest.java:215)
	at android.net.SntpClientTest.testRequestTime_era1ClientEra1Server(SntpClientTest.java:201)

android.net.SntpClientTest#testRequestTime_era0ClientEra1Server: FAILED (145ms)

STACKTRACE:
junit.framework.AssertionFailedError: expected=1139293696005, actual=-3155673599995, allowedSlop=1
	at junit.framework.Assert.fail(Assert.java:50)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at android.net.SntpClientTest.assertNearlyEquals(SntpClientTest.java:502)
	at android.net.SntpClientTest.checkRequestTimeCalcs(SntpClientTest.java:215)
	at android.net.SntpClientTest.testRequestTime_era0ClientEra1Server(SntpClientTest.java:174)

android.net.SntpClientTest#testNonMatchingOriginateTime: FAILED (116ms)

STACKTRACE:
junit.framework.AssertionFailedError
	at junit.framework.Assert.fail(Assert.java:48)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at junit.framework.Assert.assertFalse(Assert.java:34)
	at junit.framework.Assert.assertFalse(Assert.java:41)
	at android.net.SntpClientTest.testNonMatchingOriginateTime(SntpClientTest.java:384)

------

This commit:

+ Introduces a dedicated Timestamp64 type + test for holding NTP
timestamps.
+ Introduces a dedicated Duration64 type + test for holding the
32-bit signed difference between two Timestamp64 instances.
+ Fixes some naming to add clarity / addresses lint issues.
+ Adjusts tests

Tests are NOT expected to pass with just this commit. See 2/2.

Bug: 199481251
Test: atest core/tests/coretests/src/android/net/sntp/Timestamp64Test.java
Test: atest core/tests/coretests/src/android/net/sntp/Duration64Test.java
Test: atest core/tests/coretests/src/android/net/SntpClientTest.java
Merged-In: Ifdaada39298b05c48a3207fe6c0fad71c8a0a252
Change-Id: Ifdaada39298b05c48a3207fe6c0fad71c8a0a252
2021-10-19 18:22:16 +01:00
Ian Hua
bae244ddd1 Merge "Add nnapi_native flag namespace." 2021-10-19 15:53:21 +00:00
Neil Fuller
563ecfccb1 Add android.net tests to postsubmit
Add android.net tests to postsubmit. The tests / annotations will
be added in a separate commit.

Bug: 199481251
Test: Treehugger / inspection
Change-Id: I17cb464979535c767bbb8ee22fd7456ff08bae6c
2021-10-19 15:57:01 +01:00
Treehugger Robot
fdc344e6b6 Merge "Removed Bluetooh ScanFilter hidden API usage." 2021-10-19 14:41:30 +00:00
wescande
e312b160f4 AbsoluteVolume change custom call to official API
BT mainline effort to remove hidden api:
`avrcpSupportsAbsoluteVolume` only inform for a new volume behavior and
AudioManager already provide such method.

Bug: 190422401
Tag: #refactor
Test: Manual: Start bluetooth, play music and change volume from speaker/phone
Change-Id: I935df5e0f5632cd4144343bdb1bc2b9d7bc61c01
2021-10-19 14:32:50 +02:00
Jakub Pawlowski
10d9b01f61 Merge "settingslib/media: Add LeAudio support" 2021-10-19 05:19:37 +00:00
Jordan Liu
78a8259df5 Merge "Do not strip trailing F's of test ICCID" 2021-10-18 23:33:54 +00:00
Treehugger Robot
b20dc98bfa Merge "Add a method to get rawContact" 2021-10-18 22:14:39 +00:00
Treehugger Robot
e722500621 Merge "Removed BluetoothDevice#prepareToEnterProcess" 2021-10-18 21:37:57 +00:00
Ameer Armaly
187d8c7ac7 Add accessibility framework team to the owners for UiAutomation.
Bug:159651900
Test: n/a

Change-Id: I7d89bfc67f2077bca00a048d79f4b90792ed8c69
2021-10-18 20:18:14 +00:00
Jordan Liu
e1dd6a01de Do not strip trailing F's of test ICCID
Some OEMs use test SIMs which have ICCID=FFFFFFF... In this case we
don't strip trailing F's.

Bug: 199254579
Test: manual
Change-Id: I69b40fa75e59163e8c30be77cc38e908d6dd8cd4
2021-10-18 11:51:31 -07:00
Łukasz Rymanowski
9b07c89fd1 settingslib/media: Add LeAudio support
Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: Manual
Change-Id: I4d4af980b1d41860b1d3fc7bf22aeb29e8615d41
2021-10-18 18:34:02 +00:00
Jonathan Scott
7593e112ae Merge "Centralise owners for Enterprise Platform team." 2021-10-18 18:31:04 +00:00
Jonathan Scott
7443751dd9 Centralise owners for Enterprise Platform team.
This will allow us to point other directories at these files for OWNERS
and make it easier to update after future team changes.

Test: N/A
Bug: 202714830
Change-Id: Iaaf5b8eb7568be4ebfd1b30abae0b757153f0391
2021-10-18 19:28:50 +01:00
Jakub Pawlowski
4fef608423 Merge "server/audio: Add LeAudio support" 2021-10-18 18:21:02 +00:00
Treehugger Robot
210da8ceef Merge "[Telephony] Add more javadoc for carrier privileges" 2021-10-18 17:47:42 +00:00
Zoey Chen
9b66398997 [Telephony] Add more javadoc for carrier privileges
Bug: 192252210
Change-Id: I9f43b7ba2e0184d48149a3496559a4be6d07cf6a
Merged-In: I9f43b7ba2e0184d48149a3496559a4be6d07cf6a
Test: manual
2021-10-18 16:22:57 +00:00
Trevor Radcliffe
106fa79deb Merge "Migrate LockTaskTests to Soong" 2021-10-18 16:13:22 +00:00
Trevor Radcliffe
770099002a Merge "Migrate DynamicCodeLoggerIntegrationTests to Soong" 2021-10-18 16:12:52 +00:00
Grzegorz Kołodziejczyk
ad46dc5b5e server/audio: Add LeAudio support
This patch adds handling active device and set volume

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: Manual
Change-Id: I50a966ed2f199464381ff561fd83342b0a9b08a9
2021-10-18 14:32:45 +00:00
Treehugger Robot
f822fdf129 Merge "Fix Configuration.diff documentation." 2021-10-18 02:27:58 +00:00
Jakub Pawlowski
3e6f16c19f Merge "server/audio: Add Le audio messages to MESSAGE_MUTE_MUSIC" 2021-10-16 10:35:36 +00:00
Sudheer Shanka
37e891fce1 Merge "Fix an issue in NPMS blockedReasons computation logic." 2021-10-15 22:53:37 +00:00
Sudheer Shanka
0ca63ddebd Fix an issue in NPMS blockedReasons computation logic.
If an app does not have the permission to access network
in Restricted mode, we should be removing
ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS from the uid's
allowedReasons but right now, we end up removing all the
allowedReasons except ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS
and this could result in sending wrong network state to apps.

Bug: 202213533
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: Ibcae147bf4ba84ff91ef7038ffef8c33082b82ca
Merged-In: Ibcae147bf4ba84ff91ef7038ffef8c33082b82ca
(cherry picked from commit 259414efbc)
2021-10-15 14:03:06 -07:00
Guojing Yuan
1678f07605 Merge "Add OWNERS for services/companion" 2021-10-15 19:41:09 +00:00
Hui Wang
1465700c00 Merge "Update the BroadcastQueue logic for runtime permissions" 2021-10-15 16:48:15 +00:00
Kai Shi
fb799763d1 Merge "Bug fix: LCE list initialization" 2021-10-15 16:17:03 +00:00
Etienne Ruffieux
e8f2077fee Removed BluetoothDevice#prepareToEnterProcess
Tag: #feature
Bug: 200202780
Test: manual
Change-Id: I8d4be1da1bcb5b819c324f1a3a89c7dc317c31d6
2021-10-15 14:41:32 +00:00
Łukasz Rymanowski
3be9944e1f server/audio: Add Le audio messages to MESSAGE_MUTE_MUSIC
Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compile
Change-Id: Iaf41085d13a5b249f6ba3e6705e8a42234ace330
2021-10-15 13:41:09 +00:00
William Escande
e44b464866 Add a method to get rawContact
This remove the leak of hidden private field and add an api to get
entreprise raw contact
Bug: 194119078
Test: Build
Tag: #refactor

Change-Id: I9285cd54545e1359a4a7f57826ddb1a0e1dcdfbe
2021-10-15 13:33:52 +02:00
Jakub Pawlowski
ba8a56e93d Merge "settingslib/bluetooth: Add LeAudio support" 2021-10-15 09:55:05 +00:00
Alan Stokes
31a3297733 Merge "Update OWNERS" 2021-10-15 09:38:00 +00:00