<commit_before>package org.mozilla.mozstumbler.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;

/**
 * Registered as a receiver in manifest. Starts the StumblerService in passive listening mode.
 * Using GPS_* event changes during development, switch to using the existing permissions for a
 * service on Fennec.
 <meta-data name="MOZILLA_API_KEY" value="aValue">
 <receiver android:name=".service.PassiveServiceStarter">
 <intent-filter>
 <action android:name="android.location.GPS_ENABLED_CHANGE" />
 <action android:name="android.location.GPS_FIX_CHANGE" />
 </intent-filter>
 </receiver>
 */
public class PassiveServiceStarter extends BroadcastReceiver {
    final static String LOGTAG = PassiveServiceStarter.class.getName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();

        if (!action.contains("GPS_ENABLED_CHANGE") &&
            !action.contains("GPS_FIX_CHANGE")) {
            Log.e(LOGTAG, "Unhandled notification. Please fix.");
            return;
        }

        if (SharedConstants.isDebug) Log.d(LOGTAG, "Starting Passively");
        if (SharedConstants.mozillaApiKey == null) {
            try {
                ApplicationInfo ai = context.getPackageManager().
                        getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
                Bundle aBundle = ai.metaData;
                if (ai.metaData != null) {
                    SharedConstants.mozillaApiKey = aBundle.getString("MOZILLA_API_KEY");
                }
            } catch (PackageManager.NameNotFoundException ex) {
                Log.d(SharedConstants.appName, "Exception getting service upload key");
            }
        }

        Intent startServiceIntent = new Intent(context, StumblerService.class);
        startServiceIntent.putExtra(StumblerService.ACTION_START_PASSIVE, true);
        context.startService(startServiceIntent);
    }
}
<commit_msg>Remove check for a specfic intent, any start intent is acceptable, and these might change as we add more<commit_after>package org.mozilla.mozstumbler.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;

/**
 * Registered as a receiver in manifest. Starts the StumblerService in passive listening mode.
 * Using GPS_* event changes during development, switch to using the existing permissions for a
 * service on Fennec.
 <meta-data name="MOZILLA_API_KEY" value="aValue">
 <receiver android:name=".service.PassiveServiceStarter">
 <intent-filter>
 <action android:name="android.location.GPS_ENABLED_CHANGE" />
 <action android:name="android.location.GPS_FIX_CHANGE" />
 </intent-filter>
 </receiver>
 */
public class PassiveServiceStarter extends BroadcastReceiver {
    final static String LOGTAG = PassiveServiceStarter.class.getName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();

        if (SharedConstants.isDebug) Log.d(LOGTAG, "Starting Passively");
        if (SharedConstants.mozillaApiKey == null) {
            try {
                ApplicationInfo ai = context.getPackageManager().
                        getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
                Bundle aBundle = ai.metaData;
                if (ai.metaData != null) {
                    SharedConstants.mozillaApiKey = aBundle.getString("MOZILLA_API_KEY");
                }
            } catch (PackageManager.NameNotFoundException ex) {
                Log.d(SharedConstants.appName, "Exception getting service upload key");
            }
        }

        Intent startServiceIntent = new Intent(context, StumblerService.class);
        startServiceIntent.putExtra(StumblerService.ACTION_START_PASSIVE, true);
        context.startService(startServiceIntent);
    }
}

{'fraction_non_alphanumeric': 0.0949905482041588, 'fraction_numerical': 0.0, 'mean_word_length': 3.2800808897876643, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '2275246', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1115, 'n_words': 261}