The boolean objects...
System.getDeviceSettings().tonesOn
System.getDeviceSettings().vibrateOn
...may return a wrong state for widgets, apps etc. - for instance the sound has been set for 'activities only' but the 'tonesOn' returns true also in widgets with no activity active.
I would like to get a correct state for the actual situation or an integer value showing the precise configuration setting.