@@ -2107,6 +2107,14 @@ public void afterTextChanged(Editable s) {
21072107 }
21082108 }
21092109 }
2110+ CountrySelectActivity .Country countryWithCode = new CountrySelectActivity .Country ();
2111+ String test_code = "999" ;
2112+ countryWithCode .name = "Test Backend" ;
2113+ countryWithCode .code = test_code ;
2114+ countryWithCode .shortname = "EX" ;
2115+ countriesArray .add (countryWithCode );
2116+ codesMap .put (test_code , countryWithCode );
2117+ phoneFormatMap .put (test_code , Collections .singletonList ("66 X XXXX" ));
21102118 }
21112119 });
21122120 }, ConnectionsManager .RequestFlagWithoutLogin | ConnectionsManager .RequestFlagFailOnServerErrors );
@@ -2438,12 +2446,17 @@ private void onConfirm(PhoneNumberConfirmView confirmView) {
24382446 }
24392447 String phone = PhoneFormat .stripExceptNumbers ("" + codeField .getText () + phoneField .getText ());
24402448 if (activityMode == MODE_LOGIN ) {
2441- boolean testBackend = BuildVars .DEBUG_PRIVATE_VERSION && getConnectionsManager ().isTestBackend ();
2449+ if (!testBackend && "999" .equals (codeField .getText ().toString ())) {
2450+ testBackend = true ;
2451+ if (testBackendCheckBox != null ) {
2452+ testBackendCheckBox .setChecked (true , true );
2453+ }
2454+ }
2455+ boolean testBackend = getConnectionsManager ().isTestBackend ();
24422456 if (testBackend != LoginActivity .this .testBackend ) {
24432457 getConnectionsManager ().switchBackend (false );
24442458 testBackend = LoginActivity .this .testBackend ;
24452459 }
2446-
24472460 if (getParentActivity () instanceof LaunchActivity ) {
24482461 for (int a = 0 ; a < UserConfig .MAX_ACCOUNT_COUNT ; a ++) {
24492462 UserConfig userConfig = UserConfig .getInstance (a );
0 commit comments