diff options
| author | 2022-02-21 20:12:40 +0000 | |
|---|---|---|
| committer | 2022-05-10 10:01:58 +0000 | |
| commit | 2ff5ec1aadb1d2ee8fc6e616bc2e6ba6189dcf39 (patch) | |
| tree | 9c9a4fb776799520690fa0464722ee2f71f53367 /packages/Shell | |
| parent | 69c6a42de0104acdee4f109a9609dfddfa728f64 (diff) | |
Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.
This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.
The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.
Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Merged-In: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Diffstat (limited to 'packages/Shell')
| -rw-r--r-- | packages/Shell/AndroidManifest.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 8b27522cd5b0..c7d2d7934968 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -473,6 +473,12 @@ <uses-permission android:name="android.permission.MANAGE_TIME_AND_ZONE_DETECTION" /> <uses-permission android:name="android.permission.SUGGEST_EXTERNAL_TIME" /> + <!-- Permissions used for manual testing of time detection behavior. --> + <uses-permission android:name="android.permission.SUGGEST_MANUAL_TIME" /> + <uses-permission android:name="android.permission.SUGGEST_TELEPHONY_TIME" /> + <uses-permission android:name="android.permission.SUGGEST_NETWORK_TIME" /> + <uses-permission android:name="android.permission.SUGGEST_GNSS_TIME" /> + <!-- Permission required for CTS test - android.server.biometrics --> <uses-permission android:name="android.permission.USE_BIOMETRIC" /> |