Browse Source

Merge branch 'archie94-remove_sms_support'

n8fr8 7 months ago
parent
commit
5246096f18

+ 0 - 1
src/main/AndroidManifest.xml

@@ -7,7 +7,6 @@
7 7
     <uses-permission android:name="android.permission.CAMERA" />
8 8
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
9 9
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
10
-    <uses-permission android:name="android.permission.SEND_SMS" />
11 10
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
12 11
 
13 12
     <uses-feature

+ 1 - 10
src/main/java/org/havenapp/main/ListActivity.java

@@ -368,17 +368,8 @@ public class ListActivity extends AppCompatActivity {
368 368
         if (!TextUtils.isEmpty(preferences.getSignalUsername())) {
369 369
             SignalSender sender = SignalSender.getInstance(this, preferences.getSignalUsername().trim());
370 370
             ArrayList<String> recip = new ArrayList<>();
371
-            recip.add(preferences.getSmsNumber());
371
+            recip.add(preferences.getRemotePhoneNumber());
372 372
             sender.sendMessage(recip, resourceManager.getString(R.string.signal_test_message), null);
373 373
         }
374
-        else if (!TextUtils.isEmpty(preferences.getSmsNumber())) {
375
-
376
-            SmsManager manager = SmsManager.getDefault();
377
-
378
-            StringTokenizer st = new StringTokenizer(preferences.getSmsNumber(),",");
379
-            while (st.hasMoreTokens())
380
-                manager.sendTextMessage(st.nextToken(), null, resourceManager.getString(R.string.signal_test_message), null, null);
381
-
382
-        }
383 374
     }
384 375
 }

+ 23 - 17
src/main/java/org/havenapp/main/PreferenceManager.java

@@ -22,12 +22,17 @@ package org.havenapp.main;
22 22
 import android.content.Context;
23 23
 import android.content.SharedPreferences;
24 24
 import android.content.SharedPreferences.Editor;
25
+import android.text.TextUtils;
25 26
 
26 27
 import org.havenapp.main.sensors.motion.LuminanceMotionDetector;
27 28
 
28 29
 import java.io.File;
29 30
 import java.util.Date;
31
+import java.util.Objects;
30 32
 
33
+import javax.annotation.Nullable;
34
+
35
+import androidx.annotation.NonNull;
31 36
 import androidx.appcompat.app.AppCompatActivity;
32 37
 
33 38
 
