EMMA Coverage Report (generated Fri Aug 23 16:39:17 PDT 2013)
[all classes][org.chromium.content.browser.input]

COVERAGE SUMMARY FOR SOURCE FILE [InputMethodManagerWrapper.java]

nameclass, %method, %block, %line, %
InputMethodManagerWrapper.java100% (1/1)14%  (1/7)13%  (6/46)25%  (3/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InputMethodManagerWrapper100% (1/1)14%  (1/7)13%  (6/46)25%  (3/12)
getInputMethodManager (): InputMethodManager 0%   (0/1)0%   (0/6)0%   (0/1)
hideSoftInputFromWindow (IBinder, int, ResultReceiver): boolean 0%   (0/1)0%   (0/7)0%   (0/1)
isActive (View): boolean 0%   (0/1)0%   (0/5)0%   (0/1)
restartInput (View): void 0%   (0/1)0%   (0/5)0%   (0/2)
showSoftInput (View, int, ResultReceiver): void 0%   (0/1)0%   (0/8)0%   (0/2)
updateSelection (View, int, int, int, int): void 0%   (0/1)0%   (0/9)0%   (0/2)
InputMethodManagerWrapper (Context): void 100% (1/1)100% (6/6)100% (3/3)

1// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4 
5package org.chromium.content.browser.input;
6 
7import android.content.Context;
8import android.os.IBinder;
9import android.os.ResultReceiver;
10import android.view.View;
11import android.view.inputmethod.InputMethodManager;
12 
13/**
14 * Wrapper around Android's InputMethodManager
15 */
16public class InputMethodManagerWrapper {
17    private final Context mContext;
18 
19    public InputMethodManagerWrapper(Context context) {
20        mContext = context;
21    }
22 
23    private InputMethodManager getInputMethodManager() {
24        return (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
25    }
26 
27    /**
28     * @see android.view.inputmethod.InputMethodManager#restartInput(View)
29     */
30    public void restartInput(View view) {
31        getInputMethodManager().restartInput(view);
32    }
33 
34    /**
35     * @see android.view.inputmethod.InputMethodManager#showSoftInput(View, int, ResultReceiver)
36     */
37    public void showSoftInput(View view, int flags, ResultReceiver resultReceiver) {
38        getInputMethodManager().showSoftInput(view, flags, resultReceiver);
39    }
40 
41    /**
42     * @see android.view.inputmethod.InputMethodManager#isActive(View)
43     */
44    public boolean isActive(View view) {
45        return getInputMethodManager().isActive(view);
46    }
47 
48    /**
49     * @see InputMethodManager#hideSoftInputFromWindow(IBinder, int, ResultReceiver)
50     */
51    public boolean hideSoftInputFromWindow(IBinder windowToken, int flags,
52            ResultReceiver resultReceiver) {
53        return getInputMethodManager().hideSoftInputFromWindow(windowToken, flags, resultReceiver);
54    }
55 
56    /**
57     * @see android.view.inputmethod.InputMethodManager#updateSelection(View, int, int, int, int)
58     */
59    public void updateSelection(View view, int selStart, int selEnd,
60            int candidatesStart, int candidatesEnd) {
61        getInputMethodManager().updateSelection(view, selStart, selEnd, candidatesStart,
62                candidatesEnd);
63    }
64}

[all classes][org.chromium.content.browser.input]
EMMA 2.0.5312 (C) Vladimir Roubtsov