diff --git a/core/java/src/net/i2p/util/ObjectCounter.java b/core/java/src/net/i2p/util/ObjectCounter.java
index 67f979cf3bd24adc74ad5b19c8f17cdc7a0d75cb..b466283554dffda7ab2bd92b72b449b335c40922 100644
--- a/core/java/src/net/i2p/util/ObjectCounter.java
+++ b/core/java/src/net/i2p/util/ObjectCounter.java
@@ -52,8 +52,8 @@ public class ObjectCounter<K> implements Serializable {
      * keySet on Android.
      */
     public Set<K> objects() {
-        if (System.getProperty("java.vendor").toUpperCase().contains("ANDROID")){
-            return ((Map< K, ?>)this.map).keySet();
+        if (SystemVersion.isAndroid()) {
+            return ((Map<K, ?>)this.map).keySet();
         }
         return this.map.keySet();
     }