Merge branch 'remove_ActionBarSherlock' into navigationDrawer_update
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / Preferences.java
index 23ab550..ef8c222 100644 (file)
@@ -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);