Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec2e6549 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Merge branch 'v1-oreo-add-about-content' into 'v1-oreo-sprint_istanbul'

Add About Content

See merge request !11
parents b64b0f54 8cdf818b
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -209,4 +209,17 @@
    <string name="duration_format"><xliff:g id="hours">%1$s</xliff:g> <xliff:g id="minutes">%2$s</xliff:g></string>

    <string name="channel_music">Music playback</string>

    <string name="preferences_about_app">Music is forked from LineageOS Music</string>
    <string name="preferences_authors">Authors</string>
    <string name="preferences_source_code">Source code</string>
    <string name="preferences_licence">Licence</string>
    <string name="preferences_app_info_title">Music information</string>
    <string name="preferences_app_info">Music is an Open Source Music Player for Android</string>
    <string name="preferences_privacy_policy">Privacy policy</string>
    <string name="preferences_service_terms">Terms of service</string>
    <string name="preferences_about_title">About</string>
    <string name="preferences_build_version">Build Version</string>


</resources>
+65 −0
Original line number Diff line number Diff line
@@ -75,4 +75,69 @@
            android:summary="@string/settings_delete_cache_summary"
            android:title="@string/settings_delete_cache_title" />
    </PreferenceCategory>

    <PreferenceCategory android:title="@string/preferences_about_title">


        <Preference
            android:key="music_info"
            android:summary="@string/preferences_app_info"
            android:title="@string/preferences_app_info_title" />

        <Preference
            android:key="build_version"
            android:title="@string/preferences_build_version">

            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://gitlab.e.foundation/e/os/android_packages_apps_Eleven/-/releases" />


        </Preference>


        <Preference
            android:key="about_app"
            android:title="@string/preferences_about_app">

            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://github.com/LineageOS/android_packages_apps_Eleven" />

        </Preference>


        <Preference android:title="@string/preferences_licence">
            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://gitlab.e.foundation/e/os/android_packages_apps_Eleven/-/blob/v1-pie/NOTICE" />
        </Preference>

        <Preference android:title="@string/preferences_authors">
            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://gitlab.e.foundation/e/os/android_packages_apps_Eleven" />
        </Preference>

        <Preference android:title="@string/preferences_source_code">
            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://gitlab.e.foundation/e/os/android_packages_apps_Eleven" />
        </Preference>

        <Preference android:title="@string/preferences_privacy_policy">
            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://e.foundation/legal-notice-privacy/" />
        </Preference>

        <Preference android:title="@string/preferences_service_terms">
            <intent
                android:action="android.intent.action.VIEW"
                android:data="https://e.foundation/legal-notice-privacy/" />
        </Preference>

    </PreferenceCategory>


</PreferenceScreen>
+23 −16
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
import android.view.MenuItem;

import org.lineageos.eleven.BuildConfig;
import org.lineageos.eleven.R;
import org.lineageos.eleven.cache.ImageFetcher;
import org.lineageos.eleven.utils.MusicUtils;
@@ -37,6 +38,8 @@ import org.lineageos.eleven.utils.PreferenceUtils;
@SuppressWarnings("deprecation")
public class SettingsActivity extends PreferenceActivity implements OnSharedPreferenceChangeListener {

    private final static String BUILD_VERSION = "build_version";

    /**
     * {@inheritDoc}
     */
@@ -54,6 +57,9 @@ public class SettingsActivity extends PreferenceActivity implements OnSharedPref
        deleteCache();

        PreferenceUtils.getInstance(this).setOnSharedPreferenceChangeListener(this);

        findPreference(BUILD_VERSION).setSummary(BuildConfig.VERSION_NAME);

    }

    /**
@@ -105,7 +111,8 @@ public class SettingsActivity extends PreferenceActivity implements OnSharedPref
        if (key.equals(PreferenceUtils.SHOW_VISUALIZER) &&
                sharedPreferences.getBoolean(key, false) && !PreferenceUtils.canRecordAudio(this)) {
            PreferenceUtils.requestRecordAudio(this);
        } if (key.equals(PreferenceUtils.SHAKE_TO_PLAY)) {
        }
        if (key.equals(PreferenceUtils.SHAKE_TO_PLAY)) {
            MusicUtils.setShakeToPlayEnabled(sharedPreferences.getBoolean(key, false));
        } else if (key.equals(PreferenceUtils.SHOW_ALBUM_ART_ON_LOCKSCREEN)) {
            MusicUtils.setShowAlbumArtOnLockscreen(sharedPreferences.getBoolean(key, true));