android.view.InputEvent Java Examples

The following examples show how to use android.view.InputEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PointerEventDispatcherHook.java    From XposedNavigationBar with GNU General Public License v3.0 6 votes vote down vote up
public static void hook(ClassLoader loader) {
    final Class<?> CLASS_POINTER_EVENT_DISPATCHER = XposedHelpers.findClass(POINTER_EVENT_DISPATCHER_PATH, loader);
    XposedHelpers.findAndHookMethod(CLASS_POINTER_EVENT_DISPATCHER, "onInputEvent", InputEvent.class, new XC_MethodHook() {
        @Override
        protected void afterHookedMethod(MethodHookParam param) throws Throwable {
            super.afterHookedMethod(param);
            try {
                if (param.args[0] instanceof MotionEvent) {
                    MotionEvent event = (MotionEvent) param.args[0];
                    //XpLog.i("input x "+event.getX());
                    //XpLog.i("input y "+event.getY());
                    if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
                        PhoneWindowManagerHook.gesturesListener.onPointerEvent(event);
                    }
                }
            } catch (Exception e) {
                XpLog.e(e);
            }
        }
    });
}
 
Example #2
Source File: PointerEventDispatcher.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public void onInputEvent(InputEvent event, int displayId) {
    try {
        if (event instanceof MotionEvent
                && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
            final MotionEvent motionEvent = (MotionEvent) event;
            PointerEventListener[] listeners;
            synchronized (mListeners) {
                if (mListenersArray == null) {
                    mListenersArray = new PointerEventListener[mListeners.size()];
                    mListeners.toArray(mListenersArray);
                }
                listeners = mListenersArray;
            }
            for (int i = 0; i < listeners.length; ++i) {
                listeners[i].onPointerEvent(motionEvent, displayId);
            }
        }
    } finally {
        finishInputEvent(event, false);
    }
}
 
Example #3
Source File: PlaybackOverlayFragment.java    From adt-leanback-support with Apache License 2.0 6 votes vote down vote up
private boolean onInterceptInputEvent(InputEvent event) {
    if (DEBUG) Log.v(TAG, "onInterceptInputEvent status " + mFadingStatus + " event " + event);
    boolean consumeEvent = (mFadingStatus == IDLE && mBgAlpha == 0);
    if (event instanceof KeyEvent) {
        if (consumeEvent) {
            consumeEvent = isConsumableKey((KeyEvent) event);
        }
        int keyCode = ((KeyEvent) event).getKeyCode();
        // Back key typically means we're leaving the fragment
        if (keyCode != KeyEvent.KEYCODE_BACK) {
            tickle();
        }
    } else {
        tickle();
    }
    return consumeEvent;
}
 
Example #4
Source File: VolumeKeyNative.java    From Torchie-Android with GNU General Public License v2.0 6 votes vote down vote up
@Override
public boolean setEvent(InputEvent event) {
    VolumeKeyEvent volumeKeyEvent = (VolumeKeyEvent) event;
    if (volumeKeyEvent.getVolumeKeyEventType() == VolumeKeyEvent.VOLUME_KEY_EVENT_NATIVE && volumeKeyEvent.isVolumeKeyEvent()) {
        if (volumeKeyEvent.getAction() == KeyEvent.ACTION_DOWN) {
            if (volumeKeyEvent.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN) {
                volumeDownPressed = true;
            } else if (volumeKeyEvent.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP) {
                volumeUpPressed = true;
            }
        } else if (volumeKeyEvent.getAction() == KeyEvent.ACTION_UP) {
            if (volumeKeyEvent.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN) {
                volumeDownPressed = false;
            } else if (volumeKeyEvent.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP) {
                volumeUpPressed = false;
            }
        }
        return this.isActionModePerformed();
    }
    return false;
}
 
