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

Commit 5ead731c authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Annotate KeyStore service as never null

Bug: 245258360
Change-Id: I4d9215486df275012dad495730ce0ff00839b7a6
Test: TH
parent f9d8bb25
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.system.keystore2.ResponseCode;
import android.util.Log;

import java.util.Calendar;
import java.util.Objects;

/**
 * @hide This should not be made public in its present form because it
@@ -137,13 +138,13 @@ public class KeyStore2 {
        return new KeyStore2();
    }

    private synchronized IKeystoreService getService(boolean retryLookup) {
    @NonNull private synchronized IKeystoreService getService(boolean retryLookup) {
        if (mBinder == null || retryLookup) {
            mBinder = IKeystoreService.Stub.asInterface(ServiceManager
                    .getService(KEYSTORE2_SERVICE_NAME));
            Binder.allowBlocking(mBinder.asBinder());
        }
        return mBinder;
        return Objects.requireNonNull(mBinder);
    }

    void delete(KeyDescriptor descriptor) throws KeyStoreException {