Revert "Added default widget action item to av settings fragment"

This reverts commit 77e316f8e6.
This commit is contained in:
max-klaus 2020-02-17 16:12:11 +03:00
parent 5428ca50bf
commit 9b6d6e3f5b
2 changed files with 0 additions and 36 deletions

View file

@ -3,13 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:title="@string/audionotes_plugin_name">
<net.osmand.plus.settings.preferences.ListPreferenceEx
android:icon="@drawable/ic_action_camera_focus"
android:key="av_default_action"
android:layout="@layout/preference_with_descr"
android:title="@string/av_widget_action"
tools:summary="@string/av_widget_action_descr" />
<PreferenceCategory
android:key="photo_notes"
android:layout="@layout/preference_category_with_descr"

View file

@ -52,10 +52,6 @@ import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_CAMERA_FOCUS_E
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_CAMERA_FOCUS_HIPERFOCAL;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_CAMERA_FOCUS_INFINITY;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_CAMERA_FOCUS_MACRO;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_DEFAULT_ACTION_AUDIO;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_DEFAULT_ACTION_CHOOSE;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_DEFAULT_ACTION_TAKEPICTURE;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_DEFAULT_ACTION_VIDEO;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.NOTES_TAB;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.cameraPictureSizeDefault;
import static net.osmand.plus.myplaces.FavoritesActivity.TAB_ID;
@ -76,8 +72,6 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop
protected void setupPreferences() {
AudioVideoNotesPlugin plugin = OsmandPlugin.getPlugin(AudioVideoNotesPlugin.class);
if (plugin != null) {
setupDefaultWidgetActionPref(plugin);
setupCameraPhotoPrefs(plugin);
setupAudioFormatPref(plugin);
@ -98,29 +92,6 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop
}
}
private void setupDefaultWidgetActionPref(AudioVideoNotesPlugin plugin) {
ListPreferenceEx defaultWidgetActions = (ListPreferenceEx) findPreference(plugin.AV_DEFAULT_ACTION.getId());
defaultWidgetActions.setDescription(R.string.av_widget_action_descr);
defaultWidgetActions.setIcon(getPersistentPrefIcon(R.drawable.ic_action_camera_focus));
List<String> items = new ArrayList<String>();
List<Integer> itemsValues = new ArrayList<Integer>();
items.add(getString(R.string.av_def_action_choose));
itemsValues.add(AV_DEFAULT_ACTION_CHOOSE);
items.add(getString(R.string.av_def_action_audio));
itemsValues.add(AV_DEFAULT_ACTION_AUDIO);
items.add(getString(R.string.av_def_action_video));
itemsValues.add(AV_DEFAULT_ACTION_VIDEO);
items.add(getString(R.string.av_def_action_picture));
itemsValues.add(AV_DEFAULT_ACTION_TAKEPICTURE);
String[] entries = items.toArray(new String[0]);
Integer[] entryValues = itemsValues.toArray(new Integer[0]);
defaultWidgetActions.setEntries(entries);
defaultWidgetActions.setEntryValues(entryValues);
}
private void setupCameraPhotoPrefs(AudioVideoNotesPlugin plugin) {
Camera cam = openCamera();
setupCameraPermissionPref(cam);