OSDN Git Service

Add userId to RecoverableKeyStoreDb
authorRobert Berry <robertberry@google.com>
Thu, 21 Dec 2017 13:37:23 +0000 (13:37 +0000)
committerRobert Berry <robertberry@google.com>
Thu, 21 Dec 2017 13:37:23 +0000 (13:37 +0000)
commitb7c06ea06a7d18d02becb100958d47c9d96369b5
treeedb83def5fe19d9f3ddc2913b9868ed18deb08c6
parent24721ea0f744e0271f005d057e7972a965544485
Add userId to RecoverableKeyStoreDb

We need to store the userId (i.e., the uid of the *profile*, not the
app), as well as the app uid. This is because when the screen is
unlocked, the unlock is associated with a specific user profile, not
a specific app. So at that point we need to look up all keys that
are pending sync for that *user*, and upload them to the remote
storage.

Test: adb shell am instrument -w -e package com.android.server.locksettings.recoverablekeystore com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I6c456cca8974f5e1a15dfde6e9dd4e6bf4c16065
services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGenerator.java
services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbContract.java
services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbHelper.java
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/RecoverableKeyGeneratorTest.java
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDbTest.java