mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2025-06-24 08:16:23 +00:00
Add param to disable push_on_receive mechanism
This commit is contained in:
parent
3b7351db79
commit
af171ce788
@ -9,6 +9,12 @@
|
||||
android:negativeButtonText="@null"
|
||||
android:positiveButtonText="@null"
|
||||
android:title="@string/pref_title_sync_frequency" />
|
||||
<CheckBoxPreference android:id="@+id/checkbox_push_on_receive"
|
||||
android:defaultValue="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:key="push_on_receive"
|
||||
android:title="@string/pref_push_on_receive" />
|
||||
<CheckBoxPreference android:id="@+id/checkbox_sync_wifi"
|
||||
android:defaultValue="true"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -43,6 +43,7 @@ public class GeneralSettingsActivity extends NrzSettingsActivity {
|
||||
_prefsRessourceFile = R.xml.pref_data_sync;
|
||||
|
||||
// Bind our boolean preferences
|
||||
_boolPrefs.add(new BindObjectPref("push_on_receive", DefaultPrefs.pushOnReceive));
|
||||
_boolPrefs.add(new BindObjectPref("sync_wifi", DefaultPrefs.syncWifi));
|
||||
_boolPrefs.add(new BindObjectPref("sync_4g", DefaultPrefs.sync4G));
|
||||
_boolPrefs.add(new BindObjectPref("sync_3g", DefaultPrefs.sync3G));
|
||||
@ -59,7 +60,8 @@ public class GeneralSettingsActivity extends NrzSettingsActivity {
|
||||
|
||||
protected static void handleCheckboxPreference(final String key, final Boolean value) {
|
||||
// Network types allowed for sync
|
||||
if(key.equals(new String("sync_wifi")) || key.equals("sync_2g") ||
|
||||
if(key.equals(new String("push_on_receive")) ||
|
||||
key.equals(new String("sync_wifi")) || key.equals("sync_2g") ||
|
||||
key.equals(new String("sync_3g")) || key.equals("sync_gprs") ||
|
||||
key.equals("sync_4g") || key.equals("sync_others")) {
|
||||
final OCSMSSharedPrefs prefs = new OCSMSSharedPrefs(_context);
|
||||
|
@ -2,6 +2,8 @@ package fr.unix_experience.owncloud_sms.defines;
|
||||
|
||||
public class DefaultPrefs {
|
||||
public final static Integer syncInterval = 15;
|
||||
public final static Boolean pushOnReceive = true;
|
||||
|
||||
public final static Boolean syncWifi = true;
|
||||
public final static Boolean sync2G = true;
|
||||
public final static Boolean syncGPRS = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user