Webview context is set while calling getCurrentUrl()

Calling this method sets the context to the WEBVIEW_XX and then returns the url.
driver.context(WEBVIEW_XX).getCurrentUrl()
Is there a way to get the currentUrl without setting the context?

Usecase :
for(String handle:handles) {
if(driver.context(handle).getCurrentUrl().contains(“Desired URL”)){
driver.context(handle);
}
}
Here the context is implicitly set when getCurrentUrl() is called.