@@ -62,12 +67,9 @@ public class PreferenceManager {
62 67
     private static final String MICROPHONE_SENSITIVITY="microphone_sensitivity";
63 68
     public static final String CONFIG_SOUND = "config_sound";
64 69
     public static final String CONFIG_TIME_DELAY = "config_delay_time";
65
-    public static final String SMS_ACTIVE = "sms_active";
66
-    public static final String SMS_NUMBER = "sms_number";
67 70
     public static final String REGISTER_SIGNAL = "register_signal";
68 71
     public static final String VERIFY_SIGNAL = "verify_signal";
69 72
     public static final String VOICE_VERIFY_SIGNAL = "voice_verify_signal";
70
-    public static final String SEND_SMS = "send_sms";
71 73
     private static final String UNLOCK_CODE="unlock_code";
72 74
 	
73 75
     private static final String ACCESS_TOKEN="access_token";
@@ -96,6 +98,10 @@ public class PreferenceManager {
96 98
     public static final String CONFIG_BASE_STORAGE = "config_base_storage";
97 99
     private static final String CONFIG_BASE_STORAGE_DEFAULT = "/haven";
98 100
 
101
+    // keeping the key value same for data migration.
102
+    static final String REMOTE_PHONE_NUMBER = "sms_number";
103
+    static final String REMOTE_NOTIFICATION_ACTIVE = "remote_notification_active";
104
+
99 105
     private Context context;
100 106
 	
101 107
     public PreferenceManager(Context context) {
@@ -242,24 +248,24 @@ public class PreferenceManager {
242 248
     public String getMicrophoneSensitivity() {
243 249
     	return appSharedPrefs.getString(MICROPHONE_SENSITIVITY, MEDIUM);
244 250
     }
245
-    
246
-    public void activateSms(boolean active) {
247
-    	prefsEditor.putBoolean(SMS_ACTIVE, active);
248
-    	prefsEditor.commit();
251
+
252
+    public void setRemoteNotificationActive(boolean isRemoteNotificationActive) {
253
+        prefsEditor.putBoolean(REMOTE_NOTIFICATION_ACTIVE, isRemoteNotificationActive);
254
+        prefsEditor.apply();
249 255
     }
250
-    
251
-    public boolean getSmsActivation() {
252
-    	return appSharedPrefs.getBoolean(SMS_ACTIVE, false);
256
+
257
+    public boolean isRemoteNotificationActive() {
258
+        return appSharedPrefs.getBoolean(REMOTE_NOTIFICATION_ACTIVE, false);
253 259
     }
254
-    
255
-    public void setSmsNumber(String number) {
256 260
 
257
-    	prefsEditor.putString(SMS_NUMBER, number);
258
-    	prefsEditor.commit();
261
+    public void setRemotePhoneNumber(@NonNull String remotePhoneNumber) {
262
+        prefsEditor.putString(REMOTE_PHONE_NUMBER, remotePhoneNumber.trim());
263
+        prefsEditor.apply();
259 264
     }
260
-    
261
-    public String getSmsNumber() {
262
-    	return appSharedPrefs.getString(SMS_NUMBER, "");
265
+
266
+    @NonNull
267
+    public String getRemotePhoneNumber() {
268
+        return Objects.requireNonNull(appSharedPrefs.getString(REMOTE_PHONE_NUMBER, ""));
263 269
     }
264 270
 
265 271
     public int getTimerDelay ()

+ 76 - 31
src/main/java/org/havenapp/main/SettingsFragment.java

@@ -5,6 +5,7 @@ package org.havenapp.main;
5 5
  */
6 6
 
7 7
 import android.Manifest;
8
+import android.annotation.SuppressLint;
8 9
 import android.app.Activity;
9 10
 import android.content.Context;
10 11
 import android.content.Intent;
@@ -84,13 +85,29 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
84 85
 
85 86
         }
86 87
 
87
-        if (preferences.getSmsActivation()) {
88
-            ((SwitchPreference) findPreference(PreferenceManager.SMS_ACTIVE)).setChecked(true);
89
-        }
88
+        SwitchPreference switchPreference =
89
+                (SwitchPreference) findPreference(PreferenceManager.REMOTE_NOTIFICATION_ACTIVE);
90
+
91
+        switchPreference.setChecked(preferences.isRemoteNotificationActive());
92
+
93
+        switchPreference.setOnPreferenceChangeListener((preference, newValue) -> {
94
+                    // user wants to enable/disable remote notification
95
+
96
+                    boolean enabled = (Boolean) newValue;
97
+
98
+                    if (enabled && !canSendRemoteNotification()) {
99
+                        collectDataForRemoteNotification();
100
+                    }
101
+
102
+                    preferences.setRemoteNotificationActive(enabled && canSendRemoteNotification());
103
+                    switchPreference.setChecked(enabled && canSendRemoteNotification());
90 104
 
91
-        findPreference(PreferenceManager.SMS_NUMBER).setOnPreferenceClickListener(preference -> {
92
-            if (preferences.getSmsNumber().isEmpty()) {
93
-                ((EditTextPreference) findPreference(PreferenceManager.SMS_NUMBER)).setText(getCountryCode());
105
+                    return false;
106
+                });
107
+
108
+        findPreference(PreferenceManager.REMOTE_PHONE_NUMBER).setOnPreferenceClickListener(preference -> {
109
+            if (preferences.getRemotePhoneNumber().isEmpty()) {
110
+                ((EditTextPreference) findPreference(PreferenceManager.REMOTE_PHONE_NUMBER)).setText(getCountryCode());
94 111
             }
95 112
             return false;
96 113
         });
@@ -101,11 +118,12 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
101 118
             return false;
102 119
         });
103 120
 
104
-        if (checkValidString(preferences.getSmsNumber())) {
105
-            ((EditTextPreference) findPreference(PreferenceManager.SMS_NUMBER)).setText(preferences.getSmsNumber().trim());
106
-            findPreference(PreferenceManager.SMS_NUMBER).setSummary(preferences.getSmsNumber().trim());
121
+        if (checkValidString(preferences.getRemotePhoneNumber())) {
122
+            ((EditTextPreference) findPreference(PreferenceManager.REMOTE_PHONE_NUMBER))
123
+                    .setText(preferences.getRemotePhoneNumber());
124
+            findPreference(PreferenceManager.REMOTE_PHONE_NUMBER).setSummary(preferences.getRemotePhoneNumber());
107 125
         } else {
108
-            findPreference(PreferenceManager.SMS_NUMBER).setSummary(R.string.sms_dialog_summary);
126
+            findPreference(PreferenceManager.REMOTE_PHONE_NUMBER).setSummary(R.string.sms_dialog_summary);
109 127
         }
110 128
 
111 129
         if (preferences.getRemoteAccessActive()) {
@@ -202,6 +220,41 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
202 220
 
203 221
     }
204 222
 
223
+    private boolean canSendRemoteNotification() {
224
+        String remotePhoneNumber = preferences.getRemotePhoneNumber();
225
+        String signalUsername = preferences.getSignalUsername();
226
+        return !remotePhoneNumber.isEmpty() && !getCountryCode().equalsIgnoreCase(remotePhoneNumber) &&
227
+                !TextUtils.isEmpty(signalUsername) && !getCountryCode().equalsIgnoreCase(signalUsername);
228
+    }
229
+
230
+    /**
231
+     * Collect data required for Remote notification with Signal.
232
+     * We need a remote phone number and a verified signal Username.
233
+     */
234
+    @SuppressLint("RestrictedApi")
235
+    private void collectDataForRemoteNotification() {
236
+        String remotePhoneNumber = preferences.getRemotePhoneNumber();
237
+        if (remotePhoneNumber.isEmpty() || getCountryCode().equalsIgnoreCase(remotePhoneNumber)) {
238
+            findPreference(PreferenceManager.REMOTE_PHONE_NUMBER).performClick();
239
+        }
240
+        String signalUsername = preferences.getSignalUsername();
241
+        if (TextUtils.isEmpty(signalUsername)) {
242
+            findPreference(PreferenceManager.REGISTER_SIGNAL).performClick();
243
+        } else {
244
+            activateSignal(signalUsername, null);
245
+        }
246
+    }
247
+
248
+    private void onRemoteNotificationParameterChange() {
249
+        SwitchPreference switchPreference =
250
+                (SwitchPreference) findPreference(PreferenceManager.REMOTE_NOTIFICATION_ACTIVE);
251
+
252
+        boolean remoteNotificationActive = canSendRemoteNotification();
253
+        preferences.setRemoteNotificationActive(remoteNotificationActive);
254
+
255
+        switchPreference.setChecked(remoteNotificationActive);
256
+    }
257
+
205 258
     @Override
206 259
     public boolean onOptionsItemSelected(MenuItem item) {
207 260
         switch (item.getItemId()) {
@@ -230,6 +283,10 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
230 283
 
231 284
         preferences.setSignalUsername(((EditTextPreference) findPreference(PreferenceManager.REGISTER_SIGNAL)).getText());
232 285
 
286
+        boolean remoteNotificationActive =
287
+                ((SwitchPreference) findPreference(PreferenceManager.REMOTE_NOTIFICATION_ACTIVE)).isChecked();
288
+        preferences.setRemoteNotificationActive(remoteNotificationActive);
289
+
233 290
         boolean remoteAccessActive = ((SwitchPreference) findPreference(PreferenceManager.REMOTE_ACCESS_ACTIVE)).isChecked();
234 291
 
235 292
         preferences.activateRemoteAccess(remoteAccessActive);
@@ -320,10 +377,6 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
320 377
 
321 378
                 }
322 379
                 break;
323
-            case PreferenceManager.SMS_ACTIVE:
324
-
325
-                setPhoneNumber();
326
-                break;
327 380
             case PreferenceManager.REMOTE_ACCESS_ACTIVE:
328 381
                 boolean remoteAccessActive = ((SwitchPreference) findPreference(PreferenceManager.REMOTE_ACCESS_ACTIVE)).isChecked();
329 382
                 if (remoteAccessActive) {
@@ -348,19 +401,17 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
348 401
                     preferences.setSignalUsername("");
349 402
                     findPreference(PreferenceManager.REGISTER_SIGNAL).setSummary(R.string.register_signal_desc);
350 403
                 }
404
+                onRemoteNotificationParameterChange();
351 405
                 break;
352 406
             case PreferenceManager.VERIFY_SIGNAL: {
353 407
                 String text = ((EditTextPreference) findPreference(PreferenceManager.VERIFY_SIGNAL)).getText();
354 408
                 activateSignal(preferences.getSignalUsername(), text);
409
+                onRemoteNotificationParameterChange();
355 410
                 break;
356 411
             }
357
-            case PreferenceManager.SMS_NUMBER:
358
-                boolean smsActive = ((SwitchPreference) findPreference(PreferenceManager.SMS_ACTIVE)).isChecked();
359
-                if (smsActive && TextUtils.isEmpty(preferences.getSignalUsername())) {
360
-                    askForPermission(Manifest.permission.SEND_SMS, 6);
361
-                    askForPermission(Manifest.permission.READ_PHONE_STATE, 6);
362
-                }
412
+            case PreferenceManager.REMOTE_PHONE_NUMBER:
363 413
                 setPhoneNumber();
414
+                onRemoteNotificationParameterChange();
364 415
                 break;
365 416
             case PreferenceManager.NOTIFICATION_TIME:
366 417
                 try
@@ -471,20 +522,14 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared
471 522
     }
472 523
 
473 524
     private void setPhoneNumber() {
474
-        boolean smsActive = ((SwitchPreference) findPreference(PreferenceManager.SMS_ACTIVE)).isChecked();
475
-        String phoneNumber = ((EditTextPreference) findPreference(PreferenceManager.SMS_NUMBER)).getText();
476
-        if (smsActive && checkValidString(phoneNumber)) {
477
-            preferences.activateSms(true);
478
-        } else {
479
-            preferences.activateSms(false);
480
-        }
525
+        String phoneNumber = ((EditTextPreference) findPreference(PreferenceManager.REMOTE_PHONE_NUMBER)).getText();
481 526
 
482 527
         if (checkValidString(phoneNumber) && !getCountryCode().equalsIgnoreCase(phoneNumber)) {
483
-            preferences.setSmsNumber(phoneNumber.trim());
484
-            findPreference(PreferenceManager.SMS_NUMBER).setSummary(phoneNumber.trim());
528
+            preferences.setRemotePhoneNumber(phoneNumber.trim());
529
+            findPreference(PreferenceManager.REMOTE_PHONE_NUMBER).setSummary(phoneNumber.trim());
485 530
         } else if (!getCountryCode().equalsIgnoreCase(phoneNumber)){
486
-            preferences.setSmsNumber("");
487
-            findPreference(PreferenceManager.SMS_NUMBER).setSummary(R.string.sms_dialog_message);
531
+            preferences.setRemotePhoneNumber("");
532
+            findPreference(PreferenceManager.REMOTE_PHONE_NUMBER).setSummary(R.string.sms_dialog_message);
488 533
         }
489 534
     }
490 535
 

+ 1 - 8
src/main/java/org/havenapp/main/service/MonitorService.java

@@ -365,7 +365,7 @@ public class MonitorService extends Service {
365 365
 
366 366
                 SignalSender sender = SignalSender.getInstance(this, mPrefs.getSignalUsername());
367 367
                 ArrayList<String> recips = new ArrayList<>();
368
-                StringTokenizer st = new StringTokenizer(mPrefs.getSmsNumber(), ",");
368
+                StringTokenizer st = new StringTokenizer(mPrefs.getRemotePhoneNumber(), ",");
369 369
                 while (st.hasMoreTokens())
370 370
                     recips.add(st.nextToken());
371 371
 
@@ -380,13 +380,6 @@ public class MonitorService extends Service {
380 380
                 }
381 381
 
382 382
                 sender.sendMessage(recips, alertMessage.toString(), attachment);
383
-            } else if (mPrefs.getSmsActivation()) {
384
-                SmsManager manager = SmsManager.getDefault();
385
-
386
-                StringTokenizer st = new StringTokenizer(mPrefs.getSmsNumber(), ",");
387
-                while (st.hasMoreTokens())
388
-                    manager.sendTextMessage(st.nextToken(), null, alertMessage.toString(), null, null);
389
-
390 383
             }
391 384
         }
392 385
 

+ 1 - 6
src/main/java/org/havenapp/main/service/SignalSender.java

@@ -165,13 +165,8 @@ public class SignalSender {
165 165
         if (!TextUtils.isEmpty(mUsername)) {
166 166
             getInstance(mContext, mUsername.trim());
167 167
             ArrayList<String> recipient = new ArrayList<>();
168
-            recipient.add(preferences.getSmsNumber());
168
+            recipient.add(preferences.getRemotePhoneNumber());
169 169
             sendMessage(recipient, message,null);
170
-        } else if (!TextUtils.isEmpty(preferences.getSmsNumber())) {
171
-            SmsManager manager = SmsManager.getDefault();
172
-            StringTokenizer st = new StringTokenizer(preferences.getSmsNumber(),",");
173
-            while (st.hasMoreTokens())
174
-                manager.sendTextMessage(st.nextToken(), null, message, null, null);
175 170
         }
176 171
 
177 172
         mAlertCount ++; //moved outside of the send functions for now

+ 8 - 9
src/main/java/org/havenapp/main/ui/CustomSlideNotify.java

@@ -5,7 +5,6 @@ package org.havenapp.main.ui;
5 5
  */
6 6
 
7 7
 
8
-import android.Manifest;
9 8
 import android.content.pm.PackageManager;
10 9
 import android.os.Bundle;
11 10
 import android.text.TextUtils;
@@ -18,6 +17,7 @@ import android.widget.EditText;
18 17
 import org.havenapp.main.PreferenceManager;
19 18
 import org.havenapp.main.R;
20 19
 
20
+import androidx.annotation.NonNull;
21 21
 import androidx.annotation.Nullable;
22 22
 import androidx.core.app.ActivityCompat;
23 23
 import androidx.core.content.ContextCompat;
@@ -62,15 +62,13 @@ public class CustomSlideNotify extends Fragment {
62 62
         mEditNumber = view.findViewById(R.id.editNumber);
63 63
         mEditNumber.setOnClickListener(new View.OnClickListener() {
64 64
             @Override
65
-            public void onClick(View v) {
66
-                askForPermission(Manifest.permission.SEND_SMS,6);
67
-                askForPermission(Manifest.permission.READ_PHONE_STATE,6);
68
-
69
-            }
65
+            public void onClick(View v) { }
70 66
         });
71 67
         PreferenceManager pm = new PreferenceManager(getActivity());
72
-        if (!TextUtils.isEmpty(pm.getSmsNumber()))
73
-            mEditNumber.setText(pm.getSmsNumber());
68
+        if (!TextUtils.isEmpty(pm.getRemotePhoneNumber()))
69
+            mEditNumber.setText(pm.getRemotePhoneNumber());
70
+
71
+        // todo describe why we are asking this maybe
74 72
 
75 73
         Button button = view.findViewById(R.id.btnSaveNumber);
76 74
         button.setOnClickListener(mListener);
@@ -78,9 +76,10 @@ public class CustomSlideNotify extends Fragment {
78 76
 
79 77
     }
80 78
 
79
+    @NonNull
81 80
     public String getPhoneNumber ()
82 81
     {
83
-        return mEditNumber.getText().toString();
82
+        return mEditNumber.getText() != null ? mEditNumber.getText().toString() : "";
84 83
     }
85 84
 
86 85
     private void askForPermission(String permission, Integer requestCode) {

+ 1 - 2
src/main/java/org/havenapp/main/ui/PPAppIntro.java

@@ -59,8 +59,7 @@ public class PPAppIntro extends AppIntro {
59 59
             @Override
60 60
             public void onClick(View v) {
61 61
                 PreferenceManager pm = new PreferenceManager(PPAppIntro.this);
62
-                pm.activateSms(true);
63
-                pm.setSmsNumber(cs4.getPhoneNumber());
62
+                pm.setRemotePhoneNumber(cs4.getPhoneNumber());
64 63
                 Toast.makeText(PPAppIntro.this, R.string.phone_saved,Toast.LENGTH_SHORT).show();
65 64
                 getPager().setCurrentItem(getPager().getCurrentItem()+1);
66 65
             }

+ 1 - 1
src/main/res/values-de/strings.xml

@@ -17,7 +17,7 @@
17 17
     	Verzögerungszeit setzen
18 18
     </string>
19 19
 
20
-    <string name="sms_label">"Bei Alarm SMS oder Signal Nachricht senden "</string>
20
+    <string name="remote_notification_label">"Bei Alarm SMS oder Signal Nachricht senden "</string>
21 21
 
22 22
     <string name="sms_hint">+4917712345678</string>
23 23
 

+ 1 - 1
src/main/res/values-es/strings.xml

@@ -17,7 +17,7 @@
17 17
         Temporizador
18 18
     </string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
         Enviar SMS o mensaje de alerta por Signal
22 22
     </string>
23 23
 

+ 1 - 1
src/main/res/values-fr/strings.xml

@@ -17,7 +17,7 @@
17 17
 		Déterminer un délai
18 18
 	</string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
 		Envoyer SMS ou des alertes par message Signal
22 22
 	</string>
23 23
 

+ 1 - 1
src/main/res/values-it/strings.xml

@@ -19,7 +19,7 @@
19 19
     	Imposta il timer di avvio
20 20
     </string>
21 21
 
22
-    <string name="sms_label">
22
+    <string name="remote_notification_label">
23 23
     	Invia SMS o messaggi via Signal
24 24
     </string>
25 25
 

+ 1 - 1
src/main/res/values-ja/strings.xml

@@ -17,7 +17,7 @@
17 17
     	開始遅延時間
18 18
     </string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
     	ショートメールで警告を送信
22 22
     </string>
23 23
 

+ 1 - 1
src/main/res/values-pt/strings.xml

@@ -17,7 +17,7 @@
17 17
     	Definir tempo de atraso
18 18
     </string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
     	Enviar mensagens de alerta de SMS ou Signal
22 22
     </string>
23 23
 

+ 1 - 1
src/main/res/values-ru/strings.xml

@@ -17,7 +17,7 @@
17 17
     	Установка времени задержки
18 18
     </string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
     	Оповещать по SMS или через Signal
22 22
     </string>
23 23
 

+ 1 - 1
src/main/res/values-sr/strings.xml

@@ -17,7 +17,7 @@
17 17
     	Vreme odlaganja
18 18
     </string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
     	Šalji SMS ili Signal upozorenja
22 22
     </string>
23 23
 

+ 1 - 1
src/main/res/values-tr/strings.xml

@@ -17,7 +17,7 @@
17 17
     	Bekleme Süresi
18 18
     </string>
19 19
 
20
-    <string name="sms_label">
20
+    <string name="remote_notification_label">
21 21
     	SMS veya Signal ile uyarı mesajı gönder
22 22
     </string>
23 23
 

+ 1 - 1
src/main/res/values-zh/strings.xml

@@ -19,7 +19,7 @@
19 19
     	设置延时
20 20
     </string>
21 21
 
22
-    <string name="sms_label">
22
+    <string name="remote_notification_label">
23 23
     	使用发送短信或 Signal 发送警告
24 24
     </string>
25 25
 

+ 2 - 2
src/main/res/values/strings.xml

@@ -19,8 +19,8 @@
19 19
     	Set Delay Time
20 20
     </string>
21 21
 
22
-    <string name="sms_label">
23
-    	Send SMS or Signal message alerts
22
+    <string name="remote_notification_label">
23
+    	Send Signal message alerts
24 24
     </string>
25 25
 
26 26
     <string name="sms_hint">

+ 3 - 3
src/main/res/xml/settings.xml

@@ -57,9 +57,9 @@
57 57
     <PreferenceCategory android:title="@string/label_notifications">
58 58
 
59 59
         <SwitchPreference
60
-            android:defaultValue="true"
61
-            android:key="sms_active"
62
-            android:title="@string/sms_label" />
60
+            android:defaultValue="false"
61
+            android:key="remote_notification_active"
62
+            android:title="@string/remote_notification_label" />
63 63
 
64 64
         <EditTextPreference
65 65
             style="@style/AppPreference.DialogPreferenceSave"