destroy-gcm-support.patch 2.78 KB
Newer Older
1
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
CapsLock's avatar
CapsLock committed
2
index ae8952a55..cce9e2b9b 100644
3 4
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
CapsLock's avatar
CapsLock committed
5
@@ -503,12 +503,6 @@
6
 
7
     <service android:name=".service.GenericForegroundService"/>
8
 
9 10 11 12 13
-    <service android:name=".gcm.FcmService">
-        <intent-filter>
-            <action android:name="com.google.firebase.MESSAGING_EVENT" />
-        </intent-filter>
-    </service>
CapsLock's avatar
CapsLock committed
14
-
15 16
     <receiver android:name=".service.SmsListener"
               android:permission="android.permission.BROADCAST_SMS"
CapsLock's avatar
CapsLock committed
17 18 19 20 21 22
               android:enabled="true"
diff --git a/src/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java b/src/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java
index c0b2521b0..33e09621e 100644
--- a/src/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java
+++ b/src/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java
@@ -144,18 +144,7 @@ public final class EnterPhoneNumberFragment extends BaseRegistrationFragment {
23
       return;
CapsLock's avatar
CapsLock committed
24
     }
25
 
CapsLock's avatar
CapsLock committed
26
-    PlayServicesUtil.PlayServicesStatus fcmStatus = PlayServicesUtil.getPlayServicesStatus(context);
CapsLock's avatar
CapsLock committed
27
-
CapsLock's avatar
CapsLock committed
28 29 30 31 32 33
-    if (fcmStatus == PlayServicesUtil.PlayServicesStatus.SUCCESS) {
-      handleRequestVerification(context, e164number, true);
-    } else if (fcmStatus == PlayServicesUtil.PlayServicesStatus.MISSING) {
-      handlePromptForNoPlayServices(context, e164number);
-    } else if (fcmStatus == PlayServicesUtil.PlayServicesStatus.NEEDS_UPDATE) {
-      GoogleApiAvailability.getInstance().getErrorDialog(requireActivity(), ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED, 0).show();
34
-    } else {
CapsLock's avatar
CapsLock committed
35 36
-      Dialogs.showAlertDialog(context, getString(R.string.RegistrationActivity_play_services_error),
-        getString(R.string.RegistrationActivity_google_play_services_is_updating_or_unavailable));
37
-    }
CapsLock's avatar
CapsLock committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
+    handlePromptForNoPlayServices(context, e164number);
   }
 
   private void handleRequestVerification(@NonNull Context context, @NonNull String e164number, boolean fcmSupported) {
diff --git a/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java b/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java
index 9c2c69044..72aa2326c 100644
--- a/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java
+++ b/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java
@@ -427,11 +427,10 @@ public class TextSecurePreferences {
   }
 
   public static boolean isFcmDisabled(Context context) {
-    return getBooleanPreference(context, GCM_DISABLED_PREF, false);
+    return true;
   }
 
   public static void setFcmDisabled(Context context, boolean disabled) {
-    setBooleanPreference(context, GCM_DISABLED_PREF, disabled);
CapsLock's avatar
CapsLock committed
56
   }
57
 
CapsLock's avatar
CapsLock committed
58 59
   public static boolean isWebrtcCallingEnabled(Context context) {