diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java index 912598a..10792f0 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java @@ -153,9 +153,10 @@ public class LoginActivity extends AppCompatActivity { private void loginProcess(String email, String password) { - ValidateUser user = new ValidateUser(email, password); - - disposable.add(ldapService.validate(user) +// ValidateUser user = new ValidateUser(email, password); + LdapUser fakeuser = new LdapUser(email,password,"wmi","tutor","szalonoki","moody",email); +// disposable.add(ldapService.validate(user) + disposable.add(ldapService.fakeValidate(fakeuser) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::handleResponse, this::handleError)); diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java index e08ad48..6771146 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java @@ -121,7 +121,7 @@ public class SharingFragment extends PreferenceFragment { /** Sharing level list **/ locationMode.setOnPreferenceChangeListener((preference, newValue) -> { PrefUtils.storeLocationMode(getApplicationContext(),locationLevelMapping.get(Integer.parseInt((String) newValue))); - if(PrefUtils.getLocationLevel(getApplicationContext()) == "manual"){ + if(PrefUtils.getLocationLevel(getApplicationContext()).equals("manual") ){ preferenceCategory.addPreference(manualLocationList); preferenceCategory.addPreference(manualLocationButton); @@ -140,6 +140,8 @@ public class SharingFragment extends PreferenceFragment { /** Custom manual location list change listener **/ manualLocationList.setOnPreferenceChangeListener((preference, newValue) -> { ListPreference lp = (ListPreference) preference; + CharSequence [] entries = lp.getEntries(); +// PrefUtils.putManualLocation(getApplicationContext(),(String) entries[Integer.parseInt((String) newValue)]); //ToDo handle manual location change return true;