From 432c9a39c483a26ea2e1ee41a1a44460b2684e27 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Mon, 16 Jul 2012 15:54:46 -0700 Subject: Change field getter threshold from API 8 to API 9 The Dalvik optimization to automatically inline getters was introduced in Gingerbread, not Froyo. Change-Id: If14288aa398206d4eebfa57ccc7ddfabc6dde83d --- .../src/com/android/tools/lint/checks/FieldGetterDetector.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lint/libs/lint_checks/src/com/android/tools/lint/checks/FieldGetterDetector.java b/lint/libs/lint_checks/src/com/android/tools/lint/checks/FieldGetterDetector.java index 6cddfd5..f126074 100644 --- a/lint/libs/lint_checks/src/com/android/tools/lint/checks/FieldGetterDetector.java +++ b/lint/libs/lint_checks/src/com/android/tools/lint/checks/FieldGetterDetector.java @@ -62,9 +62,9 @@ public class FieldGetterDetector extends Detector implements Detector.ClassScann "nothing other than return the field, you might want to just reference the " + "local field directly instead.\n" + "\n" + - "NOTE: As of Android 2.2 (Froyo), this optimization is performed automatically " + - "by Dalvik, so there is no need to change your code; this is only relevant if " + - "you are targeting older versions of Android.", + "NOTE: As of Android 2.3 (Gingerbread), this optimization is performed " + + "automatically by Dalvik, so there is no need to change your code; this is " + + "only relevant if you are targeting older versions of Android.", Category.PERFORMANCE, 4, @@ -94,8 +94,8 @@ public class FieldGetterDetector extends Detector implements Detector.ClassScann @SuppressWarnings("rawtypes") @Override public void checkClass(@NonNull ClassContext context, @NonNull ClassNode classNode) { - // As of Froyo/API 8, Dalvik performs this optimization automatically - if (context.getProject().getMinSdk() >= 8) { + // As of Gingerbread/API 9, Dalvik performs this optimization automatically + if (context.getProject().getMinSdk() >= 9) { return; } -- cgit v1.1