Merge "Added an app id security check in isAppForeground."