X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/e7493203deca0edc7edeb5fb26f2774ede84a479..c20041d157baebede8e47a5f6837ba7dd51204f7:/src/com/owncloud/android/ui/activity/Preferences.java diff --git a/src/com/owncloud/android/ui/activity/Preferences.java b/src/com/owncloud/android/ui/activity/Preferences.java index 23ab550a..ef8c2226 100644 --- a/src/com/owncloud/android/ui/activity/Preferences.java +++ b/src/com/owncloud/android/ui/activity/Preferences.java @@ -54,6 +54,7 @@ import android.widget.AdapterView.OnItemLongClickListener; import android.widget.ListAdapter; import android.widget.ListView; +import com.owncloud.android.BuildConfig; import com.owncloud.android.MainApp; import com.owncloud.android.R; import com.owncloud.android.authentication.AccountUtils; @@ -203,8 +204,21 @@ public class Preferences extends PreferenceActivity } } + + if (BuildConfig.DEBUG) { + Preference pLog = findPreference("log"); + if (pLog != null ){ + pLog.setOnPreferenceClickListener(new OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + Intent loggerIntent = new Intent(getApplicationContext(),LogHistoryActivity.class); + startActivity(loggerIntent); + return true; + } + }); + } + } - boolean recommendEnabled = getResources().getBoolean(R.bool.recommend_enabled); Preference pRecommend = findPreference("recommend"); if (pRecommend != null){ @@ -223,7 +237,8 @@ public class Preferences extends PreferenceActivity Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(Preferences.this); String username = currentAccount.name.substring(0, currentAccount.name.lastIndexOf('@')); - String recommendSubject = String.format(getString(R.string.recommend_subject), appName); + String recommendSubject = String.format(getString(R.string.recommend_subject), + appName); String recommendText = String.format(getString(R.string.recommend_text), appName, downloadUrl, username);