Skip to content
Snippets Groups Projects
  1. Sep 08, 2023
    • Joe Onorato's avatar
      add LaMont to build OWNERS · 87468e6d
      Joe Onorato authored
      Test: none
      Change-Id: I122b44261ac892ebab2c0867c27b9b9badc2f0bc
      87468e6d
    • Elliott Hughes's avatar
    • Ryan Prichard's avatar
    • Elliott Hughes's avatar
      Use localtime_r() on Windows too. · 7930f2f2
      Elliott Hughes authored
      I don't know why I didn't clean these up when I learned about this
      trick.
      
      Test: treehugger
      Change-Id: Iec74cab28c782a61ef3e48210f3a48043e981212
      7930f2f2
    • Eric Biggers's avatar
      Merge changes I0880685c,I865ec19d,Id3a1e34b,I31c4f4d2,I17103be4 into main · b2348adb
      Eric Biggers authored
      * changes:
        Fix refreshDeviceLockedForUser() to use correct trust state
        Improve LockStateTrackingRule
        Add flag fix_unlocked_device_required_keys
        Fix kotlin nullable errors in TrustTests
        Include TrustState in TrustManagerService dumpUser
      b2348adb
    • Eric Biggers's avatar
    • Vania Januar's avatar
    • Eric Biggers's avatar
      Fix refreshDeviceLockedForUser() to use correct trust state · c6772277
      Eric Biggers authored
      TrustManagerService#refreshDeviceLockedForUser() incorrectly considers
      the device to be unlocked by a trust agent whenever a trust agent has
      granted trust.  This ignores the conditions that
      TrustManagerService#updateTrust() has for recognizing trust grants.
      This code used to be correct, but it became incorrect in Android 10 when
      trust agents were made to extend unlock rather than actively unlock.
      
      The correct state is sent to Keyguard, while the incorrect state is sent
      to Keystore.  This would cause UnlockedDeviceRequired keys to sometimes
      be usable when the device is locked, though since Android 12 this bug is
      hidden by other bugs with UnlockedDeviceRequired keys that make them
      unusable in many cases.  However, these bugs are planned to be fixed.
      
      Therefore, fix this bug by making refreshDeviceLockedForUser() use
      mUserTrustState, which holds the user's authoritative trust state.
      
      Bug: 296464083
      Bug: 298249081
      Flag: 296464083
      Test: adb shell device_config put hardware_backed_security android.security.fix_unlocked_device_required_keys true
            atest TrustTests
            adb shell device_config put hardware_backed_security android.security.fix_unlocked_device_required_keys false
            atest TrustTests
      Change-Id: I0880685c23ebe71a799671fa611fafb42642fa83
      c6772277
    • Eric Biggers's avatar
      Improve LockStateTrackingRule · 37873686
      Eric Biggers authored
      - Make assertLocked and assertUnlocked check
        KeyguardManager#isDeviceLocked, in addition to what they were checking
        before.  This is important, as this verifies what TrustManagerService
        (and thus also Keystore) considers the device locked state to be.
      
      - Rename assertUnlocked to assertUnlockedAndTrusted.  This makes it
        clear that it checks for trusted (which implies unlocked), not just
        unlocked (which does not necessarily imply trusted).
      
      - Rename the inner class LockState to TrustState.  This makes it clear
        what it actually is.
      
      - Improve the class comment.
      
      Bug: 296464083
      Bug: 298249081
      Flag: TEST_ONLY
      Test: atest TrustTests
      Change-Id: I865ec19dff7ebe00ff083da29154e3c9cb846574
      37873686
    • Eric Biggers's avatar
      Add flag fix_unlocked_device_required_keys · 3391fd85
      Eric Biggers authored
      Bug: 296464083
      Change-Id: Id3a1e34bfc2d4fbc3ea1c6bfb8fa55d3c28d1687
      3391fd85
    • Colin Cross's avatar
      Fix kotlin nullable errors in TrustTests · 5f70c172
      Colin Cross authored
      Fix kotlin nullable errors that were exposed by setting the retention
      of android.annotation.NonNull and android.annotation.Nullable to
      class retention.
      
      Bug: 294110802
      Test: builds
      Change-Id: I31c4f4d256ff8dd2b6ed1f6ed74844ccaf7a4814
      Merged-In: I31c4f4d256ff8dd2b6ed1f6ed74844ccaf7a4814
      (cherry picked from commit c5a0cfdd)
      5f70c172
    • Eric Biggers's avatar
      Include TrustState in TrustManagerService dumpUser · 447abc81
      Eric Biggers authored
      TrustManagerService dumps the raw aggregated trustable value for each
      user, which is not useful because it is not the authoritative trust
      state for the user, and it's a computed value (i.e., not real state)
      that is computed from other state already dumped.  Therefore, dump the
      TrustState instead which is real state that is much more useful.
      
      Test: adb shell dumpsys trust
      Flag: exempt, straightforward fix that only affects bugreports
      Change-Id: I17103be4d0cc2545e3bdcb1656b35f2d287b01d5
      447abc81
    • Thiébaud Weksteen's avatar
      Merge changes I08f5aa3e,I7876e44c,I4e90a045 into main · 0959d41b
      Thiébaud Weksteen authored
      * changes:
        Support multiple modules for lint_fix
        Add utility lint for metrics on @EnforcePermission
        Move AidlImplementationDetector from global to common
      0959d41b
    • Ryan Prichard's avatar
  2. Sep 07, 2023
  3. Sep 06, 2023
  4. Sep 05, 2023
    • Tomasz Wasilczyk's avatar
      Migrate String8|16.setTo to assignment operator · 31eb3c89
      Tomasz Wasilczyk authored
      Bug: 295394788
      Test: make checkbuild
      Change-Id: I370f66c469de73064dec2e42c539dc236dd69d1e
      31eb3c89
    • Shunkai Yao's avatar
      Merge "Avoid Object.wait(0)" into main · a199526d
      Shunkai Yao authored
      a199526d
    • Victor Hsieh's avatar
      Add per-file owner for KeyChainSystemService.java · a6dcc764
      Victor Hsieh authored
      Bug: 291751402
      Test: N/A
      Change-Id: Ibfd0f41bc49c7c72e31a9c45f760edba93fbfe32
      a6dcc764
    • Mark Hansen's avatar
      Dispatch from DecorView to View.toString() · 14de11ee
      Mark Hansen authored
      Today, the top-level DecorView is missing some useful pieces of data in its dump, for example the "V"isible and "E"nabled and "I"nvalidated and "D"irty flags. Add these back in.
      
      Today it looks like:
      
      ```
          View Hierarchy:
            DecorView@41b7f45[MapsActivity]
              android.widget.LinearLayout{a1c3dbb V.E...... ......ID 208,0-1920,1080}
                android.view.ViewStub{c5878e4 G.E...... ......I. 0,0-0,0 #1020194 android:id/action_mode_bar_stub}
      ```
      
      Note how the DecorView doesn't have the deep debug info the other views do.
      
      This change updates toString to work the same as the other views, but including the extra title suffix information.
      
      This is a new version of aosp/2276228, but on the main branch.
      
      Change-Id: I35415f7625dc99a80412f6656800504eea876d91
      14de11ee
  5. Sep 04, 2023
    • Chiachang Wang's avatar
      Add VPN name into the extra info of NetworkInfo · 9ce403e2
      Chiachang Wang authored
      Add the extra info of a VPN network to provide helpful
      debugging info.
      
      The validation logs in the dumpsys of NetworkStack refer to
      the extra info from NetworkInfo of the given network.
      But the extra info in a VPN NetworkInfo is empty so the name
      will be null. It's hard to tell the exact name information
      from only dumpsys of NetworkStack.
      
      Bug: 297790570
      Test: atest FrameworksNetTests
      Change-Id: I7cf5f30db9a9bbc0361e5dc6bf4d8f533e12f5c8
      9ce403e2
Loading