Example #5
Source File: PlaybackOverlaySupportFragment.java    From adt-leanback-support with Apache License 2.0 6 votes vote down vote up
private boolean onInterceptInputEvent(InputEvent event) {
    if (DEBUG) Log.v(TAG, "onInterceptInputEvent status " + mFadingStatus + " event " + event);
    boolean consumeEvent = (mFadingStatus == IDLE && mBgAlpha == 0);
    if (event instanceof KeyEvent) {
        if (consumeEvent) {
            consumeEvent = isConsumableKey((KeyEvent) event);
        }
        int keyCode = ((KeyEvent) event).getKeyCode();
        // Back key typically means we're leaving the fragment
        if (keyCode != KeyEvent.KEYCODE_BACK) {
            tickle();
        }
    } else {
        tickle();
    }
    return consumeEvent;
}
 
Example #6
Source File: UiAutomation.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
/**
 * A method for injecting an arbitrary input event.
 * <p>
 * <strong>Note:</strong> It is caller's responsibility to recycle the event.
 * </p>
 * @param event The event to inject.
 * @param sync Whether to inject the event synchronously.
 * @return Whether event injection succeeded.
 */
public boolean injectInputEvent(InputEvent event, boolean sync) {
    synchronized (mLock) {
        throwIfNotConnectedLocked();
    }
    try {
        if (DEBUG) {
            Log.i(LOG_TAG, "Injecting: " + event + " sync: " + sync);
        }
        // Calling out without a lock held.
        return mUiAutomationConnection.injectInputEvent(event, sync);
    } catch (RemoteException re) {
        Log.e(LOG_TAG, "Error while injecting input event!", re);
    }
    return false;
}
 
Example #7
Source File: UiAutomationConnection.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public boolean injectInputEvent(InputEvent event, boolean sync) {
    synchronized (mLock) {
        throwIfCalledByNotTrustedUidLocked();
        throwIfShutdownLocked();
        throwIfNotConnectedLocked();
    }
    final int mode = (sync) ? InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH
            : InputManager.INJECT_INPUT_EVENT_MODE_ASYNC;
    final long identity = Binder.clearCallingIdentity();
    try {
        return InputManager.getInstance().injectInputEvent(event, mode);
    } finally {
        Binder.restoreCallingIdentity(identity);
    }
}
 
Example #8
Source File: InputMethodManager.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
int sendInputEventOnMainLooperLocked(PendingEvent p) {
    if (mCurChannel != null) {
        if (mCurSender == null) {
            mCurSender = new ImeInputEventSender(mCurChannel, mH.getLooper());
        }

        final InputEvent event = p.mEvent;
        final int seq = event.getSequenceNumber();
        if (mCurSender.sendInputEvent(seq, event)) {
            mPendingEvents.put(seq, p);
            Trace.traceCounter(Trace.TRACE_TAG_INPUT, PENDING_EVENT_COUNTER,
                    mPendingEvents.size());

            Message msg = mH.obtainMessage(MSG_TIMEOUT_INPUT_EVENT, seq, 0, p);
            msg.setAsynchronous(true);
            mH.sendMessageDelayed(msg, INPUT_METHOD_NOT_RESPONDING_TIMEOUT);
            return DISPATCH_IN_PROGRESS;
        }

        Log.w(TAG, "Unable to send input event to IME: "
                + mCurId + " dropping: " + event);
    }
    return DISPATCH_NOT_HANDLED;
}
 
Example #9
Source File: IInputMethodSessionWrapper.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public void onInputEvent(InputEvent event, int displayId) {
    if (mInputMethodSession == null) {
        // The session has been finished.
        finishInputEvent(event, false);
        return;
    }

    final int seq = event.getSequenceNumber();
    mPendingEvents.put(seq, event);
    if (event instanceof KeyEvent) {
        KeyEvent keyEvent = (KeyEvent)event;
        mInputMethodSession.dispatchKeyEvent(seq, keyEvent, this);
    } else {
        MotionEvent motionEvent = (MotionEvent)event;
        if (motionEvent.isFromSource(InputDevice.SOURCE_CLASS_TRACKBALL)) {
            mInputMethodSession.dispatchTrackballEvent(seq, motionEvent, this);
        } else {
            mInputMethodSession.dispatchGenericMotionEvent(seq, motionEvent, this);
        }
    }
}
 
