update
This commit is contained in:
parent
cc04892205
commit
fe2bc8812a
@ -26,6 +26,7 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static com.yutou.nas_music_player.tools.NetworkTool.NetworkAPI.HOME;
|
import static com.yutou.nas_music_player.tools.NetworkTool.NetworkAPI.HOME;
|
||||||
|
import static com.yutou.nas_music_player.tools.NetworkTool.NetworkAPI.HTTP_KEY;
|
||||||
|
|
||||||
|
|
||||||
public class NetworkTool {
|
public class NetworkTool {
|
||||||
@ -67,7 +68,7 @@ public class NetworkTool {
|
|||||||
@Override
|
@Override
|
||||||
public void httpError(Exception e) {
|
public void httpError(Exception e) {
|
||||||
System.out.println("局域网不在线,走互联网");
|
System.out.println("局域网不在线,走互联网");
|
||||||
httpGet("http://tools.yutou233.cn/nas/music/getlocalhost.do", new JSONObject(), new NetworkInterface() {
|
httpGet("http://tools.yutou233.cn/nas/music/getlocalhost.do?token="+HTTP_KEY, new JSONObject(), new NetworkInterface() {
|
||||||
@Override
|
@Override
|
||||||
public void httpGetData(Object data, int state) {
|
public void httpGetData(Object data, int state) {
|
||||||
try {
|
try {
|
||||||
@ -228,9 +229,7 @@ public class NetworkTool {
|
|||||||
final String finalStr = str.toString();
|
final String finalStr = str.toString();
|
||||||
|
|
||||||
// Log.i(TAG + "[" + url + "?" + toGetSplice(body) + "]", "body:" + str + " (" + connection.getResponseCode() + ")");
|
// Log.i(TAG + "[" + url + "?" + toGetSplice(body) + "]", "body:" + str + " (" + connection.getResponseCode() + ")");
|
||||||
if (map.containsKey(body)) {
|
map.remove(body);
|
||||||
map.remove(body);
|
|
||||||
}
|
|
||||||
AppData.handler.post(new Runnable() {
|
AppData.handler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Loading…
Reference in New Issue
Block a user