mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-02 08:09:35 +02:00
reformated code
This commit is contained in:
parent
928c14a17e
commit
c0a1cb4210
3 changed files with 5 additions and 8 deletions
|
@ -25,7 +25,6 @@ import android.util.Log;
|
|||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.CheckBox;
|
||||
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.common.api.GoogleApiClient;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import de.badaix.snapcast.control.ClientInfo;
|
||||
|
|
|
@ -35,6 +35,7 @@ public class SnapclientService extends Service {
|
|||
void onPlayerStop(SnapclientService snapclientService);
|
||||
|
||||
void onLog(SnapclientService snapclientService, String log);
|
||||
|
||||
void onError(SnapclientService snapclientService, String msg, Exception exception);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import org.json.JSONException;
|
|||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -46,7 +45,7 @@ public class Stream implements JsonSerialisable {
|
|||
fragment = in.readString();
|
||||
id = in.readString();
|
||||
Bundle bundle = in.readBundle();
|
||||
query = (HashMap<String, String>)bundle.getSerializable("query");
|
||||
query = (HashMap<String, String>) bundle.getSerializable("query");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +59,7 @@ public class Stream implements JsonSerialisable {
|
|||
id = json.getString("id");
|
||||
query = new HashMap<>();
|
||||
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)));
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -98,7 +97,8 @@ public class Stream implements JsonSerialisable {
|
|||
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 (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;
|
||||
return !(query != null ? !query.equals(stream.query) : stream.query != null);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue