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

Commit bee20b51 authored by Mark Harman's avatar Mark Harman
Browse files

Remove use addresses geocoder option due to no info for google play data privacy.

parent a2cf2608
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -933,7 +933,7 @@ extra control over the date and time formatting. Also used for Video settings/"V
<p><b>GPS stamp format</b> - If "Stamp photos" is enabled, this allows extra control over the GPS
formatting. Also used for Video settings/"Video subtitles".</p>

<p><b>Use addresses</b> - If "Stamp photos" and "Store location data" is enabled, this allows the location
<!--<p><b>Use addresses</b> - If "Stamp photos" and "Store location data" is enabled, this allows the location
    to be displayed on the resultant photo in the form of an address, either as well as or instead of GPS
    coordinates. Similarly also used for Video settings/"Video subtitles".
    An Internet connection is required for this to succeed.
@@ -942,7 +942,7 @@ formatting. Also used for Video settings/"Video subtitles".</p>
    <a href="https://developer.android.com/reference/android/location/Geocoder">Geocoder API</a>).
    This feature provides no guarantees on availability or accuracy. Results are a best guess, and not
    guaranteed to be meaningful or correct.
</p>
</p>-->

<p><b>Distance unit</b> - If "Stamp photos" is enabled, this controls whether to use metres (m) or
feet (ft) when recording the GPS altitude. Also used for Video settings/"Video subtitles".</p>
+2 −1
Original line number Diff line number Diff line
@@ -84,10 +84,11 @@ of taking photos and recording videos, to fulfil its purpose as a camera. Microp
        <a href="https://privacy.google.com/businesses/gdprprocessorterms/">https://privacy.google.com/businesses/gdprprocessorterms/</a> , as updated from time to time.
        This option is no longer available in version 1.50 onwards.
    </li>
    <li>The "addresses" option for photo stamp or video subtitles uses the Android
    <li>For versions 1.49.2 or earlier: The "addresses" option for photo stamp or video subtitles used the Android
        <a href="https://developer.android.com/reference/android/location/Geocoder">Geocoder API</a>.
        When this option is enabled, in order to deliver this functionality the API transmits your device location data across the Internet to a
        third party (which may depend on what "backend services" are installed on your device).
        This option is no longer available in version 1.50 onwards.
    </li>
    <li>Apps/services such as cloud services on your device may auto-upload photos and videos that are saved on your device.
    </li>
