This repository was archived by the owner on Jul 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
app/src/main/java/com/zulip/android/activities Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 19
19
import android .util .Patterns ;
20
20
import android .view .View ;
21
21
import android .view .inputmethod .InputMethodManager ;
22
- import android .webkit .URLUtil ;
23
22
import android .widget .Button ;
24
23
import android .widget .EditText ;
25
24
import android .widget .ImageView ;
41
40
import com .zulip .android .networking .util .DefaultCallback ;
42
41
import com .zulip .android .util .ActivityTransitionAnim ;
43
42
import com .zulip .android .util .AnimationHelper ;
44
- import com .zulip .android .util .Constants ;
45
43
import com .zulip .android .util .CommonProgressDialog ;
44
+ import com .zulip .android .util .Constants ;
46
45
47
46
import org .json .JSONException ;
48
47
import org .json .JSONObject ;
@@ -263,10 +262,10 @@ public void onSaveInstanceState(Bundle savedInstanceState) {
263
262
264
263
private boolean isUrlValid (String url ) {
265
264
if (BuildConfig .DEBUG ) {
266
- return URLUtil . isValidUrl (String .valueOf (url )) ||
265
+ return Patterns . WEB_URL . matcher (String .valueOf (url )). matches ( ) ||
267
266
Patterns .IP_ADDRESS .matcher (url ).matches ();
268
267
} else {
269
- return URLUtil . isValidUrl (String .valueOf (url ));
268
+ return Patterns . WEB_URL . matcher (String .valueOf (url )). matches ( );
270
269
}
271
270
}
272
271
You can’t perform that action at this time.
0 commit comments