Merge "Use correct call to get the user ID"

This commit is contained in:
TreeHugger Robot
2018-03-30 15:56:25 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -16,6 +16,7 @@
package android.security;
import android.app.ActivityManager;
import android.app.ActivityThread;
import android.app.Application;
import android.app.KeyguardManager;
@@ -547,7 +548,7 @@ public class KeyStore {
args = args != null ? args : new KeymasterArguments();
entropy = entropy != null ? entropy : new byte[0];
if (!args.containsTag(KeymasterDefs.KM_TAG_USER_ID)) {
args.addUnsignedInt(KeymasterDefs.KM_TAG_USER_ID, UserHandle.getCallingUserId());
args.addUnsignedInt(KeymasterDefs.KM_TAG_USER_ID, ActivityManager.getCurrentUser());
}
return mBinder.begin(getToken(), alias, purpose, pruneable, args, entropy, uid);
} catch (RemoteException e) {