I need to display my view on top of dialer application, so I was using TYPE_PHONE for this purpose which is touchable, but still on some devices like Nexus 5 dialer applicat
After lot of searching for above problem, I found solution my self. Here it is how I made view to be on top of everything inside device and also making it touchable which was not possible with TYPE_SYSTEM_OVERLAY.
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_SYSTEM_ERROR,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSPARENT);
params.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
wm.addView(view, params);