From b6ca354431367b625daf9fff5fbe4b1f5ef996ab Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Sun, 6 Jan 2013 11:10:27 +0900 Subject: Small code cleanups Multi-project commit with I249d5fbe Change-Id: Ia28c4e970992aa1299a30e604eaa5d096655c3a5 --- .../android/inputmethod/compat/InputMethodServiceCompatUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java') diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java index 8eea31ed2..14ee654f3 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java @@ -21,6 +21,8 @@ import android.inputmethodservice.InputMethodService; import java.lang.reflect.Method; public final class InputMethodServiceCompatUtils { + // Note that InputMethodService.enableHardwareAcceleration() has been introduced + // in API level 17 (Build.VERSION_CODES.JELLY_BEAN_MR1). private static final Method METHOD_enableHardwareAcceleration = CompatUtils.getMethod(InputMethodService.class, "enableHardwareAcceleration"); @@ -28,7 +30,8 @@ public final class InputMethodServiceCompatUtils { // This utility class is not publicly instantiable. } - public static boolean enableHardwareAcceleration(InputMethodService ims) { - return (Boolean)CompatUtils.invoke(ims, false, METHOD_enableHardwareAcceleration); + public static boolean enableHardwareAcceleration(final InputMethodService ims) { + return (Boolean)CompatUtils.invoke(ims, false /* defaultValue */, + METHOD_enableHardwareAcceleration); } } -- cgit v1.2.3-83-g751a