Check rule package name in ZenModeHelper.addAutomaticRule
instead of checking that of the configuration activity, which is potentially spoofable. The package name is verified to be the same app as the caller by NMS.
This change removes isSystemRule (called only once) in favor of checking the provided package name directly.
Test: ZenModeHelperTest, manual by verifying via provided exploit apk
(cherry picked from commit a826f9bd15d149305814a835fb5d1a3921a085f5)
2 files changed