Rename startFlowable() to isIpAddressValid()

This commit is contained in:
Adeel 2019-08-22 16:07:10 +05:00
parent e5bda9c395
commit fdca805717

View File

@ -398,7 +398,7 @@ public class ZimHostActivity extends BaseActivity implements
true);
progressDialog.show();
startFlowable();
isIpAddressValid();
});
builder.setTitle(getString(R.string.hotspot_dialog_title));
@ -411,7 +411,7 @@ public class ZimHostActivity extends BaseActivity implements
//Keeps checking if hotspot has been turned using the ip address with an interval of 1 sec
//If no ip is found after 15 seconds, dismisses the progress dialog
private void startFlowable() {
private void isIpAddressValid() {
Flowable.fromCallable(() -> ServerUtils.getIp())
.retryWhen(error -> error.delay(1, TimeUnit.SECONDS))
.timeout(15, TimeUnit.SECONDS)
@ -493,7 +493,7 @@ public class ZimHostActivity extends BaseActivity implements
true);
progressDialog.show();
startFlowable();
isIpAddressValid();
});