Created
October 23, 2015 11:03
-
-
Save wasnot/3d09a9d340f7f164031e to your computer and use it in GitHub Desktop.
[Android][Lollipop]マナーモード設定を取得する ref: http://qiita.com/wasnot/items/1aafb5a9d6598b7f6a67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int mode = Settings.Global.getInt(getContext().getContentResolver(), | |
"zen_mode"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean result = Settings.Global.putInt(getContext().getContentResolver(), | |
"zen_mode", (Integer) value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Opaque value, changes when persisted zen mode configuration changes. | |
* | |
* @hide | |
*/ | |
public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment