mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
add debug preference controlling new smsproto format
Don't use the message-combining feature for sends unless this is set. After a release the default value will switch to true.
This commit is contained in:
parent
a9769efe1c
commit
08c41ddd3e
5 changed files with 17 additions and 5 deletions
|
@ -452,11 +452,8 @@ public class SMSService extends XWService {
|
|||
|
||||
byte[] data = bas.toByteArray();
|
||||
|
||||
boolean forceNow = cmd == SMS_CMD.INVITE || cmd == SMS_CMD.DATA;
|
||||
// forceNow should always be true on first release since old code
|
||||
// can't do the combined-messages stuff. Let's assert so we change
|
||||
// when close to release.
|
||||
Assert.assertTrue( BuildConfig.DEBUG );
|
||||
boolean newSMSEnabled = XWPrefs.getSMSProtoEnabled( this );
|
||||
boolean forceNow = !newSMSEnabled; // || cmd == SMS_CMD.INVITE;
|
||||
resendFor( phone, data, forceNow );
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,11 @@ public class XWPrefs {
|
|||
return getPrefsBoolean( context, R.string.key_enable_sms_toself, false );
|
||||
}
|
||||
|
||||
public static boolean getSMSProtoEnabled( Context context )
|
||||
{
|
||||
return getPrefsBoolean( context, R.string.key_enable_smsproto, false );
|
||||
}
|
||||
|
||||
public static boolean getHideNewgameButtons( Context context )
|
||||
{
|
||||
return getPrefsBoolean( context, R.string.key_hide_newgames,
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
<string name="key_enable_dup_invite">key_enable_dup_invite</string>
|
||||
<string name="key_enable_nfc_toself">key_enable_nfc_toself</string>
|
||||
<string name="key_enable_sms_toself">key_enable_sms_toself</string>
|
||||
<string name="key_enable_smsproto">key_enable_smsproto</string>
|
||||
<string name="key_ignore_gcm">key_ignore_gcm</string>
|
||||
<string name="key_show_gcm">key_show_gcm</string>
|
||||
<string name="key_nag_intervals">key_nag_intervals</string>
|
||||
|
|
|
@ -2516,6 +2516,10 @@
|
|||
<string name="nag_intervals">Reminder intervals (minutes1,minutes2,...)</string>
|
||||
<string name="enable_nfc_toself_title">Enable NFC to self</string>
|
||||
<string name="enable_nfc_toself_summary">Fake invitation to aid debugging</string>
|
||||
|
||||
<string name="enable_smsproto_title">Use new/experimental SMS code</string>
|
||||
<string name="enable_smsproto_summary">(Requires that opponent be using it too)</string>
|
||||
|
||||
<string name="enable_sms_toself_title">Short-circuit SMS to self</string>
|
||||
<string name="enable_sms_toself_summary">Skip radio when phone numbers same</string>
|
||||
|
||||
|
|
|
@ -437,6 +437,11 @@
|
|||
<PreferenceScreen android:title="@string/pref_group_sms_title"
|
||||
android:summary="@string/pref_group_sms_summary"
|
||||
>
|
||||
<CheckBoxPreference android:key="@string/key_enable_smsproto"
|
||||
android:title="@string/enable_smsproto_title"
|
||||
android:summary="@string/enable_smsproto_summary"
|
||||
android:defaultValue="false"
|
||||
/>
|
||||
<CheckBoxPreference android:key="@string/key_enable_sms_toself"
|
||||
android:title="@string/enable_sms_toself_title"
|
||||
android:summary="@string/enable_sms_toself_summary"
|
||||
|
|
Loading…
Add table
Reference in a new issue