reformated code

This commit is contained in:
badaix 2016-02-06 20:47:00 +01:00
parent 928c14a17e
commit c0a1cb4210
3 changed files with 5 additions and 8 deletions

View file

@ -25,7 +25,6 @@ import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
@ -35,9 +34,6 @@ import com.google.android.gms.appindexing.Action;
import com.google.android.gms.appindexing.AppIndex; import com.google.android.gms.appindexing.AppIndex;
import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.GoogleApiClient;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Vector; import java.util.Vector;
import de.badaix.snapcast.control.ClientInfo; import de.badaix.snapcast.control.ClientInfo;

View file

@ -35,6 +35,7 @@ public class SnapclientService extends Service {
void onPlayerStop(SnapclientService snapclientService); void onPlayerStop(SnapclientService snapclientService);
void onLog(SnapclientService snapclientService, String log); void onLog(SnapclientService snapclientService, String log);
void onError(SnapclientService snapclientService, String msg, Exception exception); void onError(SnapclientService snapclientService, String msg, Exception exception);
} }

View file

@ -7,7 +7,6 @@ import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
/** /**
@ -46,7 +45,7 @@ public class Stream implements JsonSerialisable {
fragment = in.readString(); fragment = in.readString();
id = in.readString(); id = in.readString();
Bundle bundle = in.readBundle(); Bundle bundle = in.readBundle();
query = (HashMap<String, String>)bundle.getSerializable("query"); query = (HashMap<String, String>) bundle.getSerializable("query");
} }
@Override @Override
@ -60,7 +59,7 @@ public class Stream implements JsonSerialisable {
id = json.getString("id"); id = json.getString("id");
query = new HashMap<>(); query = new HashMap<>();
JSONObject jQuery = json.getJSONObject("query"); JSONObject jQuery = json.getJSONObject("query");
for(int i = 0; i<jQuery.names().length(); i++) for (int i = 0; i < jQuery.names().length(); i++)
query.put(jQuery.names().getString(i), jQuery.getString(jQuery.names().getString(i))); query.put(jQuery.names().getString(i), jQuery.getString(jQuery.names().getString(i)));
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
@ -98,7 +97,8 @@ public class Stream implements JsonSerialisable {
if (scheme != null ? !scheme.equals(stream.scheme) : stream.scheme != null) return false; if (scheme != null ? !scheme.equals(stream.scheme) : stream.scheme != null) return false;
if (host != null ? !host.equals(stream.host) : stream.host != null) return false; if (host != null ? !host.equals(stream.host) : stream.host != null) return false;
if (path != null ? !path.equals(stream.path) : stream.path != null) return false; if (path != null ? !path.equals(stream.path) : stream.path != null) return false;
if (fragment != null ? !fragment.equals(stream.fragment) : stream.fragment != null) return false; if (fragment != null ? !fragment.equals(stream.fragment) : stream.fragment != null)
return false;
if (id != null ? !id.equals(stream.id) : stream.id != null) return false; if (id != null ? !id.equals(stream.id) : stream.id != null) return false;
return !(query != null ? !query.equals(stream.query) : stream.query != null); return !(query != null ? !query.equals(stream.query) : stream.query != null);
} }