Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4efe9a88 authored by felipeal's avatar felipeal
Browse files

Log more info on StorageManagerService.unlockUserKey()

Bug: 153875732
Test: adb logcat

Change-Id: Ib3de8847081b186c99078d9daa7e49e6eadd445d
parent e7979623
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3215,10 +3215,14 @@ class StorageManagerService extends IStorageManager.Stub

    @Override
    public void unlockUserKey(int userId, int serialNumber, byte[] token, byte[] secret) {
        Slog.d(TAG, "unlockUserKey: " + userId);
        boolean isFsEncrypted = StorageManager.isFileEncryptedNativeOrEmulated();
        Slog.d(TAG, "unlockUserKey: " + userId
                + " isFileEncryptedNativeOrEmulated: " + isFsEncrypted
                + " hasToken: " + (token != null)
                + " hasSecret: " + (secret != null));
        enforcePermission(android.Manifest.permission.STORAGE_INTERNAL);

        if (StorageManager.isFileEncryptedNativeOrEmulated()) {
        if (isFsEncrypted) {
            try {
                mVold.unlockUserKey(userId, serialNumber, encodeBytes(token),
                        encodeBytes(secret));