I encountered a problem,
- MyActivity is under the LockScreen, in this case, I need to launch MyActivity from framework by clicking volume button;
- MyActivity is on the top of Lockscreen, in this case, I do nothing.
But I don't know how to distinguish this two situations in framework. I know how to get the top activity, however, LockScreen isn't a activity.
I have a temporary solution, if MyActivity has LayoutParams.FLAG_SHOW_WHEN_LOCKED
property, set a custom system property, so I know whether launch MyActivity by this custom system property, but I don't think this is good.
I want to know whether there is a better solution.