From 2238a3956394c365493132c241a151e430fed351 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 28 Jun 2023 11:06:39 +0530 Subject: [PATCH] Contacts: Drop google maps web intent - Using `geo:0,0?q=` launches map-related functionality or map applications directly. Change-Id: I0abb021f9adb596d84a0ee26271892d9d04ed72e --- .../contacts/quickcontact/QuickContactActivity.java | 2 +- src/com/android/contacts/util/StructuredPostalUtils.java | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 1bd6734c43..e3bfdf4dd0 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -1726,7 +1726,7 @@ public class QuickContactActivity extends ContactsActivity { } primaryContentDescription.append(header); alternateIntent = - StructuredPostalUtils.getViewPostalAddressDirectionsIntent(postalAddress); + StructuredPostalUtils.getViewPostalAddressIntent(postalAddress); alternateIntent.putExtra(EXTRA_ACTION_TYPE, ActionType.DIRECTIONS); alternateIcon = res.getDrawable(R.drawable.quantum_ic_directions_vd_theme_24); alternateContentDescription.append(res.getString( diff --git a/src/com/android/contacts/util/StructuredPostalUtils.java b/src/com/android/contacts/util/StructuredPostalUtils.java index 6e46176ca8..59d38ea435 100644 --- a/src/com/android/contacts/util/StructuredPostalUtils.java +++ b/src/com/android/contacts/util/StructuredPostalUtils.java @@ -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)); - } } -- GitLab