Skip to content

Instantly share code, notes, and snippets.

@wasnot
Created October 23, 2015 11:03
Show Gist options
  • Save wasnot/3d09a9d340f7f164031e to your computer and use it in GitHub Desktop.
Save wasnot/3d09a9d340f7f164031e to your computer and use it in GitHub Desktop.
[Android][Lollipop]マナーモード設定を取得する ref: http://qiita.com/wasnot/items/1aafb5a9d6598b7f6a67
int mode = Settings.Global.getInt(getContext().getContentResolver(),
"zen_mode");
boolean result = Settings.Global.putInt(getContext().getContentResolver(),
"zen_mode", (Integer) value);
/**
* 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