Example #10
Source File: InteractionController.java    From appium-uiautomator2-server with Apache License 2.0 5 votes vote down vote up
public boolean injectEventSync(final InputEvent event, boolean shouldRegister) throws UiAutomator2Exception {
    if (!shouldRegister) {
        return (Boolean) invoke(method(CLASS_INTERACTION_CONTROLLER,
                METHOD_INJECT_EVENT_SYNC, InputEvent.class), interactionController, event);
    }
    return EventRegister.runAndRegisterScrollEvents(new ReturningRunnable<Boolean>() {
        @Override
        public void run() {
            Boolean result = (Boolean) invoke(method(CLASS_INTERACTION_CONTROLLER,
                    METHOD_INJECT_EVENT_SYNC, InputEvent.class), interactionController, event);
            setResult(result);
        }
    });
}
 
Example #11
Source File: HJInput.java    From HJMirror with MIT License 5 votes vote down vote up
@SuppressLint("PrivateApi")
public HJInput() {
    try {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            mInputManager = (InputManager) InputManager.class.getDeclaredMethod("getInstance").invoke(null);
            mInjectInputEventMethod = InputManager.class.getMethod("injectInputEvent", InputEvent.class, Integer.TYPE);
        }
    } catch (Exception e) {
        HJLog.e(e);
    }
}
 
Example #12
Source File: SampleManager.java    From FunnyDraw with Apache License 2.0 5 votes vote down vote up
private MotionInjector() throws MotionDrawException {
    try {
        mInputManager = (InputManager)
                InputManager.class.getDeclaredMethod("getInstance").invoke(null);
        mInjectInputEvent =
                InputManager.class.getDeclaredMethod("injectInputEvent",
                        InputEvent.class, Integer.TYPE);
        mInjectInputEvent.setAccessible(true);
    } catch (Exception e) {
        throw new MotionDrawException(e.getMessage());
    }
}
 
Example #13
Source File: VolumeKeyRocker.java    From Torchie-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean setEvent(InputEvent event) {
    VolumeKeyEvent volumeKeyEvent = (VolumeKeyEvent) event;
    if (volumeKeyEvent.getVolumeKeyEventType() == VolumeKeyEvent.VOLUME_KEY_EVENT_ROCKER && volumeKeyEvent.isVolumeKeyEvent()) {
        buffer[current_ptr] = volumeKeyEvent.getCurrentValue();
        current_ptr++;
        if (current_ptr == MAX_BUFFER_SIZE) {
            current_ptr = 0;
        }
        return this.isActionModePerformed();
    }
    return false;
}
 
Example #14
Source File: WallpaperService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void onInputEvent(InputEvent event, int displayId) {
    boolean handled = false;
    try {
        if (event instanceof MotionEvent
                && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
            MotionEvent dup = MotionEvent.obtainNoHistory((MotionEvent)event);
            dispatchPointer(dup);
            handled = true;
        }
    } finally {
        finishInputEvent(event, handled);
    }
}
 
Example #15
Source File: ActivityView.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private boolean injectInputEvent(InputEvent event) {
    if (mInputForwarder != null) {
        try {
            return mInputForwarder.forwardEvent(event);
        } catch (RemoteException e) {
            e.rethrowAsRuntimeException();
        }
    }
    return false;
}
 
Example #16
Source File: IInputMethodSessionWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void finishedEvent(int seq, boolean handled) {
    int index = mPendingEvents.indexOfKey(seq);
    if (index >= 0) {
        InputEvent event = mPendingEvents.valueAt(index);
        mPendingEvents.removeAt(index);
        finishInputEvent(event, handled);
    }
}
 
