// Path: src/com/crossbowffs/quotelock/api/QuoteData.java
// public class QuoteData {
//     private final String mQuoteText;
//     private final String mQuoteSource;
// 
//     /**
//      * Creates a new quote data object. The parameters may be {@code null},
//      * in which case they are replaced with an empty string.
//      *
//      * @param quoteText The first line (text) of the quote.
//      * @param quoteSource The second line (author) of the quote.
//      */
//     public QuoteData(String quoteText, String quoteSource) {
//         mQuoteText = quoteText;
//         mQuoteSource = quoteSource;
//     }
// 
//     /**
//      * Gets the first line of the quote. Will not be {@code null}.
//      */
//     public String getQuoteText() {
//         String text = mQuoteText;
//         if (text == null) {
//             text = "";
//         }
//         return text;
//     }
// 
//     /**
//      * Gets the second line of the quote. Will not be {@code null}.
//      */
//     public String getQuoteSource() {
//         String source = mQuoteSource;
//         if (source == null) {
//             source = "";
//         }
//         return source;
//     }
// }
// 
// Path: src/com/crossbowffs/quotelock/api/QuoteModule.java
// public interface QuoteModule {
//     /**
//      * Gets the user-friendly name of the quote provider that this module uses.
//      * Must not return {@code null}.
//      */
//     String getDisplayName(Context context);
// 
//     /**
//      * Gets a {@link ComponentName} representing the configuration
//      * {@link android.app.Activity} for this module.
//      * Returns {@code null} if there is no configuration activity.
//      */
//     ComponentName getConfigActivity(Context context);
// 
//     /**
//      * Returns a minimum refresh interval (in seconds) for the quote source.
//      * If there is no minimum refresh interval, returns 0. If the quote should
//      * never automatically be refreshed, returns {@link Integer#MAX_VALUE}.
//      */
//     int getMinimumRefreshInterval(Context context);
// 
//     /**
//      * Whether the provider needs to download data from the internet.
//      * Returns {@code false} for providers which store data locally on the
//      * device.
//      */
//     boolean requiresInternetConnectivity(Context context);
// 
//     /**
//      * Gets a new quote from the quote provider. This method is executed on a
//      * background thread, so you should not need to use any async calls.
//      * May return {@code null} or throw an exception in the case of an error.
//      */
//     QuoteData getQuote(Context context) throws Exception;
// }
// 
// Path: src/com/crossbowffs/quotelock/utils/IOUtils.java
// public class IOUtils {
//     public static String streamToString(InputStream inputStream, String encoding, int bufferSize) throws IOException {
//         char[] buffer = new char[bufferSize];
//         StringBuilder sb = new StringBuilder();
//         try (InputStreamReader reader = new InputStreamReader(inputStream, encoding)) {
//             while (true) {
//                 int count = reader.read(buffer, 0, bufferSize);
//                 if (count < 0) break;
//                 sb.append(buffer, 0, count);
//             }
//         }
//         return sb.toString();
//     }
// 
//     public static String streamToString(InputStream inputStream) throws IOException {
//         return streamToString(inputStream, "UTF-8", 2048);
//     }
// 
//     public static String downloadString(String urlString) throws IOException {
//         URL url = new URL(urlString);
//         String ua = String.format("QuoteLock/%s (+%s)", BuildConfig.VERSION_NAME, Urls.GITHUB_QUOTELOCK);
//         HttpURLConnection connection = (HttpURLConnection)url.openConnection();
//         try {
//             connection.setRequestProperty("User-Agent",  ua);
//             int responseCode = connection.getResponseCode();
//             if (responseCode == 200) {
//                 return streamToString(connection.getInputStream());
//             } else {
//                 throw new IOException("Server returned non-200 status code: " + responseCode);
//             }
//         } finally {
//             connection.disconnect();
//         }
//     }
// }


import android.content.ComponentName;
import android.content.Context;
import com.crossbowffs.quotelock.R;
import com.crossbowffs.quotelock.api.QuoteData;
import com.crossbowffs.quotelock.api.QuoteModule;
import com.crossbowffs.quotelock.utils.IOUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
package com.crossbowffs.quotelock.modules.natune;


public class NatuneQuoteModule implements QuoteModule {
    @Override
    public String getDisplayName(Context context) {
        return context.getString(R.string.module_natune_name);
    }

    @Override
    public ComponentName getConfigActivity(Context context) {
        return null;
    }

    @Override
    public int getMinimumRefreshInterval(Context context) {
        return 0;
    }

    @Override
    public boolean requiresInternetConnectivity(Context context) {
        return true;
    }

