@CanIgnoreReturnValue
  public synchronized AndroidKeysetManager setPrimary(int keyId) throws GeneralSecurityException {
    keysetManager = keysetManager.setPrimary(keyId);
    write(keysetManager.getKeysetHandle(), writer, masterAead);
    return this;
  }
Sets the key with {@code keyId} as primary.

@throws GeneralSecurityException if the key is not found or not enabled
java_src/src/main/java/com/google/crypto/tink/integration/android/AndroidKeysetManager.java