Refresh rate problem

When I’m entering fullscreen I’m also changing display mode, but my app can’t use the best refresh rate avilable in the system at specified screen res.
getRefreshRate returns REFRESH_RATE_UNKNOWN. So is there java based workaround for this or should I write res. switching function in native code?