Merge "Use @EnforcePermission for IIMM#showInputMethodPickerFromSystem()"
This commit is contained in:
committed by
Android (Google) Code Review
commit
42aa2e5e27
@@ -76,6 +76,7 @@ interface IInputMethodManager {
|
||||
void showInputMethodPickerFromClient(in IInputMethodClient client,
|
||||
int auxiliarySubtypeMode);
|
||||
|
||||
@EnforcePermission("WRITE_SECURE_SETTINGS")
|
||||
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "
|
||||
+ "android.Manifest.permission.WRITE_SECURE_SETTINGS)")
|
||||
void showInputMethodPickerFromSystem(in IInputMethodClient client,
|
||||
|
||||
@@ -3993,15 +3993,10 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
@EnforcePermission(Manifest.permission.WRITE_SECURE_SETTINGS)
|
||||
@Override
|
||||
public void showInputMethodPickerFromSystem(IInputMethodClient client, int auxiliarySubtypeMode,
|
||||
int displayId) {
|
||||
if (mContext.checkCallingPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
throw new SecurityException(
|
||||
"showInputMethodPickerFromSystem requires WRITE_SECURE_SETTINGS "
|
||||
+ "permission");
|
||||
}
|
||||
// Always call subtype picker, because subtype picker is a superset of input method
|
||||
// picker.
|
||||
mHandler.obtainMessage(MSG_SHOW_IM_SUBTYPE_PICKER, auxiliarySubtypeMode, displayId)
|
||||
|
||||
Reference in New Issue
Block a user