Rename locatePlatformAdapter to createPlatformAdapter

This commit is contained in:
Matthew Simmons
2011-01-21 17:22:30 -05:00
parent baccb5d12e
commit 36b1a3c020
@@ -68,9 +68,9 @@ public class ApiFeatures {
*/ */
protected ApiFeatures() { protected ApiFeatures() {
if (getApiLevel() >= 9) { if (getApiLevel() >= 9) {
apiPlatformAdapter = locatePlatformAdapter(PLATFORM_ADAPTER_GINGERBREAD); apiPlatformAdapter = createPlatformAdapter(PLATFORM_ADAPTER_GINGERBREAD);
} else if (getApiLevel() >= 5) { } else if (getApiLevel() >= 5) {
apiPlatformAdapter = locatePlatformAdapter(PLATFORM_ADAPTER_ECLAIR); apiPlatformAdapter = createPlatformAdapter(PLATFORM_ADAPTER_ECLAIR);
} }
if (apiPlatformAdapter == null) { if (apiPlatformAdapter == null) {
@@ -81,7 +81,7 @@ public class ApiFeatures {
Log.i(MyTracksConstants.TAG, "Using platform adapter " + apiPlatformAdapter.getClass()); Log.i(MyTracksConstants.TAG, "Using platform adapter " + apiPlatformAdapter.getClass());
} }
private ApiPlatformAdapter locatePlatformAdapter(String className) { private ApiPlatformAdapter createPlatformAdapter(String className) {
try { try {
Class<?> clazz = Class.forName(className); Class<?> clazz = Class.forName(className);
return (ApiPlatformAdapter) clazz.newInstance(); return (ApiPlatformAdapter) clazz.newInstance();