Back to project page sms-smap-gateway.
The source code is released under:
GNU General Public License
If you think the Android project sms-smap-gateway listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android.smap.utils; /* ww w.j a v a2 s . c o m*/ import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.android.smap.GatewayApp; /** * Preference wrapper for convenience methods dealing with android's shared * preferences. * * @author Matt Witherow * */ public class PreferenceWrapper { // AlarmListener private static final String UPDATE_INTERVAL = PreferenceWrapper.class .getCanonicalName() + "update_interval"; public static final String DEFAULT_INTERVAL = String.valueOf(30 * 1000); private GatewayApp mApp; private SharedPreferences mPrefs; public PreferenceWrapper(GatewayApp gatewayApp) { mApp = gatewayApp; mPrefs = PreferenceManager.getDefaultSharedPreferences(mApp); } public boolean isAutoRefreshEnabled() { return true; } public long getUpdateInterval() { return Long.parseLong(mPrefs.getString(UPDATE_INTERVAL, DEFAULT_INTERVAL)); } }