GlobalSettingpublic abstract class GlobalSetting extends android.database.ContentObserver implements com.android.systemui.statusbar.policy.ListenableHelper for managing a global setting. |
Fields Summary |
---|
private final android.content.Context | mContext | private final String | mSettingName |
Methods Summary |
---|
public int | getValue()
return Global.getInt(mContext.getContentResolver(), mSettingName, 0);
| protected abstract void | handleValueChanged(int value)
| public void | onChange(boolean selfChange)
handleValueChanged(getValue());
| public void | setListening(boolean listening)
if (listening) {
mContext.getContentResolver().registerContentObserver(
Global.getUriFor(mSettingName), false, this);
} else {
mContext.getContentResolver().unregisterContentObserver(this);
}
| public void | setValue(int value)
Global.putInt(mContext.getContentResolver(), mSettingName, value);
|
|