    @Override
// Path: src/com/crossbowffs/quotelock/api/QuoteData.java
// public class QuoteData {
//     private final String mQuoteText;
//     private final String mQuoteSource;
// 
//     /**
//      * Creates a new quote data object. The parameters may be {@code null},
//      * in which case they are replaced with an empty string.
//      *
//      * @param quoteText The first line (text) of the quote.
//      * @param quoteSource The second line (author) of the quote.
//      */
//     public QuoteData(String quoteText, String quoteSource) {
//         mQuoteText = quoteText;
//         mQuoteSource = quoteSource;
//     }
// 
//     /**
//      * Gets the first line of the quote. Will not be {@code null}.
//      */
//     public String getQuoteText() {
//         String text = mQuoteText;
//         if (text == null) {
//             text = "";
//         }
//         return text;
//     }
// 
//     /**
//      * Gets the second line of the quote. Will not be {@code null}.
//      */
//     public String getQuoteSource() {
//         String source = mQuoteSource;
//         if (source == null) {
//             source = "";
//         }
//         return source;
//     }
// }
// 
// Path: src/com/crossbowffs/quotelock/api/QuoteModule.java
// public interface QuoteModule {
//     /**
//      * Gets the user-friendly name of the quote provider that this module uses.
//      * Must not return {@code null}.
//      */
//     String getDisplayName(Context context);
// 
//     /**
//      * Gets a {@link ComponentName} representing the configuration
//      * {@link android.app.Activity} for this module.
//      * Returns {@code null} if there is no configuration activity.
//      */
//     ComponentName getConfigActivity(Context context);
// 
//     /**
//      * Returns a minimum refresh interval (in seconds) for the quote source.
//      * If there is no minimum refresh interval, returns 0. If the quote should
//      * never automatically be refreshed, returns {@link Integer#MAX_VALUE}.
//      */
//     int getMinimumRefreshInterval(Context context);
// 
//     /**
//      * Whether the provider needs to download data from the internet.
//      * Returns {@code false} for providers which store data locally on the
//      * device.
//      */
//     boolean requiresInternetConnectivity(Context context);
// 
//     /**
//      * Gets a new quote from the quote provider. This method is executed on a
//      * background thread, so you should not need to use any async calls.
//      * May return {@code null} or throw an exception in the case of an error.
//      */
//     QuoteData getQuote(Context context) throws Exception;
// }
// 
// Path: src/com/crossbowffs/quotelock/utils/IOUtils.java
// public class IOUtils {
//     public static String streamToString(InputStream inputStream, String encoding, int bufferSize) throws IOException {
//         char[] buffer = new char[bufferSize];
//         StringBuilder sb = new StringBuilder();
//         try (InputStreamReader reader = new InputStreamReader(inputStream, encoding)) {
//             while (true) {
//                 int count = reader.read(buffer, 0, bufferSize);
//                 if (count < 0) break;
//                 sb.append(buffer, 0, count);
//             }
//         }
//         return sb.toString();
//     }
// 
//     public static String streamToString(InputStream inputStream) throws IOException {
//         return streamToString(inputStream, "UTF-8", 2048);
//     }
// 
//     public static String downloadString(String urlString) throws IOException {
//         URL url = new URL(urlString);
//         String ua = String.format("QuoteLock/%s (+%s)", BuildConfig.VERSION_NAME, Urls.GITHUB_QUOTELOCK);
//         HttpURLConnection connection = (HttpURLConnection)url.openConnection();
//         try {
//             connection.setRequestProperty("User-Agent",  ua);
//             int responseCode = connection.getResponseCode();
//             if (responseCode == 200) {
//                 return streamToString(connection.getInputStream());
//             } else {
//                 throw new IOException("Server returned non-200 status code: " + responseCode);
//             }
//         } finally {
//             connection.disconnect();
//         }
//     }
// }


// Path: src/com/crossbowffs/quotelock/modules/natune/NatuneQuoteModule.java
import android.content.ComponentName;
import android.content.Context;
import com.crossbowffs.quotelock.R;
import com.crossbowffs.quotelock.api.QuoteData;
import com.crossbowffs.quotelock.api.QuoteModule;
import com.crossbowffs.quotelock.utils.IOUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

package com.crossbowffs.quotelock.modules.natune;


public class NatuneQuoteModule implements QuoteModule {
    @Override
    public String getDisplayName(Context context) {
        return context.getString(R.string.module_natune_name);
    }

    @Override
    public ComponentName getConfigActivity(Context context) {
        return null;
    }

    @Override
    public int getMinimumRefreshInterval(Context context) {
        return 0;
    }

    @Override
    public boolean requiresInternetConnectivity(Context context) {
        return true;
    }

    @Override
    public QuoteData getQuote(Context context) throws Exception {