Example #17
Source File: InputMethodManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private PendingEvent obtainPendingEventLocked(InputEvent event, Object token,
        String inputMethodId, FinishedInputEventCallback callback, Handler handler) {
    PendingEvent p = mPendingEventPool.acquire();
    if (p == null) {
        p = new PendingEvent();
    }
    p.mEvent = event;
    p.mToken = token;
    p.mInputMethodId = inputMethodId;
    p.mCallback = callback;
    p.mHandler = handler;
    return p;
}
 
Example #18
Source File: InputMethodManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
/**
 * Dispatches an input event to the IME.
 *
 * Returns {@link #DISPATCH_HANDLED} if the event was handled.
 * Returns {@link #DISPATCH_NOT_HANDLED} if the event was not handled.
 * Returns {@link #DISPATCH_IN_PROGRESS} if the event is in progress and the
 * callback will be invoked later.
 *
 * @hide
 */
public int dispatchInputEvent(InputEvent event, Object token,
        FinishedInputEventCallback callback, Handler handler) {
    synchronized (mH) {
        if (mCurMethod != null) {
            if (event instanceof KeyEvent) {
                KeyEvent keyEvent = (KeyEvent)event;
                if (keyEvent.getAction() == KeyEvent.ACTION_DOWN
                        && keyEvent.getKeyCode() == KeyEvent.KEYCODE_SYM
                        && keyEvent.getRepeatCount() == 0) {
                    showInputMethodPickerLocked();
                    return DISPATCH_HANDLED;
                }
            }

            if (DEBUG) Log.v(TAG, "DISPATCH INPUT EVENT: " + mCurMethod);

            PendingEvent p = obtainPendingEventLocked(
                    event, token, mCurId, callback, handler);
            if (mMainLooper.isCurrentThread()) {
                // Already running on the IMM thread so we can send the event immediately.
                return sendInputEventOnMainLooperLocked(p);
            }

            // Post the event to the IMM thread.
            Message msg = mH.obtainMessage(MSG_SEND_INPUT_EVENT, p);
            msg.setAsynchronous(true);
            mH.sendMessage(msg);
            return DISPATCH_IN_PROGRESS;
        }
    }
    return DISPATCH_NOT_HANDLED;
}
 
Example #19
Source File: InputManagerService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void sendInputEvent(InputEvent event, int policyFlags) {
    if (event == null) {
        throw new IllegalArgumentException("event must not be null");
    }

    synchronized (mInputFilterLock) {
        if (!mDisconnected) {
            nativeInjectInputEvent(mPtr, event, Display.DEFAULT_DISPLAY, 0, 0,
                    InputManager.INJECT_INPUT_EVENT_MODE_ASYNC, 0,
                    policyFlags | WindowManagerPolicy.FLAG_FILTERED);
        }
    }
}
 
Example #20
Source File: InputManagerService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
final boolean filterInputEvent(InputEvent event, int policyFlags) {
    synchronized (mInputFilterLock) {
        if (mInputFilter != null) {
            try {
                mInputFilter.filterInputEvent(event, policyFlags);
            } catch (RemoteException e) {
                /* ignore */
            }
            return false;
        }
    }
    event.recycle();
    return true;
}
 
