Java Code Examples for android.provider.Settings.Global#putInt()

The following examples show how to use android.provider.Settings.Global#putInt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BatterySaverStateMachine.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
protected void putGlobalSetting(String key, int value) {
    Global.putInt(mContext.getContentResolver(), key, value);
}
 
Example 2
Source File: HdmiControlService.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
void writeBooleanSetting(String key, boolean value) {
    ContentResolver cr = getContext().getContentResolver();
    Global.putInt(cr, key, toInt(value));
}
 
Example 3
Source File: ZenModeHelper.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
protected void setZenModeSetting(int zen) {
    Global.putInt(mContext.getContentResolver(), Global.ZEN_MODE, zen);
    showZenUpgradeNotification(zen);
}
 
Example 4
Source File: GlobalSetting.java    From Noyze with Apache License 2.0 4 votes vote down vote up
public void setValue(int value) {
    Global.putInt(mContext.getContentResolver(), mSettingName, value);
}
 
Example 5
Source File: GlobalSetting.java    From Noyze with Apache License 2.0 4 votes vote down vote up
public void setValue(int value) {
    Global.putInt(mContext.getContentResolver(), mSettingName, value);
}