summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/inputmethod
diff options
context:
space:
mode:
authorYoshiki Iguchi <yoshiki@google.com>2015-05-29 15:36:22 +0900
committerYoshiki Iguchi <yoshiki@google.com>2015-06-02 08:52:49 +0000
commit00d5122b2b59ca86b6278304c666211c4b39cc35 (patch)
tree905a5bb1e0022793495b746f85cf01f308269f9c /core/java/android/view/inputmethod
parent1f8b844870eb9acb334b541b0b41de37e000d2f0 (diff)
downloadframeworks_base-00d5122b2b59ca86b6278304c666211c4b39cc35.zip
frameworks_base-00d5122b2b59ca86b6278304c666211c4b39cc35.tar.gz
frameworks_base-00d5122b2b59ca86b6278304c666211c4b39cc35.tar.bz2
Add a permission annotation to IMM#setCurrentInputMethodSubtype.
Bug: 19477686 Change-Id: I97cb9b57fd0182ee479f4e7dea34801d7b168b9f
Diffstat (limited to 'core/java/android/view/inputmethod')
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 5537b3e..053b35c 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -24,6 +24,7 @@ import com.android.internal.view.IInputMethodManager;
import com.android.internal.view.IInputMethodSession;
import com.android.internal.view.InputBindResult;
+import android.annotation.RequiresPermission;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.Rect;
@@ -60,6 +61,8 @@ import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import static android.Manifest.permission.WRITE_SECURE_SETTINGS;
+
/**
* Central system API to the overall input method framework (IMF) architecture,
* which arbitrates interaction between applications and the current input method.
@@ -1976,6 +1979,7 @@ public final class InputMethodManager {
* @return true if the current subtype was successfully switched. When the specified subtype is
* null, this method returns false.
*/
+ @RequiresPermission(WRITE_SECURE_SETTINGS)
public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) {
synchronized (mH) {
try {