<commit_before>package org.mozilla.mozstumbler;

import android.accounts.Account;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.SyncStatusObserver;
import android.database.Cursor;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import org.mozilla.mozstumbler.provider.DatabaseContract;
import org.mozilla.mozstumbler.sync.AuthenticatorService;
import org.mozilla.mozstumbler.sync.SyncUtils;

public class UploadReportsDialog extends DialogFragment {
    private static final String LOGTAG = UploadReportsDialog.class.getName();
    private static final boolean DBG = BuildConfig.DEBUG;

    private TextView mLastUpdateTimeView;
    private TextView mObservationsSentView;
    private TextView mCellsSentView;
    private TextView mWifisSentView;
    private TextView mObservationsQueuedView;
    private TextView mCellsQueuedView;
    private TextView mWifisQueuedView;
    private View mUploadButton;
    private View mProgressbarView;

    private Object mStatusChangeListener;
    private boolean hasQueuedObservations;
    private final Account mAccount = AuthenticatorService.GetAccount();

    public UploadReportsDialog() {
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        LayoutInflater inflater = getActivity().getLayoutInflater();

        ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.dialog_upload_observations, null);
        mLastUpdateTimeView = (TextView) rootView.findViewById(R.id.last_upload_time_value);
        mObservationsSentView = (TextView) rootView.findViewById(R.id.observations_sent_value);
        mCellsSentView = (TextView) rootView.findViewById(R.id.cells_sent_value);
        mWifisSentView = (TextView) rootView.findViewById(R.id.wifis_sent_value);
        mObservationsQueuedView = (TextView) rootView.findViewById(R.id.observations_queued_value);
        mCellsQueuedView = (TextView) rootView.findViewById(R.id.cells_queued_value);
        mWifisQueuedView = (TextView) rootView.findViewById(R.id.wifis_queued_value);
        mProgressbarView = rootView.findViewById(R.id.progress);
        mUploadButton = rootView.findViewById(R.id.upload_observations_button);

        mUploadButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SyncUtils.TriggerRefresh(true);
            }
        });

        builder.setView(rootView)
                .setTitle(R.string.upload_observations_dialog_title)
                .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        UploadReportsDialog.this.getDialog().cancel();
                    }
                });
        return builder.create();
    }

    @Override<commit_msg>Set upload dialog background to light.<commit_after>package org.mozilla.mozstumbler;

import android.accounts.Account;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.SyncStatusObserver;
import android.database.Cursor;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import org.mozilla.mozstumbler.provider.DatabaseContract;
import org.mozilla.mozstumbler.sync.AuthenticatorService;
import org.mozilla.mozstumbler.sync.SyncUtils;

public class UploadReportsDialog extends DialogFragment {
    private static final String LOGTAG = UploadReportsDialog.class.getName();
    private static final boolean DBG = BuildConfig.DEBUG;

    private TextView mLastUpdateTimeView;
    private TextView mObservationsSentView;
    private TextView mCellsSentView;
    private TextView mWifisSentView;
    private TextView mObservationsQueuedView;
    private TextView mCellsQueuedView;
    private TextView mWifisQueuedView;
    private View mUploadButton;
    private View mProgressbarView;

    private Object mStatusChangeListener;
    private boolean hasQueuedObservations;
    private final Account mAccount = AuthenticatorService.GetAccount();

    public UploadReportsDialog() {
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        LayoutInflater inflater = getActivity().getLayoutInflater();

        ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.dialog_upload_observations, null);
//      if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { // API14+ doesn't need it
        rootView.setBackgroundResource(android.R.color.background_light);
//      }
        mLastUpdateTimeView = (TextView) rootView.findViewById(R.id.last_upload_time_value);
        mObservationsSentView = (TextView) rootView.findViewById(R.id.observations_sent_value);
        mCellsSentView = (TextView) rootView.findViewById(R.id.cells_sent_value);
        mWifisSentView = (TextView) rootView.findViewById(R.id.wifis_sent_value);
        mObservationsQueuedView = (TextView) rootView.findViewById(R.id.observations_queued_value);
        mCellsQueuedView = (TextView) rootView.findViewById(R.id.cells_queued_value);
        mWifisQueuedView = (TextView) rootView.findViewById(R.id.wifis_queued_value);
        mProgressbarView = rootView.findViewById(R.id.progress);
        mUploadButton = rootView.findViewById(R.id.upload_observations_button);

        mUploadButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SyncUtils.TriggerRefresh(true);
            }
        });

        builder.setView(rootView)
                .setTitle(R.string.upload_observations_dialog_title)
                .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        UploadReportsDialog.this.getDialog().cancel();
                    }
                });
        return builder.create();
    }

    @Override
{'fraction_non_alphanumeric': 0.08377948198524092, 'fraction_numerical': 0.0014469686007813631, 'mean_word_length': 3.8437281009110023, 'pattern_counts': {'":': 0, '<': 4, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1081631', 'n_tokens_mistral': 1958, 'n_tokens_neox': 1856, 'n_words': 344}