I have implemented a custom screen lock activity in my android application which lock the screen after certain time and need a pincode to unlock it back and use the App. I am getting a problem when screen is locked and an incoming phone call received as this lock screen still on top of incoming call activity and if i unlock screen by given pin code my custom App is showing instead of default incoming phone call popup. Here is layoutParameters which i am using in my lock screen activity to bring in front of everything when it start.
private static final WindowManager.LayoutParams LAYOUT_PARAMS = new WindowManager.LayoutParams(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.TYPE_SYSTEM_ERROR,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN //draw on status bar
| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION,// hiding the home screen button
PixelFormat.TRANSLUCENT);
Is it possible that i can bring a default phone call activity on top of my app when screen is locked OR at least bring this in front when i unlock screen by given pincode ?