I had just finished my exam paper when the bell rang,announcing the class was over.announcing表

问题描述:

I had just finished my exam paper when the bell rang,announcing the class was over.announcing表
我不是被宣布吗?这里怎么可以用announcing?

这里announcing的主语是bell rang.
因此这句话还可以写成I had just finished my exam paper when the bell rang which announcing the class was over.
不知道对不对,