<commit_before>
package info.northcarolinawaterfalls;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.util.Log;

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
import com.google.android.vending.expansion.downloader.Helpers;
import com.google.android.vending.expansion.downloader.IDownloaderClient;
import com.google.android.vending.expansion.downloader.IStub;
import com.google.android.vending.expansion.downloader.impl.DownloaderService;

public class ExpansionDownloaderService extends DownloaderService {
    public static final String TAG = "ExpansionDownloaderService";
    public static final String BASE64_PUBLIC_KEY = "<KEY>";
    public static final byte[] SALT = new byte[] { 64, 16, -82, 2, 1, 22,
        73, 91, 9, -48, 11, -69, -19, 82, 90, -107, 38, -61, -70, 83
    };
    
    @Override
    public String getPublicKey(){
        return BASE64_PUBLIC_KEY;
    }
    
    @Override
    public byte[] getSALT(){
        // mmmm...get some salt
        return SALT;
    }
    
    @Override
    public String getAlarmReceiverClassName() {
        return ExpansionAlarmReceiver.class.getName();
    }
      
    // Simple class to hold description of an expansion file.
    private static class XAPKFile {
        private final boolean mIsMain;
        private final int mFileVersion;
        private final long mFileSize;

        XAPKFile(boolean isMain, int fileVersion, long fileSize) {
            mIsMain = isMain;
            mFileVersion = fileVersion;
            mFileSize = fileSize;
        }
        
        public boolean isMain(){
            return mIsMain;
        }
        
        public int getFileVersion(){
            return mFileVersion;
        }
        
        public long getFileSize(){
            return mFileSize;
        }
    }
    
    private static final XAPKFile[] xAPKS = {
        new XAPKFile(
            true, // true signifies a main file
            1, // the version of the APK that the file was uploaded against
            287540566L // the length of the file in bytes
        )
    };
    
    public static boolean expansionFilesDownloaded(Context c){
        for (XAPKFile expansionFile : xAPKS) {
            String fileName = Helpers.getExpansionAPKFileName(
                    c, expansionFile.isMain(), expansionFile.getFileVersion());
            if(!Helpers.doesFileExist(c, fileName, expansionFile.getFileSize(), false)){
                return false;
            }
        }
        return true;
    }
    
    public XAPKFile[] getAPKFiles(){
        return xAPKS;
    }
}
<commit_msg>Update public key from new app in developer console<commit_after>
package info.northcarolinawaterfalls;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.util.Log;

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
import com.google.android.vending.expansion.downloader.Helpers;
import com.google.android.vending.expansion.downloader.IDownloaderClient;
import com.google.android.vending.expansion.downloader.IStub;
import com.google.android.vending.expansion.downloader.impl.DownloaderService;

public class ExpansionDownloaderService extends DownloaderService {
    public static final String TAG = "ExpansionDownloaderService";
    public static final String BASE64_PUBLIC_KEY = "<KEY>";
    public static final byte[] SALT = new byte[] { 64, 16, -82, 2, 1, 22,
        73, 91, 9, -48, 11, -69, -19, 82, 90, -107, 38, -61, -70, 83
    };
    
    @Override
    public String getPublicKey(){
        return BASE64_PUBLIC_KEY;
    }
    
    @Override
    public byte[] getSALT(){
        // mmmm...get some salt
        return SALT;
    }
    
    @Override
    public String getAlarmReceiverClassName() {
        return ExpansionAlarmReceiver.class.getName();
    }
      
    // Simple class to hold description of an expansion file.
    private static class XAPKFile {
        private final boolean mIsMain;
        private final int mFileVersion;
        private final long mFileSize;

        XAPKFile(boolean isMain, int fileVersion, long fileSize) {
            mIsMain = isMain;
            mFileVersion = fileVersion;
            mFileSize = fileSize;
        }
        
        public boolean isMain(){
            return mIsMain;
        }
        
        public int getFileVersion(){
            return mFileVersion;
        }
        
        public long getFileSize(){
            return mFileSize;
        }
    }
    
    private static final XAPKFile[] xAPKS = {
        new XAPKFile(
            true, // true signifies a main file
            1, // the version of the APK that the file was uploaded against
            287540566L // the length of the file in bytes
        )
    };
    
    public static boolean expansionFilesDownloaded(Context c){
        for (XAPKFile expansionFile : xAPKS) {
            String fileName = Helpers.getExpansionAPKFileName(
                    c, expansionFile.isMain(), expansionFile.getFileVersion());
            if(!Helpers.doesFileExist(c, fileName, expansionFile.getFileSize(), false)){
                return false;
            }
        }
        return true;
    }
    
    public XAPKFile[] getAPKFiles(){
        return xAPKS;
    }
}

{'fraction_non_alphanumeric': 0.08120406020301014, 'fraction_numerical': 0.018200910045502276, 'mean_word_length': 2.114441416893733, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3402227', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1569, 'n_words': 414}