Don't let apps enable compat changes past the SDK

Currently only app target sdk is considered for enabling combat changes.
Modifying the condition to check both platform version and app target sdk.

Bug: 312266666
Test: atest PlatformCompatTest
Test: atest CompatConfigTest
Change-Id: I444f47f04d2ecaf02a0a23c6a9de8283ecfb9cf1
2 files changed