Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
  • Loading branch information
nikclayton committed May 16, 2015
1 parent bef2748 commit db21092
Show file tree
Hide file tree
Showing 156 changed files with 3,547 additions and 2,635 deletions.
72 changes: 58 additions & 14 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,42 +1,86 @@
Upcoming
========

1.2.7
=====

* Support skipping tracks in remote streams that have that feature,
such as Slacker Radio. Code from Sean Wilson
(https://github.com/swilson).

* Simplified the configuration process for new users. Squeezer now
automatically searches for servers on the local network, saves
connection information per-server, and numerous other fixes.

* Changed saving files to remove non-VFAT compatible characters from
filenames to make it easier to export them to Windows and similar
systems.

* Fixed issue where some plugin icons were not showing.

* Fixed issue where Internet radio stations were not working when
connected to servers running version 7.8 or above.

* Fixed issue where the UI could stop showing player progress.

1.2.6
=====

* Better handle the connection lifecycle with the server, which should
reduce opportunities for crashing.

* Add theme-specific icons for the view-option dialogs.

* Bring the Danish translation up to date.

1.2.5
=====

* Fixed potential crash if the connected players change while a
player's context menu is open.

* Fixed potential crash when setAdapter() is called from the
wrong thread.

1.2.4
=====

* Fix potential crash when resuming Squeezer.
* Fixed potential crash when resuming Squeezer.

* Fix bug with players not showing on devices running Android 2.1 and
* Fixed bug with players not showing on devices running Android 2.1 and
2.2.x.

1.2.3
=====

* Fix bug that hid playlist management options.
* Fixed bug that hid playlist management options.

* Fix crash when all players disconnect and a player context menu
* Fixed crash when all players disconnect and a player context menu
is open.

* Fix tracknames not scrolling properly on the "Now playing" screen.
* Fixed tracknames not scrolling properly on the "Now playing" screen.

* Fix crash if a player's identifier is not its MAC address.
* Fixed crash if a player's identifier is not its MAC address.

* Fix crashes caused be initialising the UI before the connection
* Fixed crashes caused by initialising the UI before the connection
to the server completes.

1.2.2
=====

* Fix potential crash after connecting to the server.
* Fixed potential crash after connecting to the server.

* Fix potential crash downloading music folder items from servers
* Fixed potential crash downloading music folder items from servers
older than version 7.6.

* Fix potential crash when viewing the current playlist.
* Fixed potential crash when viewing the current playlist.

1.2.1
=====

* Fix potential crash when the notification message is updated.
* Fixed potential crash when the notification message is updated.

* Fix potential crash when disconnecting and reconnecting to the
* Fixed potential crash when disconnecting and reconnecting to the
server.

1.2.0
Expand All @@ -59,7 +103,7 @@
1.1.1
=====

* Fix potential crash opening the music folder list.
* Fixed potential crash opening the music folder list.

1.1.0
=====
Expand Down Expand Up @@ -267,7 +311,7 @@
0.6.2
=====

* Fix crashes on orientation change, and assorted Honeycomb crashes after incorrect
* Fixed crashes on orientation change, and assorted Honeycomb crashes after incorrect
API selection.


Expand Down
48 changes: 43 additions & 5 deletions Squeezer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
Expand All @@ -25,12 +25,16 @@ dependencies {
// Support Repository" to be installed via the SDK manager.
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.android.support:support-annotations:20.0.0'

// Third party libraries
compile 'com.google.guava:guava:18.0'
// findbugs is required for Proguard to work with Guava.
compile 'com.google.code.findbugs:jsr305:2.0.2'

// EventBus, https://github.com/greenrobot/EventBus.
compile 'de.greenrobot:eventbus:2.4.0'

// Changelogs, see https://github.com/cketti/ckChangeLog.
compile 'de.cketti.library.changelog:ckchangelog:1.2.0'
compile 'com.crashlytics.android:crashlytics:1.+'
Expand All @@ -40,9 +44,17 @@ android {
compileSdkVersion 19
buildToolsVersion "21.1.1"

def gitHash = "git rev-parse --short HEAD".execute().text.trim()
def hasModifiedDeletedOrOtherFiles = !"git ls-files -mdo --exclude-standard".execute().text.trim().isEmpty()
def hasStagedFiles = !"git diff-index --no-ext-diff --name-only --cached HEAD".execute().text.trim().isEmpty()
def dirtyWorkingCopy = hasModifiedDeletedOrOtherFiles || hasStagedFiles
def gitDescription = dirtyWorkingCopy ? "${gitHash}-dirty" : gitHash

defaultConfig {
minSdkVersion 7
targetSdkVersion 19

buildConfigField "String", "GIT_DESCRIPTION", "\"${gitDescription}\""
}

lintOptions {
Expand All @@ -58,6 +70,7 @@ android {
// proguard-android-optimize.txt are automatically included.
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
proguardFile "proguard-crashlytics.cfg"
proguardFile "proguard-eventbus.cfg"
proguardFile "proguard-guava.cfg"
proguardFile "proguard-squeezer.cfg"
}
Expand Down Expand Up @@ -86,15 +99,40 @@ android {

productFlavors {
beta {
versionCode 31
versionName "1.2.0-beta-2"
versionCode 43
versionName "1.2.7-beta-2"
signingConfig android.signingConfigs.release
}

live {
versionCode 36
versionName "1.2.4"
versionCode 44
versionName "1.2.7"
signingConfig android.signingConfigs.release
}
}

applicationVariants.all { variant ->
def apkSuffix = "-${variant.mergedFlavor.versionName}-${gitDescription}"
variant.outputs.each { output ->
def originalApkFile = output.outputFile
output.outputFile = new File(
// Override this to change output directory
(String) originalApkFile.parent,
(String) originalApkFile.name.replace(".apk", "${apkSuffix}.apk")
)
}
// Print the APK path after assemble is done
variant.assemble.doLast {
variant.outputs.each { output ->
println output.outputFile
}
}

// Print the APK path as the last step before install, at which point the apk is complete
variant.install?.doFirst { // the install task can be null
variant.outputs.each { output ->
println output.outputFile
}
}
}
}
3 changes: 3 additions & 0 deletions Squeezer/proguard-eventbus.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-keepclassmembers class ** {
public void onEvent*(**);
}
1 change: 1 addition & 0 deletions Squeezer/proguard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@

# Squeezer customisations
-include proguard-crashlytics.cfg
-include proguard-eventbus.cfg
-include proguard-guava.cfg
-include proguard-squeezer.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

package uk.org.ngo.squeezer.test.mock;

import junit.framework.AssertionFailedError;

import android.util.Log;

import junit.framework.AssertionFailedError;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
Expand All @@ -31,7 +31,7 @@ public class SqueezeboxServerMock extends Thread {

public static final int CLI_PORT = 9091;

private Object serverReadyMonitor = new Object();
private final Object serverReadyMonitor = new Object();

private boolean accepting;

Expand All @@ -48,7 +48,7 @@ public SqueezeboxServerMock start() {
throw new AssertionFailedError("Expected the mock server to start");
}
} catch (InterruptedException e) {
Log.w(TAG, "Interrupted while wating for the mock server to start");
Log.w(TAG, "Interrupted while waiting for the mock server to start");
}
}
}
Expand Down Expand Up @@ -80,9 +80,9 @@ public Starter albumsSortOrder(AlbumsSortOrder albumsSortOrder) {
return this;
}

private String username = null;
private String username;

private String password = null;
private String password;

private boolean canRandomplay = true;

Expand All @@ -98,7 +98,7 @@ public static Starter starter() {
private SqueezeboxServerMock(Starter starter) {
username = starter.username;
password = starter.password;
canRamdomplay = starter.canRandomplay;
canRandomplay = starter.canRandomplay;
canMusicFolder = starter.canMusicFolder;
albumsSortOrder = starter.albumsSortOrder;
}
Expand All @@ -109,7 +109,7 @@ private SqueezeboxServerMock(Starter starter) {

private boolean canMusicFolder;

private boolean canRamdomplay;
private boolean canRandomplay;

private AlbumsSortOrder albumsSortOrder;

Expand All @@ -122,6 +122,7 @@ public void run() {
try {
// Establish server socket
serverSocket = new ServerSocket(CLI_PORT);
serverSocket.setReuseAddress(true);

// Wait for incoming connection
Log.d(TAG, "Mock server listening on port: " + serverSocket.getLocalPort());
Expand All @@ -140,7 +141,7 @@ public void run() {

boolean loggedIn = (username == null || password == null);

while (true) {
while(! Thread.interrupted()) {
// read data from Socket
String line;
try {
Expand All @@ -155,8 +156,8 @@ public void run() {

String[] tokens = line.split(" ");

if (tokens[0].equals("login")) {
out.println(tokens[0] + " " + tokens[1] + " ******");
if ("login".equals(tokens[0])) {
out.println(tokens[0] + ' ' + tokens[1] + " ******");
if (username != null && password != null) {
if (tokens.length < 2 || !username.equals(tokens[1])) {
break;
Expand All @@ -171,36 +172,34 @@ public void run() {
break;
}

if (line.equals("exit")) {
if ("exit".equals(line)) {
out.println(line);
break;
} else if (line.equals("listen 1")) {
} else if ("listen 1".equals(line)) {
//Just ignore, mock doesn't support server side events
out.println("listen 1");
} else if (line.equals("can musicfolder ?")) {
} else if ("can musicfolder ?".equals(line)) {
out.println("can musicfolder " + (canMusicFolder ? 1 : 0));
} else if (line.equals("can randomplay ?")) {
out.println("can randomplay " + (canRamdomplay ? 1 : 0));
} else if (line.equals("pref httpport ?")) {
} else if ("can randomplay ?".equals(line)) {
out.println("can randomplay " + (canRandomplay ? 1 : 0));
} else if ("pref httpport ?".equals(line)) {
out.println("pref httpport 9092");
} else if (line.equals("pref jivealbumsort ?")) {
} else if ("pref jivealbumsort ?".equals(line)) {
out.println("pref jivealbumsort " + albumsSortOrder);
} else if (line.equals("version ?")) {
} else if ("version ?".equals(line)) {
out.println("version 7.7.2");
} else if (tokens[0].equals("players")) {
} else if ("players".equals(tokens[0])) {
//TODO implement
} else {
out.println(line);
}
}
}

try {
Log.d(TAG, "Mock server closing socket");
socket.close();
serverSocket.close();
} catch (IOException e) {
}

} catch (IOException e) {}
}

}

This file was deleted.

Loading

0 comments on commit db21092

Please sign in to comment.