Use ApplicationInfo to track the notLaunched flag
Use it instead of relying on PackageManager calls because the
PackageManager state gets updated before the ProcessRecord is
created, causing a difference between the ApplicationInfo and
package state.
This fixes the problem with force-stopped state being incorrect
when correlating FLAG_STOPPED and notLaunched state.
Bug: 362516211
Bug: 362198191
Bug: 353651949
Test: atest CtsAppTestCases:ForceStopTest
Flag: android.app.use_app_info_not_launched
Change-Id: I4d0138071a15a07ae41aaa1779919799da998ede
8 files changed