<commit_before>package mozilla.org.webmaker.activity;

import android.app.ActionBar;
import android.content.res.Resources;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import mozilla.org.webmaker.R;
import mozilla.org.webmaker.WebmakerActivity;

public class Tinker extends WebmakerActivity {
    public Tinker() {
        super("tinker", R.id.tinker_layout, R.layout.tinker_layout, R.menu.menu_tinker);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Custom styles
        Resources res = getResources();
        ColorDrawable plum = new ColorDrawable(getResources().getColor(R.color.plum));
        int shadowPlum = res.getColor(R.color.shadow_plum);

        ActionBar actionBar = getActionBar();
        actionBar.setBackgroundDrawable(plum);

        Window window = getWindow();
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
        window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        window.setStatusBarColor(shadowPlum);
    }
}
<commit_msg>Fix possible compatibility issue on older SDK versions<commit_after>package mozilla.org.webmaker.activity;

import android.app.ActionBar;
import android.content.res.Resources;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import mozilla.org.webmaker.R;
import mozilla.org.webmaker.WebmakerActivity;

public class Tinker extends WebmakerActivity {
    public Tinker() {
        super("tinker", R.id.tinker_layout, R.layout.tinker_layout, R.menu.menu_tinker);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            // Custom styles
            Resources res = getResources();
            ColorDrawable plum = new ColorDrawable(getResources().getColor(R.color.plum));
            int shadowPlum = res.getColor(R.color.shadow_plum);

            ActionBar actionBar = getActionBar();
            if (actionBar != null) actionBar.setBackgroundDrawable(plum);

            Window window = getWindow();
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            window.setStatusBarColor(shadowPlum);
        }
    }
}

{'fraction_non_alphanumeric': 0.09576923076923077, 'fraction_numerical': 0.0, 'mean_word_length': 3.661290322580645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2558329', 'n_tokens_mistral': 769, 'n_tokens_neox': 747, 'n_words': 129}