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

Commit 5cf3266a authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Nishith Khanna
Browse files

Contacts: Drop google maps web intent

- Using `geo:0,0?q=` launches map-related functionality or map applications directly.

Change-Id: I0abb021f9adb596d84a0ee26271892d9d04ed72e
parent 55feac34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1732,7 +1732,7 @@ public class QuickContactActivity extends ContactsActivity {
                }
                primaryContentDescription.append(header);
                alternateIntent =
                        StructuredPostalUtils.getViewPostalAddressDirectionsIntent(postalAddress);
                        StructuredPostalUtils.getViewPostalAddressIntent(postalAddress);
                alternateIntent.putExtra(EXTRA_ACTION_TYPE, ActionType.DIRECTIONS);
                alternateIcon = context.getDrawable(R.drawable.quantum_ic_directions_vd_theme_24);
                alternateContentDescription.append(res.getString(
+0 −8
Original line number Diff line number Diff line
@@ -30,12 +30,4 @@ public class StructuredPostalUtils {
    public static Uri getPostalAddressUri(String postalAddress) {
        return Uri.parse("geo:0,0?q=" + Uri.encode(postalAddress));
    }

    public static Intent getViewPostalAddressDirectionsIntent(String postalAddress) {
        return new Intent(Intent.ACTION_VIEW, getPostalAddressDirectionsUri(postalAddress));
    }

    public static Uri getPostalAddressDirectionsUri(String postalAddress) {
        return Uri.parse("https://maps.google.com/maps?daddr=" + Uri.encode(postalAddress));
    }
}