// Path: provider/src/main/java/com/raygun/raygun4android/logging/RaygunLogger.java
// public class RaygunLogger {
// 
//     public static void d(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).d(string);
//         }
//     }
// 
//     public static void i(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).i(string);
//         }
//     }
// 
//     public static void w(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).w(string);
//         }
//     }
// 
//     public static void e(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).e(string);
//         }
//     }
// 
//     public static void v(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).v(string);
//         }
//     }
// 
//     public static void responseCode(int responseCode) {
//         switch (responseCode) {
//             case RaygunSettings.RESPONSE_CODE_ACCEPTED:
//                 RaygunLogger.d("Request succeeded");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_BAD_MESSAGE:
//                 RaygunLogger.e("Bad message - could not parse the provided JSON. Check all fields are present, especially both occurredOn (ISO 8601 DateTime) and details { } at the top level");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_INVALID_API_KEY:
//                 RaygunLogger.e("Invalid API Key - The value specified in the header X-ApiKey did not match with an application in Raygun");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_LARGE_PAYLOAD:
//                 RaygunLogger.e("Request entity too large - The maximum size of a JSON payload is 128KB");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_RATE_LIMITED:
//                 RaygunLogger.e("Too Many Requests - Plan limit exceeded for month or plan expired");
//                 break;
//             default:
//                 RaygunLogger.d("Response status code: " + responseCode);
// 
//         }
//     }
// 
// }
// 
// Path: provider/src/main/java/com/raygun/raygun4android/utils/RaygunReflectionUtils.java
// public class RaygunReflectionUtils {
//     public static Method findMethod(Class<?> clazz, String methodName, Class<?>[] args) throws NoSuchMethodException {
//         Method methodMatched = null;
// 
//         for (Method m : getAllMethods(clazz)) {
// 
//             if (m.getName().equals(methodName)) {
//                 Class<?>[] paramClasses = m.getParameterTypes();
// 
//                 if (paramClasses.length == args.length) {
//                     boolean paramsMatch = true;
// 
//                     for (int i = 0; i < paramClasses.length; ++i) {
//                         Class<?> paramType = paramClasses[i];
//                         paramType = convertPrimitiveClass(paramType);
// 
//                         if (paramType != args[i]) {
//                             paramsMatch = false;
//                             break;
//                         }
//                     }
// 
//                     if (paramsMatch) {
//                         methodMatched = m;
//                         break;
//                     }
//                 }
//             }
//         }
// 
//         if (methodMatched != null) {
//             return methodMatched;
//         } else {
//             throw new NoSuchMethodException("Cannot find method: " + methodName);
//         }
//     }
// 
//     private static Collection<Method> getAllMethods(Class<?> clazz) {
//         HashSet<Method> methods = new HashSet<Method>();
// 
//         methods.addAll(Arrays.asList(clazz.getDeclaredMethods()));
// 
//         for (Class<?> s : getAllSuperClasses(clazz)) {
//             methods.addAll(Arrays.asList(s.getDeclaredMethods()));
//         }
// 
//         return methods;
//     }
// 
//     private static Collection<Class<?>> getAllSuperClasses(Class<?> clazz) {
//         HashSet<Class<?>> classes = new HashSet<Class<?>>();
// 
//         if ((clazz != null) && (!clazz.equals(Object.class))) {
//             classes.add(clazz);
//             classes.addAll(getAllSuperClasses(clazz.getSuperclass()));
// 
//             for (Class<?> i : clazz.getInterfaces()) {
//                 classes.addAll(getAllSuperClasses(i));
//             }
//         }
//         return classes;
//     }
// 
//     private static Class<?> convertPrimitiveClass(Class<?> primitive) {
//         if (primitive.isPrimitive()) {
//             if (primitive == Integer.TYPE) {
//                 return Integer.class;
//             }
//             if (primitive == Boolean.TYPE) {
//                 return Boolean.class;
//             }
//             if (primitive == Float.TYPE) {
//                 return Float.class;
//             }
//             if (primitive == Long.TYPE) {
//                 return Long.class;
//             }
//             if (primitive == Double.TYPE) {
//                 return Double.class;
//             }
//             if (primitive == Short.TYPE) {
//                 return Short.class;
//             }
//             if (primitive == Byte.TYPE) {
//                 return Byte.class;
//             }
//             if (primitive == Character.TYPE) {
//                 return Character.class;
//             }
//         }
//         return primitive;
//     }
// }


import com.raygun.raygun4android.logging.RaygunLogger;
import com.raygun.raygun4android.utils.RaygunReflectionUtils;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
package com.raygun.raygun4android.network.http;



final class RaygunHttpsUrlStreamHandler extends URLStreamHandler {
    private static final int PORT = 443;
    private static final String PROTOCOL = "https";
    private final URLStreamHandler originalHandler;

    RaygunHttpsUrlStreamHandler(URLStreamHandler handler) {
        originalHandler = handler;
    }

