From e07b595519e68a8ee524b1886dea01475047abec Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 13 Aug 2014 19:13:54 -0700 Subject: [PATCH] Deprecate InputMethodService.enableHardwareAcceleration() BUG: 16951553 Change-Id: I126ea823eb2eeabb29d30999dec9c9411b33b315 --- api/current.txt | 2 +- core/java/android/inputmethodservice/InputMethodService.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index d85aa81e0f9fb..584246ba6d952 100644 --- a/api/current.txt +++ b/api/current.txt @@ -13586,7 +13586,7 @@ package android.inputmethodservice { public class InputMethodService extends android.inputmethodservice.AbstractInputMethodService { ctor public InputMethodService(); - method public boolean enableHardwareAcceleration(); + method public deprecated boolean enableHardwareAcceleration(); method public int getBackDisposition(); method public int getCandidatesHiddenVisibility(); method public android.view.inputmethod.InputBinding getCurrentInputBinding(); diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 8423d0952ee88..ba811b72707c7 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -640,10 +640,13 @@ public class InputMethodService extends AbstractInputMethodService { * You can call this to try to enable hardware accelerated drawing for * your IME. This must be set before {@link #onCreate}, so you * will typically call it in your constructor. It is not always possible - * to use hardware acclerated drawing in an IME (for example on low-end + * to use hardware accelerated drawing in an IME (for example on low-end * devices that do not have the resources to support this), so the call * returns true if it succeeds otherwise false if you will need to draw * in software. You must be able to handle either case. + * + * @deprecated Starting in API 21, hardware acceleration is always enabled + * on capable devices. */ public boolean enableHardwareAcceleration() { if (mWindow != null) {