Merge "Replace flag check to sdk version check" into main