    protected URLConnection openConnection(URL url) throws IOException {
        try {
// Path: provider/src/main/java/com/raygun/raygun4android/logging/RaygunLogger.java
// public class RaygunLogger {
// 
//     public static void d(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).d(string);
//         }
//     }
// 
//     public static void i(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).i(string);
//         }
//     }
// 
//     public static void w(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).w(string);
//         }
//     }
// 
//     public static void e(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).e(string);
//         }
//     }
// 
//     public static void v(String string) {
//         if (string != null) {
//             Timber.tag(RaygunSettings.LOGGING_TAG).v(string);
//         }
//     }
// 
//     public static void responseCode(int responseCode) {
//         switch (responseCode) {
//             case RaygunSettings.RESPONSE_CODE_ACCEPTED:
//                 RaygunLogger.d("Request succeeded");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_BAD_MESSAGE:
//                 RaygunLogger.e("Bad message - could not parse the provided JSON. Check all fields are present, especially both occurredOn (ISO 8601 DateTime) and details { } at the top level");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_INVALID_API_KEY:
//                 RaygunLogger.e("Invalid API Key - The value specified in the header X-ApiKey did not match with an application in Raygun");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_LARGE_PAYLOAD:
//                 RaygunLogger.e("Request entity too large - The maximum size of a JSON payload is 128KB");
//                 break;
//             case RaygunSettings.RESPONSE_CODE_RATE_LIMITED:
//                 RaygunLogger.e("Too Many Requests - Plan limit exceeded for month or plan expired");
//                 break;
//             default:
//                 RaygunLogger.d("Response status code: " + responseCode);
// 
//         }
//     }
// 
// }
// 
// Path: provider/src/main/java/com/raygun/raygun4android/utils/RaygunReflectionUtils.java
// public class RaygunReflectionUtils {
//     public static Method findMethod(Class<?> clazz, String methodName, Class<?>[] args) throws NoSuchMethodException {
//         Method methodMatched = null;
// 
//         for (Method m : getAllMethods(clazz)) {
// 
//             if (m.getName().equals(methodName)) {
//                 Class<?>[] paramClasses = m.getParameterTypes();
// 
//                 if (paramClasses.length == args.length) {
//                     boolean paramsMatch = true;
// 
//                     for (int i = 0; i < paramClasses.length; ++i) {
//                         Class<?> paramType = paramClasses[i];
//                         paramType = convertPrimitiveClass(paramType);
// 
//                         if (paramType != args[i]) {
//                             paramsMatch = false;
//                             break;
//                         }
//                     }
// 
//                     if (paramsMatch) {
//                         methodMatched = m;
//                         break;
//                     }
//                 }
//             }
//         }
// 
//         if (methodMatched != null) {
//             return methodMatched;
//         } else {
//             throw new NoSuchMethodException("Cannot find method: " + methodName);
//         }
//     }
// 
//     private static Collection<Method> getAllMethods(Class<?> clazz) {
//         HashSet<Method> methods = new HashSet<Method>();
// 
//         methods.addAll(Arrays.asList(clazz.getDeclaredMethods()));
// 
//         for (Class<?> s : getAllSuperClasses(clazz)) {
//             methods.addAll(Arrays.asList(s.getDeclaredMethods()));
//         }
// 
//         return methods;
//     }
// 
//     private static Collection<Class<?>> getAllSuperClasses(Class<?> clazz) {
//         HashSet<Class<?>> classes = new HashSet<Class<?>>();
// 
//         if ((clazz != null) && (!clazz.equals(Object.class))) {
//             classes.add(clazz);
//             classes.addAll(getAllSuperClasses(clazz.getSuperclass()));
// 
//             for (Class<?> i : clazz.getInterfaces()) {
//                 classes.addAll(getAllSuperClasses(i));
//             }
//         }
//         return classes;
//     }
// 
//     private static Class<?> convertPrimitiveClass(Class<?> primitive) {
//         if (primitive.isPrimitive()) {
//             if (primitive == Integer.TYPE) {
//                 return Integer.class;
//             }
//             if (primitive == Boolean.TYPE) {
//                 return Boolean.class;
//             }
//             if (primitive == Float.TYPE) {
//                 return Float.class;
//             }
//             if (primitive == Long.TYPE) {
//                 return Long.class;
//             }
//             if (primitive == Double.TYPE) {
//                 return Double.class;
//             }
//             if (primitive == Short.TYPE) {
//                 return Short.class;
//             }
//             if (primitive == Byte.TYPE) {
//                 return Byte.class;
//             }
//             if (primitive == Character.TYPE) {
//                 return Character.class;
//             }
//         }
//         return primitive;
//     }
// }


// Path: provider/src/main/java/com/raygun/raygun4android/network/http/RaygunHttpsUrlStreamHandler.java
import com.raygun.raygun4android.logging.RaygunLogger;
import com.raygun.raygun4android.utils.RaygunReflectionUtils;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

package com.raygun.raygun4android.network.http;



final class RaygunHttpsUrlStreamHandler extends URLStreamHandler {
    private static final int PORT = 443;
    private static final String PROTOCOL = "https";
    private final URLStreamHandler originalHandler;

    RaygunHttpsUrlStreamHandler(URLStreamHandler handler) {
        originalHandler = handler;
    }

    protected URLConnection openConnection(URL url) throws IOException {
        try {
            Method method = RaygunReflectionUtils.findMethod(originalHandler.getClass(), "openConnection", new Class<?>[]{URL.class});