File tree Expand file tree Collapse file tree
src/com/salesforce/androidsdk
native/NativeSampleApps/RestExplorer/res/xml Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<servers >
33 <server name =" Production" url =" https://login.salesforce.com" />
4- <server name =" Welcome" url =" https://welcome.salesforce.com" />
4+ <server name =" Welcome" url =" https://welcome.salesforce.com/discovery " />
55 <server name =" Sandbox" url =" https://test.salesforce.com" />
66</servers >
Original file line number Diff line number Diff line change 3030import android .content .SharedPreferences ;
3131import android .content .SharedPreferences .Editor ;
3232import android .content .res .XmlResourceParser ;
33+ import android .os .Looper ;
3334
3435import androidx .annotation .NonNull ;
3536import androidx .lifecycle .MutableLiveData ;
@@ -61,7 +62,7 @@ public class LoginServerManager {
6162
6263 // Default login servers.
6364 public static final String PRODUCTION_LOGIN_URL = "https://login.salesforce.com" ;
64- public static final String WELCOME_LOGIN_URL = "https://welcome.salesforce.com" ;
65+ public static final String WELCOME_LOGIN_URL = "https://welcome.salesforce.com/discovery " ;
6566 public static final String SANDBOX_LOGIN_URL = "https://test.salesforce.com" ;
6667
6768 // Keys used in shared preferences.
@@ -167,7 +168,11 @@ public void setSelectedLoginServer(LoginServer server) {
167168 edit .putString (SERVER_URL , server .url );
168169 edit .putBoolean (IS_CUSTOM , server .isCustom );
169170 edit .apply ();
170- selectedServer .postValue (server );
171+ if (Looper .myLooper () == Looper .getMainLooper ()) {
172+ selectedServer .setValue (server );
173+ } else {
174+ selectedServer .postValue (server );
175+ }
171176 }
172177
173178 /**
You can’t perform that action at this time.
0 commit comments