|
|
|
@ -8,15 +8,6 @@
|
|
|
|
|
|
|
|
|
|
package com.localytics.android;
|
|
|
|
|
|
|
|
|
|
import android.Manifest.permission;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.pm.PackageManager;
|
|
|
|
|
import android.net.ConnectivityManager;
|
|
|
|
|
import android.net.NetworkInfo;
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
import android.telephony.TelephonyManager;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.FileNotFoundException;
|
|
|
|
@ -27,6 +18,15 @@ import java.math.BigInteger;
|
|
|
|
|
import java.security.MessageDigest;
|
|
|
|
|
import java.security.NoSuchAlgorithmException;
|
|
|
|
|
|
|
|
|
|
import android.Manifest.permission;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.pm.PackageManager;
|
|
|
|
|
import android.net.ConnectivityManager;
|
|
|
|
|
import android.net.NetworkInfo;
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
import android.telephony.TelephonyManager;
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Provides a number of static functions to aid in the collection and formatting of datapoints.
|
|
|
|
|
* <p>
|
|
|
|
@ -163,7 +163,8 @@ import java.security.NoSuchAlgorithmException;
|
|
|
|
|
{
|
|
|
|
|
if (Build.VERSION.SDK_INT >= 8)
|
|
|
|
|
{
|
|
|
|
|
final boolean hasTelephony = ReflectionUtils.tryInvokeInstance(context.getPackageManager(), "hasSystemFeature", new Class<?>[] { String.class }, new Object[] { "android.hardware.telephony" }); //$NON-NLS-1$//$NON-NLS-2$
|
|
|
|
|
final Boolean hasTelephony = ReflectionUtils.tryInvokeInstance(context.getPackageManager(), "hasSystemFeature", //$NON-NLS-1$
|
|
|
|
|
new Class<?>[] { String.class }, new Object[] { "android.hardware.telephony" }); //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
if (!hasTelephony)
|
|
|
|
|
{
|
|
|
|
@ -213,7 +214,8 @@ import java.security.NoSuchAlgorithmException;
|
|
|
|
|
{
|
|
|
|
|
if (Build.VERSION.SDK_INT >= 8)
|
|
|
|
|
{
|
|
|
|
|
final boolean hasTelephony = ReflectionUtils.tryInvokeInstance(context.getPackageManager(), "hasSystemFeature", new Class<?>[] { String.class }, new Object[] { "android.hardware.telephony" }); //$NON-NLS-1$//$NON-NLS-2$
|
|
|
|
|
final Boolean hasTelephony = ReflectionUtils.tryInvokeInstance(context.getPackageManager(), "hasSystemFeature", //$NON-NLS-1$
|
|
|
|
|
new Class<?>[] { String.class }, new Object[] { "android.hardware.telephony" }); //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
if (!hasTelephony)
|
|
|
|
|
{
|
|
|
|
|