<commit_before>package se.chalmers.pd.device;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import se.chalmers.pd.device.MqttWorker.MQTTCallback;
import se.chalmers.pd.device.SpotifyController.PlaylistCallback;
import android.content.Context;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author <NAME>
 * 
 */
public class ApplicationController implements MQTTCallback, PlaylistCallback {

	/**
	 * Callbacks that is used for the main activity to be able to update the
	 * view
	 */
	interface Callbacks {
		void onPlayerLoggedIn();

		void onPlayerPlay();

		void onPlayerNext();

		void onPlayerPause();

		void onStartedApplication(String status);

		void onInstalledApplication(boolean show);

		void onConnectedMQTT(boolean connected);

        void onDisconnectedMQTT(boolean success);

		void onUpdateSeekbar(float position);

        void onUpdatedPlaylist();

	}

	private Context context;
	private MqttWorker mqttWorker;
	private SpotifyController spotifyController;
	private Callbacks callbacks;
    private final String TOPIC_PLAYLIST = "/playlist",
                         TOPIC_PLAYLIST_1 = "/playlist/1",
                         TOPIC_INFOTAINMENT = "/sensor/infotainment",
                         TOPIC_SYSTEM = "/system",
                         PLAYLIST_ZIP = "Playlist.zip",
                         PLAYLIST_NAME = "playlist",
                         DATA = "data",
                         ARTIST = "artist",
                         TRACK = "track",
                         TRACK_LENGTH = "",
                         URI = "uri";

	public ApplicationController(Context context) {<commit_msg>Added correct string representation for tracklength<commit_after>package se.chalmers.pd.device;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import se.chalmers.pd.device.MqttWorker.MQTTCallback;
import se.chalmers.pd.device.SpotifyController.PlaylistCallback;
import android.content.Context;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author <NAME>
 * 
 */
public class ApplicationController implements MQTTCallback, PlaylistCallback {

	/**
	 * Callbacks that is used for the main activity to be able to update the
	 * view
	 */
	interface Callbacks {
		void onPlayerLoggedIn();

		void onPlayerPlay();

		void onPlayerNext();

		void onPlayerPause();

		void onStartedApplication(String status);

		void onInstalledApplication(boolean show);

		void onConnectedMQTT(boolean connected);

        void onDisconnectedMQTT(boolean success);

		void onUpdateSeekbar(float position);

        void onUpdatedPlaylist();

	}

	private Context context;
	private MqttWorker mqttWorker;
	private SpotifyController spotifyController;
	private Callbacks callbacks;
    private final String TOPIC_PLAYLIST = "/playlist",
                         TOPIC_PLAYLIST_1 = "/playlist/1",
                         TOPIC_INFOTAINMENT = "/sensor/infotainment",
                         TOPIC_SYSTEM = "/system",
                         PLAYLIST_ZIP = "Playlist.zip",
                         PLAYLIST_NAME = "playlist",
                         DATA = "data",
                         ARTIST = "artist",
                         TRACK = "track",
                         TRACK_LENGTH = "tracklength",
                         URI = "uri";

	public ApplicationController(Context context) {
{'fraction_non_alphanumeric': 0.08614122472897744, 'fraction_numerical': 0.0011719894520949312, 'mean_word_length': 2.462474645030426, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139435', 'n_tokens_mistral': 996, 'n_tokens_neox': 893, 'n_words': 220}