question: public static boolean isYouTubeUrl ( String url ) { if ( TextUtils . isEmpty ( url ) ) { return false ; } Uri uri = Uri . parse ( url ) ; String authority = uri . getAuthority ( ) ; if ( ! TextUtils . isEmpty ( authority ) && authority . contains ( "youtube.com" ) ) { return true ; } else { return false ; } }
target:  Checks to see if the your contains the authority "youtube.com"