<commit_before>﻿using UnityEngine;
using System;
using System.Collections;

public class BatteryLevelPlugin 
{
    public static float GetBatteryLevel()
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            using (var androidPlugin = new AndroidJavaClass("com.RSG.AndroidPlugin.AndroidPlugin"))
            {
                using (var javaUnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
                {
                    using (var currentActivity = javaUnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
                    {
                        return androidPlugin.CallStatic<float>("GetBatteryPct", currentActivity);
                    }
                }
            }
        }

        return 100f;
    }
}<commit_msg>Small fix. Return 1f which at this level represents a full battery.<commit_after>﻿using UnityEngine;
using System;
using System.Collections;

public class BatteryLevelPlugin 
{
    public static float GetBatteryLevel()
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            using (var androidPlugin = new AndroidJavaClass("com.RSG.AndroidPlugin.AndroidPlugin"))
            {
                using (var javaUnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
                {
                    using (var currentActivity = javaUnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
                    {
                        return androidPlugin.CallStatic<float>("GetBatteryPct", currentActivity);
                    }
                }
            }
        }

        return 1f;
    }
}
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.004227053140096618, 'mean_word_length': 1.9275618374558303, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5924288', 'n_tokens_mistral': 411, 'n_tokens_neox': 386, 'n_words': 81}