Search in sources :

Example 1 with PointerLocationView

use of com.android.internal.widget.PointerLocationView in project android_frameworks_base by ParanoidAndroid.

the class PhoneWindowManager method enablePointerLocation.

private void enablePointerLocation() {
    if (mPointerLocationView == null) {
        mPointerLocationView = new PointerLocationView(mContext);
        mPointerLocationView.setPrintCoords(false);
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
        lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
        lp.flags = WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
        if (ActivityManager.isHighEndGfx()) {
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED;
        }
        lp.format = PixelFormat.TRANSLUCENT;
        lp.setTitle("PointerLocation");
        WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
        wm.addView(mPointerLocationView, lp);
        mPointerLocationInputChannel = mWindowManagerFuncs.monitorInput("PointerLocationView");
        mPointerLocationInputEventReceiver = new PointerLocationInputEventReceiver(mPointerLocationInputChannel, Looper.myLooper(), mPointerLocationView);
    }
}
Also used : LayoutParams(android.view.WindowManager.LayoutParams) PointerLocationView(com.android.internal.widget.PointerLocationView) LayoutParams(android.view.WindowManager.LayoutParams) IWindowManager(android.view.IWindowManager) WindowManager(android.view.WindowManager)

Example 2 with PointerLocationView

use of com.android.internal.widget.PointerLocationView in project cornerstone by Onskreen.

the class PhoneWindowManager method enablePointerLocation.

private void enablePointerLocation() {
    if (mPointerLocationView == null) {
        mPointerLocationView = new PointerLocationView(mContext);
        mPointerLocationView.setPrintCoords(false);
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
        lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
        lp.flags = WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
        lp.format = PixelFormat.TRANSLUCENT;
        lp.setTitle("PointerLocation");
        WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
        wm.addView(mPointerLocationView, lp);
        mPointerLocationInputChannel = mWindowManagerFuncs.monitorInput("PointerLocationView");
        mPointerLocationInputEventReceiver = new PointerLocationInputEventReceiver(mPointerLocationInputChannel, Looper.myLooper(), mPointerLocationView);
    }
}
Also used : PointerLocationView(com.android.internal.widget.PointerLocationView) IWindowManager(android.view.IWindowManager) WindowManager(android.view.WindowManager)

Example 3 with PointerLocationView

use of com.android.internal.widget.PointerLocationView in project platform_frameworks_base by android.

the class PhoneWindowManager method enablePointerLocation.

private void enablePointerLocation() {
    if (mPointerLocationView == null) {
        mPointerLocationView = new PointerLocationView(mContext);
        mPointerLocationView.setPrintCoords(false);
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
        lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
        lp.flags = WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
        if (ActivityManager.isHighEndGfx()) {
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED;
        }
        lp.format = PixelFormat.TRANSLUCENT;
        lp.setTitle("PointerLocation");
        WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
        wm.addView(mPointerLocationView, lp);
        mWindowManagerFuncs.registerPointerEventListener(mPointerLocationView);
    }
}
Also used : LayoutParams(android.view.WindowManager.LayoutParams) PointerLocationView(com.android.internal.widget.PointerLocationView) LayoutParams(android.view.WindowManager.LayoutParams) IWindowManager(android.view.IWindowManager) WindowManager(android.view.WindowManager)

Example 4 with PointerLocationView

use of com.android.internal.widget.PointerLocationView in project android_frameworks_base by DirtyUnicorns.

the class PhoneWindowManager method enablePointerLocation.

private void enablePointerLocation() {
    if (mPointerLocationView == null) {
        mPointerLocationView = new PointerLocationView(mContext);
        mPointerLocationView.setPrintCoords(false);
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
        lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
        lp.flags = WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
        if (ActivityManager.isHighEndGfx()) {
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED;
        }
        lp.format = PixelFormat.TRANSLUCENT;
        lp.setTitle("PointerLocation");
        WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
        wm.addView(mPointerLocationView, lp);
        mWindowManagerFuncs.registerPointerEventListener(mPointerLocationView);
    }
}
Also used : LayoutParams(android.view.WindowManager.LayoutParams) PointerLocationView(com.android.internal.widget.PointerLocationView) LayoutParams(android.view.WindowManager.LayoutParams) IWindowManager(android.view.IWindowManager) WindowManager(android.view.WindowManager)

Example 5 with PointerLocationView

use of com.android.internal.widget.PointerLocationView in project android_frameworks_base by ResurrectionRemix.

the class PhoneWindowManager method enablePointerLocation.

private void enablePointerLocation() {
    if (mPointerLocationView == null) {
        mPointerLocationView = new PointerLocationView(mContext);
        mPointerLocationView.setPrintCoords(false);
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
        lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
        lp.flags = WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
        if (ActivityManager.isHighEndGfx()) {
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED;
        }
        lp.format = PixelFormat.TRANSLUCENT;
        lp.setTitle("PointerLocation");
        WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
        wm.addView(mPointerLocationView, lp);
        mWindowManagerFuncs.registerPointerEventListener(mPointerLocationView);
    }
}
Also used : LayoutParams(android.view.WindowManager.LayoutParams) PointerLocationView(com.android.internal.widget.PointerLocationView) LayoutParams(android.view.WindowManager.LayoutParams) IWindowManager(android.view.IWindowManager) WindowManager(android.view.WindowManager)

Aggregations

IWindowManager (android.view.IWindowManager)5 WindowManager (android.view.WindowManager)5 PointerLocationView (com.android.internal.widget.PointerLocationView)5 LayoutParams (android.view.WindowManager.LayoutParams)4