Skip to content
Snippets Groups Projects
  1. Oct 27, 2023
  2. Oct 26, 2023
  3. Oct 25, 2023
  4. Oct 24, 2023
    • Eric Biggers's avatar
      Use isCeStorageUnlocked() in package manager · d0d241e7
      Eric Biggers authored
      isUserKeyUnlocked() is being renamed to isCeStorageUnlocked() to make it
      clear what it does (considering that there are many types of user keys).
      Temporarily, the method exists under both names.  Change the package
      manager to use the new name.  No change in behavior.
      
      Bug: 306204742
      Flag: exempt, mechanical refactoring
      Test: presubmit
      Change-Id: I66db78ce40618f1c5b263c826eb5984bfe92eab1
      d0d241e7
    • Eric Biggers's avatar
      Improve documentation for unlockUserKeyIfUnsecured() · 912e35b6
      Eric Biggers authored
      Document more clearly what unlockUserKeyIfUnsecured() actually does.  It
      probably should be renamed to something clearer (I'm thinking of just
      changing "Key" to "Keys"), but this is a start.
      
      Bug: 306204742
      Flag: exempt, comment-only change
      Test: presubmit
      Change-Id: Ib35a62fb4627db5755fac57609b1fbb3a659492d
      912e35b6
    • Eric Biggers's avatar
      Use isCeStorageUnlocked() in StrictMode.java · 132300bd
      Eric Biggers authored
      isUserKeyUnlocked() is being renamed to isCeStorageUnlocked() to make it
      clear what it does (considering that there are many types of user keys).
      Change StrictMode.java to use the new name.  No change in behavior.
      
      Bug: 306204742
      Flag: exempt, mechanical refactoring
      Test: presubmit
      Change-Id: I4616b55cc4a088cfd396cc1b4ad60f3ecfed942b
      132300bd
    • Eric Biggers's avatar
      Rename methods for creating and destroying user's storage keys · de2637e2
      Eric Biggers authored
      Users have many cryptographic keys, such as:
      
      - Storage (file-based encryption) keys, both CE and DE
      - Keystore super keys, both AfterFirstUnlock and UnlockedDeviceRequired
      - Keystore client keys
      - Synthetic password and the Keystore key that encrypts it
      
      Unfortunately, many StorageManager, vold, and LockSettingsService
      methods refer simply to "UserKey".  It isn't clear or consistent which
      key(s) they mean.  For example, unlockUserKey unlocks CE storage,
      createUserKey creates both the CE and DE keys, and
      unlockUserKeyIfUnsecured unlocks CE storage but also does other things.
      With the planned fixes to handle Keystore super keys more similarly to
      the CE storage key (b/296464083), this confusion will increase further.
      
      This CL is the second part of fixing this.  It renames the following
      methods of StorageManager to make it clearer what they do:
      
         createUserKey => createUserStorageKeys
         destroyUserKey => destroyUserStorageKeys
      
      No change in behavior, except a changed trace tag name and log message.
      
      Bug: 306204742
      Flag: exempt, mechanical refactoring
      Test: presubmit
      Change-Id: I5894beb97823dced5954e405d779fada49c79e8d
      de2637e2
    • Eric Biggers's avatar
      Rename methods for unlocking, locking, and protecting CE storage · aaec88c7
      Eric Biggers authored
      Users have many cryptographic keys, such as:
      
      - Storage (file-based encryption) keys, both CE and DE
      - Keystore super keys, both AfterFirstUnlock and UnlockedDeviceRequired
      - Keystore client keys
      - Synthetic password and the Keystore key that encrypts it
      
      Unfortunately, many StorageManager, vold, and LockSettingsService
      methods refer simply to "UserKey".  It isn't clear or consistent which
      key(s) they mean.  For example, unlockUserKey unlocks CE storage,
      createUserKey creates both the CE and DE keys, and
      unlockUserKeyIfUnsecured unlocks CE storage but also does other things.
      With the planned fixes to handle Keystore super keys more similarly to
      the CE storage key (b/296464083), this confusion will increase further.
      
      This CL is the first part of fixing this.  It renames the following
      StorageManager methods to make it clear that they deal with CE storage:
      
         unlockUserKey => unlockCeStorage
         lockUserKey => lockCeStorage
         setUserKeyProtection => setCeStorageProtection
      
      In addition, it starts the renaming of:
      
         isUserKeyUnlocked => isCeStorageUnlocked
      
      However, isUserKeyUnlocked is used more widely and is also a @TestApi,
      so for now it still exists alongside the new name.  Later CLs will
      convert the remaining callers of isUserKeyUnlocked to use the new name.
      
      No change in behavior except for some changed log messages.
      
      Bug: 306204742
      Flag: exempt, mechanical refactoring
      Test: presubmit
      Change-Id: I202ebbfd2b4f79fedb3ed120a8ad81500c126894
      aaec88c7
    • Prabir Pradhan's avatar
      Remove HID usage mapping for stylus buttons in Generic.kl · 2c42929c
      Prabir Pradhan authored
      ... until we figure out a way to determine if a device supports a
      specific HID usage code. Right now, having a usage code mapping means we
      automatically assume the device can report the key code. Assuming a
      device can support a stylus keycode makes the device get classified as a
      stylus, leading to widespread misclassifications.
      
      Bug: 291529805
      Test: atest inputflinger_tests
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5fb192aaec7a1d4ebb1384d96b3f79d4b2ca2f2c)
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:55930e07d69fbd8ffd27d677a06fd0ba71a30bf8)
      Merged-In: I580514bdcbbfbe93df83fa3faa6262077e881243
      Change-Id: I580514bdcbbfbe93df83fa3faa6262077e881243
      2c42929c
Loading