Remove Google Maps installed check from navigation
This commit is contained in:
@@ -2,7 +2,6 @@ package it.danieleverducci.nextcloudmaps.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
|
||||
import it.danieleverducci.nextcloudmaps.R;
|
||||
@@ -25,18 +24,9 @@ public class IntentGenerator {
|
||||
Intent i = new Intent();
|
||||
i.setAction(Intent.ACTION_VIEW);
|
||||
i.setData(
|
||||
SettingsManager.isUseGoogleMaps(context) && isGoogleMapsInstalled(context)
|
||||
SettingsManager.isUseGoogleMaps(context)
|
||||
? item.getGmapsUri() : item.getGeoUri()
|
||||
);
|
||||
return i;
|
||||
}
|
||||
|
||||
public static boolean isGoogleMapsInstalled(Context context) {
|
||||
try {
|
||||
context.getPackageManager().getApplicationInfo("com.google.android.apps.maps", 0);
|
||||
return true;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user