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

Unverified Commit 68d00b86 authored by qqq3's avatar qqq3
Browse files

Add link to F-Droid into about

parent 1b324530
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {

            mPackageManager = getActivity().getPackageManager();
            findPreference(Constants.KEY_PREF_ABOUT_VERSION).setSummary(getVersionName());
            findPreference(Constants.KEY_PREF_ABOUT_F_DROID).setIntent(fDroidIntent());
            findPreference(Constants.KEY_PREF_ABOUT_GOOGLE_PLAY).setIntent(googlePlayIntent());
        }

@@ -223,6 +224,14 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
            return versionName;
        }

        private Intent fDroidIntent() {
            String ACTION_VIEW = Intent.ACTION_VIEW;
            String fDroidWebUri = String.format(Constants.F_DROID_WEB_URI,
                                                getActivity().getPackageName());

            return new Intent(ACTION_VIEW, Uri.parse(fDroidWebUri));
        }

        private Intent googlePlayIntent() {
            String ACTION_VIEW = Intent.ACTION_VIEW;
            String googlePlayAppUri = String.format(Constants.GOOGLE_PLAY_APP_URI,
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ public class Constants {
     * About preference screen constants
     */
    public static final String KEY_PREF_ABOUT_VERSION = "about_version_pref_key";
    public static final String KEY_PREF_ABOUT_F_DROID = "about_f_droid_pref_key";
    public static final String KEY_PREF_ABOUT_GOOGLE_PLAY = "about_google_play_pref_key";
    public static final String KEY_PREF_ABOUT_OPEN_SOURCE_LICENSES =
            "about_open_source_licenses_pref_key";
@@ -61,6 +62,7 @@ public class Constants {
    public static final String GOOGLE_PLAY_APP_URI = "market://details?id=%s";
    public static final String GOOGLE_PLAY_WEB_URI =
            "http://play.google.com/store/apps/details?id=%s";
    public static final String F_DROID_WEB_URI = "https://f-droid.org/repository/browse/?fdid=%s";
    public static final String WEATHER_ENDPOINT = "http://api.openweathermap.org/data/2.5/weather";
    public static final String WEATHER_FORECAST_ENDPOINT = "http://api.openweathermap.org/data/2.5/forecast/daily/";

+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
    <string name="about_version_pref_title">Version</string>
    <string name="about_source_code_pref_title">Source code</string>
    <string name="about_app_license_pref_title">License</string>
    <string name="about_f_droid_pref_title" translatable="false">F-Droid</string>
    <string name="about_google_play_pref_title" translatable="false">Google Play</string>
    <string name="about_open_source_licenses_pref_title">Open Source licenses</string>

+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,10 @@
            android:action="android.intent.action.VIEW"
            android:data="https://www.gnu.org/licenses/gpl-3.0.txt"/>
    </Preference>
    <Preference
        android:key="about_f_droid_pref_key"
        android:summary="https://f-droid.org/app/org.asdtm.goodweather"
        android:title="@string/about_f_droid_pref_title"/>
    <Preference
        android:key="about_google_play_pref_key"
        android:summary="https://play.google.com/store/apps/details?id=org.asdtm.goodweather"