+42 −21
Original line number Diff line number Diff line
@@ -37,8 +37,8 @@ import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.location.Address;
import android.location.Geocoder;
//import android.location.Address; // don't use until we have info for data privacy!
//import android.location.Geocoder; // don't use until we have info for data privacy!
import android.location.Location;
import androidx.exifinterface.media.ExifInterface;
import android.net.Uri;
@@ -163,7 +163,7 @@ public class ImageSaver extends Thread {
        final String preference_stamp_dateformat;
        final String preference_stamp_timeformat;
        final String preference_stamp_gpsformat;
        final String preference_stamp_geo_address;
        //final String preference_stamp_geo_address;
        final String preference_units_distance;
        final boolean panorama_crop; // used for panorama
        final boolean store_location;
@@ -194,7 +194,9 @@ public class ImageSaver extends Thread {
                int iso,
                long exposure_time,
                float zoom_factor,
                String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat, String preference_stamp_geo_address, String preference_units_distance,
                String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat,
                //String preference_stamp_geo_address,
                String preference_units_distance,
                boolean panorama_crop,
                boolean store_location, Location location, boolean store_geo_direction, double geo_direction,
                double pitch_angle, boolean store_ypr,
@@ -232,7 +234,7 @@ public class ImageSaver extends Thread {
            this.preference_stamp_dateformat = preference_stamp_dateformat;
            this.preference_stamp_timeformat = preference_stamp_timeformat;
            this.preference_stamp_gpsformat = preference_stamp_gpsformat;
            this.preference_stamp_geo_address = preference_stamp_geo_address;
            //this.preference_stamp_geo_address = preference_stamp_geo_address;
            this.preference_units_distance = preference_units_distance;
            this.panorama_crop = panorama_crop;
            this.store_location = store_location;
@@ -268,7 +270,9 @@ public class ImageSaver extends Thread {
                    this.iso,
                    this.exposure_time,
                    this.zoom_factor,
                    this.preference_stamp, this.preference_textstamp, this.font_size, this.color, this.pref_style, this.preference_stamp_dateformat, this.preference_stamp_timeformat, this.preference_stamp_gpsformat, this.preference_stamp_geo_address, this.preference_units_distance,
                    this.preference_stamp, this.preference_textstamp, this.font_size, this.color, this.pref_style, this.preference_stamp_dateformat, this.preference_stamp_timeformat, this.preference_stamp_gpsformat,
                    //this.preference_stamp_geo_address,
                    this.preference_units_distance,
                    this.panorama_crop, this.store_location, this.location, this.store_geo_direction, this.geo_direction,
                    this.pitch_angle, this.store_ypr,
                    this.custom_tag_artist,
@@ -577,7 +581,9 @@ public class ImageSaver extends Thread {
                          int iso,
                          long exposure_time,
                          float zoom_factor,
                          String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat, String preference_stamp_geo_address, String preference_units_distance,
                          String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat,
                          //String preference_stamp_geo_address,
                          String preference_units_distance,
                          boolean panorama_crop,
                          boolean store_location, Location location, boolean store_geo_direction, double geo_direction,
                          double pitch_angle, boolean store_ypr,
@@ -608,7 +614,9 @@ public class ImageSaver extends Thread {
                iso,
                exposure_time,
                zoom_factor,
                preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat, preference_stamp_geo_address, preference_units_distance,
                preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat,
                //preference_stamp_geo_address,
                preference_units_distance,
                panorama_crop, store_location, location, store_geo_direction, geo_direction,
                pitch_angle, store_ypr,
                custom_tag_artist,
@@ -650,7 +658,9 @@ public class ImageSaver extends Thread {
                0,
                0,
                1.0f,
                null, null, 0, 0, null, null, null, null, null, null,
                null, null, 0, 0, null, null, null, null,
                //null,
                null,
                false, false, null, false, 0.0,
                0.0, false,
                null, null,
@@ -675,7 +685,9 @@ public class ImageSaver extends Thread {
                           int iso,
                           long exposure_time,
                           float zoom_factor,
                           String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat, String preference_stamp_geo_address, String preference_units_distance,
                           String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat,
                           //String preference_stamp_geo_address,
                           String preference_units_distance,
                           boolean panorama_crop,
                           boolean store_location, Location location, boolean store_geo_direction, double geo_direction,
                           double pitch_angle, boolean store_ypr,
@@ -704,7 +716,9 @@ public class ImageSaver extends Thread {
                iso,
                exposure_time,
                zoom_factor,
                preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat, preference_stamp_geo_address, preference_units_distance,
                preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat,
                //preference_stamp_geo_address,
                preference_units_distance,
                panorama_crop, store_location, location, store_geo_direction, geo_direction,
                pitch_angle, store_ypr,
                custom_tag_artist,
@@ -783,7 +797,9 @@ public class ImageSaver extends Thread {
                              int iso,
                              long exposure_time,
                              float zoom_factor,
                              String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat, String preference_stamp_geo_address, String preference_units_distance,
                              String preference_stamp, String preference_textstamp, int font_size, int color, String pref_style, String preference_stamp_dateformat, String preference_stamp_timeformat, String preference_stamp_gpsformat,
                              //String preference_stamp_geo_address,
                              String preference_units_distance,
                              boolean panorama_crop,
                              boolean store_location, Location location, boolean store_geo_direction, double geo_direction,
                              double pitch_angle, boolean store_ypr,
@@ -816,7 +832,9 @@ public class ImageSaver extends Thread {
                iso,
                exposure_time,
                zoom_factor,
                preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat, preference_stamp_geo_address, preference_units_distance,
                preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat,
                //preference_stamp_geo_address,
                preference_units_distance,
                panorama_crop, store_location, location, store_geo_direction, geo_direction,
                pitch_angle, store_ypr,
                custom_tag_artist,
@@ -927,7 +945,9 @@ public class ImageSaver extends Thread {
                0,
                0,
                1.0f,
                null, null, 0, 0, null, null, null, null, null, null,
                null, null, 0, 0, null, null, null, null,
                //null,
                null,
                false, false, null, false, 0.0,
                0.0, false,
                null, null,
@@ -2176,7 +2196,7 @@ public class ImageSaver extends Thread {
                    if( gps_stamp.length() > 0 ) {
                        // don't log gps_stamp, in case of privacy!

                        Address address = null;
                        /*Address address = null;
                        if( request.store_location && !request.preference_stamp_geo_address.equals("preference_stamp_geo_address_no") ) {
                            boolean block_geocoder;
                            synchronized(this) {
@@ -2213,9 +2233,10 @@ public class ImageSaver extends Thread {
                                if( MyDebug.LOG )
                                    Log.d(TAG, "geocoder not present");
                            }
                        }
                        }*/

                        if( address == null || request.preference_stamp_geo_address.equals("preference_stamp_geo_address_both") ) {
                        //if( address == null || request.preference_stamp_geo_address.equals("preference_stamp_geo_address_both") )
                        {
                            if( MyDebug.LOG )
                                Log.d(TAG, "display gps coords");
                            // want GPS coords (either in addition to the address, or we don't have an address)
@@ -2227,7 +2248,7 @@ public class ImageSaver extends Thread {
                                stamp_string = gps_stamp + "\n" + stamp_string;
                            ypos -= diff_y;
                        }
                        else if( request.store_geo_direction ) {
                        /*else if( request.store_geo_direction ) {
                            if( MyDebug.LOG )
                                Log.d(TAG, "not displaying gps coords, but need to display geo direction");
                            // we are displaying an address instead of GPS coords, but we still need to display the geo direction
@@ -2241,9 +2262,9 @@ public class ImageSaver extends Thread {
                                    stamp_string = gps_stamp + "\n" + stamp_string;
                                ypos -= diff_y;
                            }
                        }
                        }*/

                        if( address != null ) {
                        /*if( address != null ) {
                            for(int i=0;i<=address.getMaxAddressLineIndex();i++) {
                                // write in reverse order
                                String addressLine = address.getAddressLine(address.getMaxAddressLineIndex()-i);
@@ -2254,7 +2275,7 @@ public class ImageSaver extends Thread {
                                    stamp_string = addressLine + "\n" + stamp_string;
                                ypos -= diff_y;
                            }
                        }
                        }*/
                    }
                }
                if( text_stamp ) {
+18 −14
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Timer;
import java.util.TimerTask;

@@ -32,8 +31,8 @@ import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.location.Address;
import android.location.Geocoder;
//import android.location.Address; // don't use until we have info for data privacy!
//import android.location.Geocoder; // don't use until we have info for data privacy!
import android.hardware.camera2.CameraExtensionCharacteristics;
import android.location.Location;
import android.media.MediaMetadataRetriever;
@@ -1277,9 +1276,9 @@ public class MyApplicationInterface extends BasicApplicationInterface {
        return sharedPreferences.getString(PreferenceKeys.StampGPSFormatPreferenceKey, "preference_stamp_gpsformat_default");
    }

    private String getStampGeoAddressPref() {
    /*private String getStampGeoAddressPref() {
        return sharedPreferences.getString(PreferenceKeys.StampGeoAddressPreferenceKey, "preference_stamp_geo_address_no");
    }
    }*/

    private String getUnitsDistancePref() {
        return sharedPreferences.getString(PreferenceKeys.UnitsDistancePreferenceKey, "preference_units_distance_m");
@@ -2036,7 +2035,7 @@ public class MyApplicationInterface extends BasicApplicationInterface {
        final String preference_stamp_timeformat = this.getStampTimeFormatPref();
        final String preference_stamp_gpsformat = this.getStampGPSFormatPref();
        final String preference_units_distance = this.getUnitsDistancePref();
        final String preference_stamp_geo_address = this.getStampGeoAddressPref();
        //final String preference_stamp_geo_address = this.getStampGeoAddressPref();
        final boolean store_location = getGeotaggingPref();
        final boolean store_geo_direction = getGeodirectionPref();
        class SubtitleVideoTimerTask extends TimerTask {
@@ -2111,7 +2110,7 @@ public class MyApplicationInterface extends BasicApplicationInterface {
                    subtitles.append(datetime_stamp).append("\n");

                if( gps_stamp.length() > 0 ) {
                    Address address = null;
                    /*Address address = null;
                    if( store_location && !preference_stamp_geo_address.equals("preference_stamp_geo_address_no") ) {
                        // try to find an address
                        if( main_activity.isAppPaused() ) {
@@ -2151,14 +2150,15 @@ public class MyApplicationInterface extends BasicApplicationInterface {
                            String addressLine = address.getAddressLine(i);
                            subtitles.append(addressLine).append("\n");
                        }
                    }
                    }*/

                    if( address == null || preference_stamp_geo_address.equals("preference_stamp_geo_address_both") ) {
                    //if( address == null || preference_stamp_geo_address.equals("preference_stamp_geo_address_both") )
                    {
                        if( MyDebug.LOG )
                            Log.d(TAG, "display gps coords");
                        subtitles.append(gps_stamp).append("\n");
                    }
                    else if( store_geo_direction ) {
                    /*else if( store_geo_direction ) {
                        if( MyDebug.LOG )
                            Log.d(TAG, "not displaying gps coords, but need to display geo direction");
                        gps_stamp = main_activity.getTextFormatter().getGPSString(preference_stamp_gpsformat, preference_units_distance, false, null, store_geo_direction && main_activity.getPreview().hasGeoDirection(), geo_direction);
@@ -2166,7 +2166,7 @@ public class MyApplicationInterface extends BasicApplicationInterface {
                            // don't log gps_stamp, in case of privacy!
                            subtitles.append(gps_stamp).append("\n");
                        }
                    }
                    }*/
                }

                if( subtitles.length() == 0 ) {
@@ -3285,7 +3285,7 @@ public class MyApplicationInterface extends BasicApplicationInterface {
        String preference_stamp_dateformat = this.getStampDateFormatPref();
        String preference_stamp_timeformat = this.getStampTimeFormatPref();
        String preference_stamp_gpsformat = this.getStampGPSFormatPref();
        String preference_stamp_geo_address = this.getStampGeoAddressPref();
        //String preference_stamp_geo_address = this.getStampGeoAddressPref();
        String preference_units_distance = this.getUnitsDistancePref();
        boolean panorama_crop = sharedPreferences.getString(PreferenceKeys.PanoramaCropPreferenceKey, "preference_panorama_crop_on").equals("preference_panorama_crop_on");
        boolean store_location = getGeotaggingPref() && getLocation() != null;
@@ -3396,7 +3396,9 @@ public class MyApplicationInterface extends BasicApplicationInterface {
                        iso,
                        exposure_time,
                        zoom_factor,
                        preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat, preference_stamp_geo_address, preference_units_distance,
                        preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat,
                        //preference_stamp_geo_address,
                        preference_units_distance,
                        panorama_crop,
                        store_location, location, store_geo_direction, geo_direction,
                        pitch_angle, store_ypr,
@@ -3439,7 +3441,9 @@ public class MyApplicationInterface extends BasicApplicationInterface {
                    iso,
                    exposure_time,
                    zoom_factor,
                    preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat, preference_stamp_geo_address, preference_units_distance,
                    preference_stamp, preference_textstamp, font_size, color, pref_style, preference_stamp_dateformat, preference_stamp_timeformat, preference_stamp_gpsformat,
                    //preference_stamp_geo_address,
                    preference_units_distance,
                    false, // panorama doesn't use this codepath
                    store_location, location, store_geo_direction, geo_direction,
                    pitch_angle, store_ypr,
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ public class PreferenceKeys {

    public static final String StampGPSFormatPreferenceKey = "preference_stamp_gpsformat";

    public static final String StampGeoAddressPreferenceKey = "preference_stamp_geo_address";
    //public static final String StampGeoAddressPreferenceKey = "preference_stamp_geo_address";

    public static final String UnitsDistancePreferenceKey = "preference_units_distance";

Loading