mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Mark ignored Exceptions as such
This commit is contained in:
@@ -144,7 +144,7 @@ public class BluetoothLink extends BaseLink {
|
|||||||
continueAccepting = false;
|
continueAccepting = false;
|
||||||
try {
|
try {
|
||||||
socket.close();
|
socket.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException ignored) {
|
||||||
}
|
}
|
||||||
linkProvider.disconnectedLink(this, getDeviceId(), socket);
|
linkProvider.disconnectedLink(this, getDeviceId(), socket);
|
||||||
}
|
}
|
||||||
|
@@ -216,10 +216,10 @@ public class LanLink extends BaseLink {
|
|||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
Log.i("KDE/LanLink", "Finished sending payload ("+progress+" bytes written)");
|
Log.i("KDE/LanLink", "Finished sending payload ("+progress+" bytes written)");
|
||||||
} finally {
|
} finally {
|
||||||
try { server.close(); } catch (Exception e) { }
|
try { server.close(); } catch (Exception ignored) { }
|
||||||
try { payloadSocket.close(); } catch (Exception e) { }
|
try { payloadSocket.close(); } catch (Exception ignored) { }
|
||||||
np.getPayload().close();
|
np.getPayload().close();
|
||||||
try { outputStream.close(); } catch (Exception e) { }
|
try { outputStream.close(); } catch (Exception ignored) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -91,7 +91,7 @@ public class NetworkPacket {
|
|||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
try {
|
try {
|
||||||
mBody.put(key, value);
|
mBody.put(key, value);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ public class NetworkPacket {
|
|||||||
public void set(String key, int value) {
|
public void set(String key, int value) {
|
||||||
try {
|
try {
|
||||||
mBody.put(key, value);
|
mBody.put(key, value);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ public class NetworkPacket {
|
|||||||
public void set(String key, boolean value) {
|
public void set(String key, boolean value) {
|
||||||
try {
|
try {
|
||||||
mBody.put(key, value);
|
mBody.put(key, value);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ public class NetworkPacket {
|
|||||||
public void set(String key, double value) {
|
public void set(String key, double value) {
|
||||||
try {
|
try {
|
||||||
mBody.put(key, value);
|
mBody.put(key, value);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ public class NetworkPacket {
|
|||||||
public void set(String key, JSONArray value) {
|
public void set(String key, JSONArray value) {
|
||||||
try {
|
try {
|
||||||
mBody.put(key, value);
|
mBody.put(key, value);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ public class NetworkPacket {
|
|||||||
public void set(String key, JSONObject value) {
|
public void set(String key, JSONObject value) {
|
||||||
try {
|
try {
|
||||||
mBody.put(key, value);
|
mBody.put(key, value);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ public class NetworkPacket {
|
|||||||
try {
|
try {
|
||||||
String str = jsonArray.getString(i);
|
String str = jsonArray.getString(i);
|
||||||
list.add(str);
|
list.add(str);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@@ -197,7 +197,7 @@ public class NetworkPacket {
|
|||||||
jsonArray.put(str);
|
jsonArray.put(str);
|
||||||
}
|
}
|
||||||
mBody.put(key, jsonArray);
|
mBody.put(key, jsonArray);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ public class NetworkPacket {
|
|||||||
try {
|
try {
|
||||||
String str = jsonArray.getString(i);
|
String str = jsonArray.getString(i);
|
||||||
list.add(str);
|
list.add(str);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@@ -228,7 +228,7 @@ public class NetworkPacket {
|
|||||||
jsonArray.put(str);
|
jsonArray.put(str);
|
||||||
}
|
}
|
||||||
mBody.put(key, jsonArray);
|
mBody.put(key, jsonArray);
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user