Allow explicit GC usage for StrictMode setClassInstanceLimit

This wraps the calls to System.GC() in a disabling of the explicit gc checks from another strict mode so that those calls do not produce a crash when SetClassInstanceLimit is used.

Change-Id: I54d2ff975838e3f54879de3fbff25614137b31df
Test: atest testClassInstanceLimit
Bug: 305288285
1 file changed