diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index f36e070336..41b4d0e9c9 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
diff --git a/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java b/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
index 1ea95d6d9f..4dc7a4a7a6 100644
--- a/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
+++ b/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
@@ -758,8 +758,10 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
* Toggle between standard menu and account list including saving the state.
*/
private void toggleAccountList() {
- mIsAccountChooserActive = !mIsAccountChooserActive;
- showMenu();
+ if (getResources().getBoolean(R.bool.allow_profile_click)) {
+ mIsAccountChooserActive = !mIsAccountChooserActive;
+ showMenu();
+ }
}
/**
diff --git a/src/main/java/com/owncloud/android/ui/activity/Preferences.java b/src/main/java/com/owncloud/android/ui/activity/Preferences.java
index b67476f3a6..ef2d5cb785 100644
--- a/src/main/java/com/owncloud/android/ui/activity/Preferences.java
+++ b/src/main/java/com/owncloud/android/ui/activity/Preferences.java
@@ -43,6 +43,7 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
+import android.preference.SwitchPreference;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
@@ -100,9 +101,9 @@ public class Preferences extends PreferenceActivity
*/
private Uri mUri;
- private CheckBoxPreference pCode;
- private CheckBoxPreference fPrint;
- private CheckBoxPreference mShowHiddenFiles;
+ private SwitchPreference pCode;
+ private SwitchPreference fPrint;
+ private SwitchPreference mShowHiddenFiles;
private Preference pAboutApp;
private AppCompatDelegate mDelegate;
@@ -167,16 +168,16 @@ public class Preferences extends PreferenceActivity
// Synced folders
PreferenceCategory preferenceCategoryFolderSync = (PreferenceCategory) findPreference("folder_sync");
+ PreferenceScreen preferenceScreen = (PreferenceScreen) findPreference("preference_screen");
if (!getResources().getBoolean(R.bool.syncedFolder_light)) {
- PreferenceScreen preferenceScreen = (PreferenceScreen) findPreference("preference_screen");
preferenceScreen.removePreference(preferenceCategoryFolderSync);
} else {
// Upload on WiFi
final ArbitraryDataProvider arbitraryDataProvider = new ArbitraryDataProvider(getContentResolver());
final Account account = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
- final CheckBoxPreference pUploadOnWifiCheckbox = (CheckBoxPreference) findPreference("synced_folder_on_wifi");
+ final SwitchPreference pUploadOnWifiCheckbox = (SwitchPreference) findPreference("synced_folder_on_wifi");
pUploadOnWifiCheckbox.setChecked(
arbitraryDataProvider.getBooleanValue(account, SYNCED_FOLDER_LIGHT_UPLOAD_ON_WIFI));
@@ -211,9 +212,9 @@ public class Preferences extends PreferenceActivity
PreferenceCategory preferenceCategoryDetails = (PreferenceCategory) findPreference("details");
-
- pCode = (CheckBoxPreference) findPreference(PassCodeActivity.PREFERENCE_SET_PASSCODE);
- if (pCode != null) {
+ boolean fPassCodeEnabled = getResources().getBoolean(R.bool.passcode_enabled);
+ pCode = (SwitchPreference) findPreference(PassCodeActivity.PREFERENCE_SET_PASSCODE);
+ if (pCode != null && fPassCodeEnabled) {
pCode.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
@@ -232,10 +233,12 @@ public class Preferences extends PreferenceActivity
return false;
}
});
+ } else {
+ preferenceCategoryDetails.removePreference(pCode);
}
boolean fPrintEnabled = getResources().getBoolean(R.bool.fingerprint_enabled);
- fPrint = (CheckBoxPreference) findPreference(FingerprintActivity.PREFERENCE_USE_FINGERPRINT);
+ fPrint = (SwitchPreference) findPreference(FingerprintActivity.PREFERENCE_USE_FINGERPRINT);
if (fPrint != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (FingerprintActivity.isFingerprintCapable(MainApp.getAppContext()) && fPrintEnabled) {
@@ -285,18 +288,25 @@ public class Preferences extends PreferenceActivity
}
}
- mShowHiddenFiles = (CheckBoxPreference) findPreference("show_hidden_files");
- mShowHiddenFiles.setOnPreferenceClickListener(new OnPreferenceClickListener() {
- @Override
- public boolean onPreferenceClick(Preference preference) {
- SharedPreferences appPrefs =
- PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
- SharedPreferences.Editor editor = appPrefs.edit();
- editor.putBoolean("show_hidden_files_pref", mShowHiddenFiles.isChecked());
- editor.apply();
- return true;
- }
- });
+ boolean fShowHiddenFilesEnabled = getResources().getBoolean(R.bool.passcode_enabled);
+ mShowHiddenFiles = (SwitchPreference) findPreference("show_hidden_files");
+
+ if (fShowHiddenFilesEnabled) {
+ mShowHiddenFiles.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ SharedPreferences appPrefs =
+ PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
+ SharedPreferences.Editor editor = appPrefs.edit();
+ editor.putBoolean("show_hidden_files_pref", mShowHiddenFiles.isChecked());
+ editor.apply();
+ return true;
+ }
+ });
+ } else {
+ preferenceCategoryDetails.removePreference(mShowHiddenFiles);
+
+ }
PreferenceCategory preferenceCategoryMore = (PreferenceCategory) findPreference("more");
@@ -325,6 +335,10 @@ public class Preferences extends PreferenceActivity
}
}
+ if (!fShowHiddenFilesEnabled && !fPrintEnabled && !fPassCodeEnabled) {
+ preferenceScreen.removePreference(preferenceCategoryDetails);
+ }
+
boolean helpEnabled = getResources().getBoolean(R.bool.help_enabled);
Preference pHelp = findPreference("help");
if (pHelp != null) {
@@ -502,7 +516,7 @@ public class Preferences extends PreferenceActivity
mPrefInstantPictureUploadOnlyOnCharging = findPreference("instant_upload_on_charging");
mPrefInstantUpload = findPreference("instant_uploading");
- toggleInstantPictureOptions(((CheckBoxPreference) mPrefInstantUpload).isChecked());
+ toggleInstantPictureOptions(((SwitchPreference) mPrefInstantUpload).isChecked());
mPrefInstantUpload.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@@ -510,7 +524,7 @@ public class Preferences extends PreferenceActivity
public boolean onPreferenceChange(Preference preference, Object newValue) {
toggleInstantPictureOptions((Boolean) newValue);
toggleInstantUploadBehaviour(
- ((CheckBoxPreference) mPrefInstantVideoUpload).isChecked(),
+ ((SwitchPreference) mPrefInstantVideoUpload).isChecked(),
(Boolean) newValue);
return true;
}
diff --git a/src/main/res/values/setup.xml b/src/main/res/values/setup.xml
index 15cb7bd4f0..ed1ab100c1 100644
--- a/src/main/res/values/setup.xml
+++ b/src/main/res/values/setup.xml
@@ -5,7 +5,7 @@
Nextcloud
- nextcloud
+ nextcloud
org.nextcloud
com.nextcloud.android.providers.UsersAndGroupsSearchProvider
com.nextcloud.android.providers.UsersAndGroupsSearchProvider.action.SHARE_WITH
@@ -84,11 +84,16 @@
false
false
+
+ true
+
false
true
+ true
+ true
true
true
https://help.nextcloud.com/c/feature
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index 4ebb117c42..6f7bf2b97d 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -29,7 +29,7 @@
-
-
-
-
+
+
+
diff --git a/src/modified/res/values/setup.xml b/src/modified/res/values/setup.xml
index 8fac6f6877..892452a6ff 100644
--- a/src/modified/res/values/setup.xml
+++ b/src/modified/res/values/setup.xml
@@ -84,12 +84,17 @@
true
true
+
+ false
+
true
- true
- true
+ false
+ false
+ false
+ false
true
https://help.nextcloud.com/c/feature
true