Example #21
Source File: InputManagerService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private boolean injectInputEventInternal(InputEvent event, int displayId, int mode) {
    if (event == null) {
        throw new IllegalArgumentException("event must not be null");
    }
    if (mode != InputManager.INJECT_INPUT_EVENT_MODE_ASYNC
            && mode != InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH
            && mode != InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT) {
        throw new IllegalArgumentException("mode is invalid");
    }

    final int pid = Binder.getCallingPid();
    final int uid = Binder.getCallingUid();
    final long ident = Binder.clearCallingIdentity();
    final int result;
    try {
        result = nativeInjectInputEvent(mPtr, event, displayId, pid, uid, mode,
                INJECTION_TIMEOUT_MILLIS, WindowManagerPolicy.FLAG_DISABLE_KEY_REPEAT);
    } finally {
        Binder.restoreCallingIdentity(ident);
    }
    switch (result) {
        case INPUT_EVENT_INJECTION_PERMISSION_DENIED:
            Slog.w(TAG, "Input event injection from pid " + pid + " permission denied.");
            throw new SecurityException(
                    "Injecting to another application requires INJECT_EVENTS permission");
        case INPUT_EVENT_INJECTION_SUCCEEDED:
            return true;
        case INPUT_EVENT_INJECTION_TIMED_OUT:
            Slog.w(TAG, "Input event injection from pid " + pid + " timed out.");
            return false;
        case INPUT_EVENT_INJECTION_FAILED:
        default:
            Slog.w(TAG, "Input event injection from pid " + pid + " failed.");
            return false;
    }
}
 
Example #22
Source File: GameControllerInput.java    From codeexamples-android with Eclipse Public License 1.0 5 votes vote down vote up
private InputDeviceState getInputDeviceState(InputEvent event) {
    final int deviceId = event.getDeviceId();
    InputDeviceState state = mInputDeviceStates.get(deviceId);
    if (state == null) {
        final InputDevice device = event.getDevice();
        if (device == null) {
            return null;
        }
        state = new InputDeviceState(device);
        mInputDeviceStates.put(deviceId, state);

        Log.i(TAG, device.toString());
    }
    return state;
}
 
Example #23
Source File: Dpad.java    From Alite with GNU General Public License v3.0 4 votes vote down vote up
public int getDirectionPressed(InputEvent event) {
	if (!isDpadDevice(event)) {
		return -1;
	}
	directionPressed = NONE;
	
	// If the input event is a MotionEvent, check its hat axis values.
	if (event instanceof MotionEvent) {

		// Use the hat axis value to find the D-pad direction
		MotionEvent motionEvent = (MotionEvent) event;
		float xaxis = motionEvent.getAxisValue(MotionEvent.AXIS_HAT_X);
		float yaxis = motionEvent.getAxisValue(MotionEvent.AXIS_HAT_Y);
		boolean nox = false;
		boolean noy = false;
		
		// Check if the AXIS_HAT_X value is -1 or 1, and set the D-pad
		// LEFT and RIGHT direction accordingly.
		if (Float.compare(xaxis, -1.0f) == 0) {
			directionPressed = Dpad.LEFT;
		} else if (Float.compare(xaxis, 1.0f) == 0) {
			directionPressed = Dpad.RIGHT;
		} else if (Float.compare(xaxis, 0.0f) == 0) {
			nox = true;  
		}
		// Check if the AXIS_HAT_Y value is -1 or 1, and set the D-pad
		// UP and DOWN direction accordingly.
		else if (Float.compare(yaxis, -1.0f) == 0) {
			directionPressed = Dpad.UP;
		} else if (Float.compare(yaxis, 1.0f) == 0) {
			directionPressed = Dpad.DOWN;
		} else if (Float.compare(yaxis, 0.0f) == 0) {
			noy = true;
		}			
		
		if (nox && noy) {
			directionPressed = Dpad.NONE;
		}
	}

	// If the input event is a KeyEvent, check its key code.
	else if (event instanceof KeyEvent) {
		// Use the key code to find the D-pad direction.
		KeyEvent keyEvent = (KeyEvent) event;
		if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DPAD_LEFT) {
			directionPressed = Dpad.LEFT;
		} else if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DPAD_RIGHT) {
			directionPressed = Dpad.RIGHT;
		} else if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DPAD_UP) {
			directionPressed = Dpad.UP;
		} else if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DPAD_DOWN) {
			directionPressed = Dpad.DOWN;
		} else if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DPAD_CENTER) {
			directionPressed = Dpad.CENTER;
		}
	}
	return directionPressed;
}
 
