private static @Nullable ActivityId readActivityId(@NotNull DataInput in) throws IOException {
    String kind = DataStreamUtil.readStringOrNull(in);
    String provider = DataStreamUtil.readStringOrNull(in);
    if (kind == null || provider == null) return null;
    return new ActivityId(provider, kind);
  }
private static @Nullable ActivityId readActivityId(@NotNull DataInput in)