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

Commit 3ccd60f4 authored by Rubin Xu's avatar Rubin Xu Committed by Gerrit Code Review
Browse files

Merge "Fix LockSettingsServiceTest"

parents 6c57d63f 074a8b70
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1259,7 +1259,8 @@ public class LockSettingsService extends ILockSettings.Stub {
        return getCredentialTypeInternal(userId) != CREDENTIAL_TYPE_NONE;
    }

    private void setKeystorePassword(byte[] password, int userHandle) {
    @VisibleForTesting /** Note: this method is overridden in unit tests */
    void setKeystorePassword(byte[] password, int userHandle) {
        AndroidKeyStoreMaintenance.onUserPasswordChanged(userHandle, password);
    }

+6 −1
Original line number Diff line number Diff line
@@ -208,4 +208,9 @@ public class LockSettingsServiceTestable extends LockSettingsService {
            parcel.recycle();
        }
    }

    @Override
    void setKeystorePassword(byte[] password, int userHandle) {

    }
}
 No newline at end of file
+12 −0
Original line number Diff line number Diff line
@@ -20,11 +20,16 @@ import android.app.KeyguardManager;
import android.app.NotificationManager;
import android.app.admin.DevicePolicyManager;
import android.app.trust.TrustManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.hardware.face.FaceManager;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Handler;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;

@@ -94,4 +99,11 @@ public class MockLockSettingsContext extends ContextWrapper {
    public int checkCallingOrSelfPermission(String permission) {
        return PackageManager.PERMISSION_GRANTED;
    }

    @Override
    public Intent registerReceiverAsUser(BroadcastReceiver receiver,
            UserHandle user, IntentFilter filter, String broadcastPermission,
            Handler scheduler) {
        return null;
    }
}