Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4ffa235 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Add JSR305 annotation to LeakGuardHandlerWrapper

Change-Id: I7456200af739db4510c5549b7bc894fb48749455
parent 95f100ba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ public class TextDecorator {
     */
    private static final class LayoutInvalidator {
        private final HandlerImpl mHandler;
        public LayoutInvalidator(final TextDecorator ownerInstance) {
        public LayoutInvalidator(@Nonnull final TextDecorator ownerInstance) {
            mHandler = new HandlerImpl(ownerInstance);
        }

@@ -311,7 +311,7 @@ public class TextDecorator {

        private static final class HandlerImpl
                extends LeakGuardHandlerWrapper<TextDecorator> {
            public HandlerImpl(final TextDecorator ownerInstance) {
            public HandlerImpl(@Nonnull final TextDecorator ownerInstance) {
                super(ownerInstance);
            }

+3 −1
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import com.android.inputmethod.keyboard.internal.DrawingHandler.Callbacks;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;

import javax.annotation.Nonnull;

// TODO: Separate this class into KeyPreviewHandler and BatchInputPreviewHandler or so.
public class DrawingHandler extends LeakGuardHandlerWrapper<Callbacks> {
    public interface Callbacks {
@@ -34,7 +36,7 @@ public class DrawingHandler extends LeakGuardHandlerWrapper<Callbacks> {
    private static final int MSG_DISMISS_KEY_PREVIEW = 0;
    private static final int MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1;

    public DrawingHandler(final Callbacks ownerInstance) {
    public DrawingHandler(@Nonnull final Callbacks ownerInstance) {
        super(ownerInstance);
    }

+3 −1
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import com.android.inputmethod.keyboard.internal.TimerHandler.Callbacks;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;

import javax.annotation.Nonnull;

// TODO: Separate this class into KeyTimerHandler and BatchInputTimerHandler or so.
public final class TimerHandler extends LeakGuardHandlerWrapper<Callbacks> implements TimerProxy {
    public interface Callbacks {
@@ -45,7 +47,7 @@ public final class TimerHandler extends LeakGuardHandlerWrapper<Callbacks> imple
    private final int mIgnoreAltCodeKeyTimeout;
    private final int mGestureRecognitionUpdateTime;

    public TimerHandler(final Callbacks ownerInstance, final int ignoreAltCodeKeyTimeout,
    public TimerHandler(@Nonnull final Callbacks ownerInstance, final int ignoreAltCodeKeyTimeout,
            final int gestureRecognitionUpdateTime) {
        super(ownerInstance);
        mIgnoreAltCodeKeyTimeout = ignoreAltCodeKeyTimeout;
+3 −1
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;

import javax.annotation.Nonnull;

/**
 * Input method implementation for Qwerty'ish keyboard.
 */
@@ -208,7 +210,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
        private int mDelayInMillisecondsToUpdateSuggestions;
        private int mDelayInMillisecondsToUpdateShiftState;

        public UIHandler(final LatinIME ownerInstance) {
        public UIHandler(@Nonnull final LatinIME ownerInstance) {
            super(ownerInstance);
        }

+3 −1
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ import com.android.inputmethod.latin.utils.UncachedInputMethodManagerUtils;

import java.util.ArrayList;

import javax.annotation.Nonnull;

// TODO: Use Fragment to implement welcome screen and setup steps.
public final class SetupWizardActivity extends Activity implements View.OnClickListener {
    static final String TAG = SetupWizardActivity.class.getSimpleName();
@@ -82,7 +84,7 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL

        private final InputMethodManager mImmInHandler;

        public SettingsPoolingHandler(final SetupWizardActivity ownerInstance,
        public SettingsPoolingHandler(@Nonnull final SetupWizardActivity ownerInstance,
                final InputMethodManager imm) {
            super(ownerInstance);
            mImmInHandler = imm;
Loading