mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #1552 from owncloud/1432_logs_to_settings_screen
moved logs from drawer menu to the settings
This commit is contained in:
commit
1f0fa0a153
6 changed files with 26 additions and 40 deletions
|
@ -26,7 +26,6 @@
|
|||
<!--<item>@string/drawer_item_on_device</item>-->
|
||||
<item>@string/drawer_item_uploads_list</item>
|
||||
<item>@string/actionbar_settings</item>
|
||||
<item>@string/actionbar_logger</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Nav Drawer Content Descriptions -->
|
||||
|
@ -37,7 +36,6 @@
|
|||
<!--<item>@string/drawer_item_on_device</item>-->
|
||||
<item>@string/drawer_item_uploads_list</item>
|
||||
<item>@string/drawer_item_settings</item>
|
||||
<item>@string/drawer_item_logs</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
|
@ -53,6 +53,7 @@
|
|||
<bool name="imprint_enabled">false</bool>
|
||||
<bool name="recommend_enabled">true</bool>
|
||||
<bool name="feedback_enabled">true</bool>
|
||||
<bool name="logger_enabled">false</bool>
|
||||
<string name="url_help">http://owncloud.com/mobile/help</string>
|
||||
<string name="url_imprint"></string>
|
||||
<string name="mail_recommend">"mailto:"</string>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
<string name="drawer_item_on_device">On device</string>-->
|
||||
<string name="drawer_item_settings">Settings</string>
|
||||
<string name="drawer_item_uploads_list">Uploads</string>
|
||||
<string name="drawer_item_logs">Logs</string>
|
||||
<string name="drawer_close">Close</string>
|
||||
<string name="drawer_open">Open</string>
|
||||
<string name="prefs_category_general">General</string>
|
||||
|
|
|
@ -63,14 +63,12 @@
|
|||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/prefs_category_more" android:key="more">
|
||||
<Preference android:title="@string/prefs_help" android:key="help" />
|
||||
<Preference android:title="@string/prefs_recommend" android:key="recommend" />
|
||||
<Preference android:title="@string/prefs_feedback" android:key="feedback" />
|
||||
<Preference android:title="@string/prefs_imprint" android:key="imprint" />
|
||||
|
||||
<Preference android:id="@+id/about_app"
|
||||
android:title="@string/about_title"
|
||||
android:key="about_app" />
|
||||
<Preference android:title="@string/prefs_help" android:key="help" />
|
||||
<Preference android:title="@string/prefs_recommend" android:key="recommend" />
|
||||
<Preference android:title="@string/prefs_feedback" android:key="feedback" />
|
||||
<Preference android:title="@string/actionbar_logger" android:key="logger" />
|
||||
<Preference android:title="@string/prefs_imprint" android:key="imprint" />
|
||||
<Preference android:title="@string/about_title" android:id="@+id/about_app" android:key="about_app" />
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
|
|
|
@ -413,12 +413,6 @@ public class FileActivity extends AppCompatActivity
|
|||
mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[2], mDrawerContentDescriptions[1],
|
||||
R.drawable.ic_settings));
|
||||
|
||||
// Logs
|
||||
if (BuildConfig.DEBUG) {
|
||||
mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[3],
|
||||
mDrawerContentDescriptions[3], R.drawable.ic_log));
|
||||
}
|
||||
|
||||
// setting the nav drawer list adapter
|
||||
mNavigationDrawerAdapter = new NavigationDrawerListAdapter(getApplicationContext(), this,
|
||||
mDrawerItems);
|
||||
|
@ -1077,12 +1071,6 @@ public class FileActivity extends AppCompatActivity
|
|||
Preferences.class);
|
||||
startActivity(settingsIntent);
|
||||
break;
|
||||
|
||||
case 3: // Logs
|
||||
Intent loggerIntent = new Intent(getApplicationContext(),
|
||||
LogHistoryActivity.class);
|
||||
startActivity(loggerIntent);
|
||||
break;
|
||||
}
|
||||
mDrawerLayout.closeDrawers();
|
||||
}
|
||||
|
|
|
@ -269,21 +269,6 @@ 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");
|
||||
|
@ -345,9 +330,26 @@ public class Preferences extends PreferenceActivity
|
|||
} else {
|
||||
preferenceCategory.removePreference(pFeedback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
boolean loggerEnabled = getResources().getBoolean(R.bool.logger_enabled) || BuildConfig.DEBUG;
|
||||
Preference pLogger = findPreference("logger");
|
||||
if (pLogger != null){
|
||||
if (loggerEnabled) {
|
||||
pLogger.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
Intent loggerIntent = new Intent(getApplicationContext(), LogHistoryActivity.class);
|
||||
startActivity(loggerIntent);
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
preferenceCategory.removePreference(pLogger);
|
||||
}
|
||||
}
|
||||
|
||||
boolean imprintEnabled = getResources().getBoolean(R.bool.imprint_enabled);
|
||||
Preference pImprint = findPreference("imprint");
|
||||
if (pImprint != null) {
|
||||
|
|
Loading…
Reference in a new issue