- Oct 19, 2021
-
-
Patrick Baumann authored
Change-Id: If4b080755701452c53d55f26380e887dc3944dbf
-
Treehugger Robot authored
* changes: Fix SntpClient 2036 issue (2/2) Fix SntpClient 2036 issue (1/2)
-
Neil Fuller authored
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
-
Neil Fuller authored
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
-
Ian Hua authored
-
Treehugger Robot authored
-
Jakub Pawlowski authored
-
- Oct 18, 2021
-
-
Jordan Liu authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Jordan Liu authored
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
-
Łukasz Rymanowski authored
Bug: 150670922 Tag: #feature Sponsor: jpawlowski@ Test: Manual Change-Id: I4d4af980b1d41860b1d3fc7bf22aeb29e8615d41
-
Jonathan Scott authored
-
Jonathan Scott authored
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
-
Jakub Pawlowski authored
-
Treehugger Robot authored
-
Zoey Chen authored
Bug: 192252210 Change-Id: I9f43b7ba2e0184d48149a3496559a4be6d07cf6a Merged-In: I9f43b7ba2e0184d48149a3496559a4be6d07cf6a Test: manual
-
Trevor Radcliffe authored
-
Trevor Radcliffe authored
-
Grzegorz Kołodziejczyk authored
This patch adds handling active device and set volume Bug: 150670922 Tag: #feature Sponsor: jpawlowski@ Test: Manual Change-Id: I50a966ed2f199464381ff561fd83342b0a9b08a9
-
Treehugger Robot authored
-
- Oct 16, 2021
-
-
Jakub Pawlowski authored
-
- Oct 15, 2021
-
-
Sudheer Shanka authored
-
Sudheer Shanka authored
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 259414ef)
-
Guojing Yuan authored
-
Hui Wang authored
-
Kai Shi authored
-
Etienne Ruffieux authored
Tag: #feature Bug: 200202780 Test: manual Change-Id: I8d4be1da1bcb5b819c324f1a3a89c7dc317c31d6
-
Łukasz Rymanowski authored
Bug: 150670922 Tag: #feature Sponsor: jpawlowski@ Test: compile Change-Id: Iaf41085d13a5b249f6ba3e6705e8a42234ace330
-
William Escande authored
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
-
Jakub Pawlowski authored
-
Alan Stokes authored
-
Treehugger Robot authored
-
Łukasz Rymanowski authored
Bug: 150670922 Tag: #feature Sponsor: jpawlowski@ Test: Manual Merged-In: I45402a6d315d8ccc2bc756bdc9937e81eea3c58a Change-Id: I45402a6d315d8ccc2bc756bdc9937e81eea3c58a
-
Alice Kuo authored
Remove createBond from settingLib. SystemUI and Setting have the individual settingLib instance. If we trigger pairing inside settingLib, the action would be called twice. Bug: 201758444 Bug: 150670922 Test: Pair the coordinated set devices, and check the set member pairing would be done automatically without the pairing dialog Change-Id: I289b8af857530f0fb207b777d09d94549cfdf553
-
Ashwini Oruganti authored
Previously, we were skipping a broadcast when either the permission or the app op was granted. However, for runtime permissions to be considered "granted" both the permission and the app op need to be granted. This change updates taking this into account. Test: manual Bug: 202436287 Bug: 183537857 Change-Id: I9f12f9e17e61246d723d18ead93c6115bbf6d5cf
-
- Oct 14, 2021
-
-
Elliott Hughes authored
-
Guojing Yuan authored
Change-Id: Iaef71cf1c01b2ca625431bcbfa2faf5a20c18e89
-
Trevor Radcliffe authored
Fixes: 203118260 Test: Confirmed apks are installed as expected Test: Treehugger Change-Id: I764c788330da5c1597566ec723b31b7443c51eaf
-
Christian Wailes authored
-