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

Commit 229a149a authored by Rubin Xu's avatar Rubin Xu Committed by Automerger Merge Worker
Browse files

Merge "Fix LockSettingsServiceTest" am: 3ccd60f4 am: 6f592023 am: cf830697

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675899

Change-Id: I2614db2ead6d24e11fa6e3a83ce1e443202610a8
parents 43dfe44a cf830697
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1261,7 +1261,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;
    }
}