Merge "refactor isAllowedBySettingsLocked()"