commit | 19f672c2a572ca68c7f43b9e64917d4b5613cb4c | [log] [tgz] |
---|---|---|
author | Erik Wolsheimer <ewol@google.com> | Fri Sep 02 11:41:56 2016 -0700 |
committer | Erik Wolsheimer <ewol@google.com> | Fri Sep 02 11:41:56 2016 -0700 |
tree | 311f3bda0b4b552d1515bc45d542f9a7a0d3254d | |
parent | a17703b027e12cebc9e095658a0e61f5d1e14683 [diff] |
Match semantics of ArrayList#toArray in Config's use thereof BUG: 28706561 Change-Id: Ia8b5a126ab742f02cf2e1f83294d8488b133a822
diff --git a/src/com/android/bluetooth/btservice/Config.java b/src/com/android/bluetooth/btservice/Config.java index 93da040..7a9de21 100644 --- a/src/com/android/bluetooth/btservice/Config.java +++ b/src/com/android/bluetooth/btservice/Config.java
@@ -101,9 +101,7 @@ profiles.add(PROFILE_SERVICES[i]); } } - int totalProfiles = profiles.size(); - SUPPORTED_PROFILES = new Class[totalProfiles]; - profiles.toArray(SUPPORTED_PROFILES); + SUPPORTED_PROFILES = profiles.toArray(new Class[profiles.size()]); } static Class[] getSupportedProfiles() {