I wanted to know if a process in Android belongs to an app which the user is actively controlling vs if it is a background service which runs without user interaction?
Since I'm talking about process, I'm currently trying to get the data from the List of processes in ActivityManagerService.java. The mLruProcesses contains list of ProcessRecords. So is the flag ProcessRecord.setIsForeground the right one to determine the behaviour of the process (i.e, Foreground vs background)? Or is there a different place to get this information.
Thanks