if (THROW) {
throw new UnimplementedWebViewApiException();
} else {
if (FULL_TRACE) {
Log.w(TAG, "Unimplemented WebView method called in: " +
Log.getStackTraceString(new Throwable()));
} else {
StackTraceElement[] trace = new Throwable().getStackTrace();
// The stack trace [0] index is this method (invoke()).
StackTraceElement unimplementedMethod = trace[1];
StackTraceElement caller = trace[2];
Log.w(TAG, "Unimplemented WebView method " + unimplementedMethod.getMethodName() +
" called from: " + caller.toString());
}
}