2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Do not use presized arrays

This commit is contained in:
Nicolas Fella
2018-10-27 00:45:05 +02:00
parent 2410782662
commit a5e6fa14d7
2 changed files with 2 additions and 2 deletions

View File

@@ -217,7 +217,7 @@ public class SslHelper {
supportedCiphers.add("SSL_RSA_WITH_RC4_128_SHA"); // API 9+
supportedCiphers.add("SSL_RSA_WITH_RC4_128_MD5"); // API 9+
}
socket.setEnabledCipherSuites(supportedCiphers.toArray(new String[supportedCiphers.size()]));
socket.setEnabledCipherSuites(supportedCiphers.toArray(new String[0]));
socket.setSoTimeout(1000);

View File

@@ -105,7 +105,7 @@ public class MprisActivity extends AppCompatActivity {
final List<String> playerList = mpris.getPlayerList();
final ArrayAdapter<String> adapter = new ArrayAdapter<>(MprisActivity.this,
android.R.layout.simple_spinner_item,
playerList.toArray(new String[playerList.size()])
playerList.toArray(new String[0])
);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);