Change how HiddenApiTest is ignored for JUnit 3

The change made in I4a7788af256672e28c86cc9d73dbe1214d88bdb4 does
not work on android12-tests-dev because it is still using JUnit3.
It didn't receive the change from
Idd4df74d17cd396a1e751279e221497889702ed4. Porting that back can
be more complicated for the purposes of the bug.

Bug: 378992956
Test: m cts-api-signature-test
Merged-In: Idd4df74d17cd396a1e751279e221497889702ed4
Change-Id: I973481622f68ecbb3fe1e532ab03c722a9e5b8d2
2 files changed