<commit_before>package news.androidtv.tvapprepo.model;

import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Looper;

import com.bumptech.glide.Glide;

import java.io.ByteArrayOutputStream;
import java.util.concurrent.ExecutionException;

import news.androidtv.tvapprepo.utils.ShortcutPostTask;

/**
 * Created by Nick on 3/20/2017. A model for storing advanced options in generating shortcuts.
 */
public class AdvancedOptions {
    private volatile int mReady = 0;
    private String mCategory = "";
    private String mBannerUrl = "";
    private byte[] mBannerData = null;
    private Context mContext = null;

    public AdvancedOptions(Context context) {
        mContext = context;
    }

    public AdvancedOptions setBannerUrl(String bannerUrl) {
        mReady++;
        mBannerUrl = bannerUrl;
        // Download from Glide.
        downloadBanner(mContext, bannerUrl, new GlideCallback() {
            @Override
            public void onDone(byte[] binaryData) {
                mBannerData = binaryData;
                mReady--;
            }
        });
        return this;
    }
<commit_msg>Fixes bug preventing banner-less games from being built<commit_after>package news.androidtv.tvapprepo.model;

import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Looper;

import com.bumptech.glide.Glide;

import java.io.ByteArrayOutputStream;
import java.util.concurrent.ExecutionException;

import news.androidtv.tvapprepo.utils.ShortcutPostTask;

/**
 * Created by Nick on 3/20/2017. A model for storing advanced options in generating shortcuts.
 */
public class AdvancedOptions {
    private volatile int mReady = 0;
    private String mCategory = "";
    private String mBannerUrl = "";
    private byte[] mBannerData = null;
    private Context mContext = null;

    public AdvancedOptions(Context context) {
        mContext = context;
    }

    public AdvancedOptions setBannerUrl(String bannerUrl) {
        if (bannerUrl == null || bannerUrl.isEmpty()) {
            // Exit early.
            return this;
        }
        mReady++;
        mBannerUrl = bannerUrl;
        // Download from Glide.
        downloadBanner(mContext, bannerUrl, new GlideCallback() {
            @Override
            public void onDone(byte[] binaryData) {
                mBannerData = binaryData;
                mReady--;
            }
        });
        return this;
    }

{'fraction_non_alphanumeric': 0.08821170809943865, 'fraction_numerical': 0.006415396952686447, 'mean_word_length': 2.6476608187134505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3021162', 'n_tokens_mistral': 706, 'n_tokens_neox': 672, 'n_words': 181}