Refactored location of passcode check: a callback to rule them all
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / Preferences.java
index ef9e39a..313a07b 100644 (file)
@@ -168,7 +168,7 @@ public class Preferences extends SherlockPreferenceActivity
                 @Override
                 public boolean onPreferenceChange(Preference preference, Object newValue) {
                     Intent i = new Intent(getApplicationContext(), PinCodeActivity.class);
-                    i.putExtra(PinCodeActivity.EXTRA_ACTIVITY, "preferences");
+                    i.setAction(PinCodeActivity.ACTION_TOGGLE);
                     i.putExtra(PinCodeActivity.EXTRA_NEW_STATE, newValue.toString());
                     startActivity(i);