The android.net.Uri documentation states:
"In the interest of performance, this class performs little to no validation. Behavior is undefined for invalid input. This class is very forgiving--in the face of invalid input, it will return garbage rather than throw an exception unless otherwise specified."
It supplies a method normalizeScheme() that states:
"This method does not validate bad URI's, or 'fix' poorly formatted URI's - so do not use it for input validation. A Uri will always be returned, even if the Uri is badly formatted to begin with and a scheme component cannot be found."
The above surely explains what the class does not do. But it has no reference to how you should go about doing validation if you need to. Searching through Stack Overflow and Google I did not turn up anything useful either.
So, if you are receiving Uri data from user input how should you go about validating it?