Example #24
Source File: Dpad.java    From Alite with GNU General Public License v3.0 4 votes vote down vote up
public static boolean isDpadDevice(InputEvent event) {
	// Check that input comes from a device with directional pads.
	return (event.getSource() & InputDevice.SOURCE_DPAD) != InputDevice.SOURCE_DPAD;
}
 
Example #25
Source File: GamepadList.java    From 365browser with Apache License 2.0 4 votes vote down vote up
private GamepadDevice getGamepadForEvent(InputEvent event) {
    return getDeviceById(event.getDeviceId());
}
 
Example #26
Source File: InteractionController.java    From android-uiautomator-server with MIT License 4 votes vote down vote up
public boolean injectEventSync(InputEvent event) throws UiAutomator2Exception {
    return (Boolean) ReflectionUtils.invoke(ReflectionUtils.method(CLASS_INTERACTION_CONTROLLER, METHOD_INJECT_EVENT_SYNC, InputEvent.class), interactionController, event);
}
 
Example #27
Source File: InputDevice.java    From Torchie-Android with GNU General Public License v2.0 4 votes vote down vote up
public final boolean setInputEvent(InputEvent event) {
    if (this.isEnabled) {
        return this.setEvent(event);
    }
    return false;
}
 
Example #28
Source File: MyInteractionController.java    From PUMA with Apache License 2.0 4 votes vote down vote up
private boolean injectEventSync(InputEvent event) {
	return mUiAutomatorBridge.injectInputEvent(event, true);
}
 
Example #29
Source File: InjectionManager.java    From android-inputinjector with GNU General Public License v2.0 4 votes vote down vote up
public InjectionManager(Context c)
{
	if(Integer.valueOf(android.os.Build.VERSION.SDK_INT) < android.os.Build.VERSION_CODES.JELLY_BEAN)
	{
		mWmbinder = ServiceManager.getService( INTERNAL_SERVICE_PRE_JELLY );
		mWinMan = IWindowManager.Stub.asInterface( mWmbinder );
		
		printDeclaredMethods(mWinMan.getClass());
		
		//TODO: Implement full injection support for pre Jelly Bean solutions
	}
	else
	{
		mInputManager = c.getSystemService(Context.INPUT_SERVICE);
		
		try
		{
			//printDeclaredMethods(mInputManager.getClass());
			
			//Unveil hidden methods
			mInjectEventMethod = mInputManager.getClass().getDeclaredMethod("injectInputEvent", new Class[] { InputEvent.class, Integer.TYPE });
			mInjectEventMethod.setAccessible(true);
			Field eventAsync = mInputManager.getClass().getDeclaredField("INJECT_INPUT_EVENT_MODE_ASYNC");
			Field eventResult = mInputManager.getClass().getDeclaredField("INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT");
			Field eventFinish = mInputManager.getClass().getDeclaredField("INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH");
			eventAsync.setAccessible(true);
			eventResult.setAccessible(true);
			eventFinish.setAccessible(true);
			INJECT_INPUT_EVENT_MODE_ASYNC = eventAsync.getInt(mInputManager.getClass());
			INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT = eventResult.getInt(mInputManager.getClass());
			INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH = eventFinish.getInt(mInputManager.getClass());
		}
		catch (NoSuchMethodException nsme)
		{
			Log.e(TAG,  "Critical methods not available");
		}
		catch (NoSuchFieldException nsfe)
		{
			Log.e(TAG,  "Critical fields not available");
		}
		catch (IllegalAccessException iae)
		{
			Log.e(TAG,  "Critical fields not accessable");
		}
	}
}
 
Example #30
Source File: ProximitySensor.java    From Torchie-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected boolean setEvent(InputEvent event) {
    return false;
}