destroy-gcm-support.patch 2.94 KB
Newer Older
CapsLock's avatar
CapsLock committed
1
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
CapsLock's avatar
CapsLock committed
2
index ae8952a55..cce9e2b9b 100644
CapsLock's avatar
CapsLock committed
3 4
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
CapsLock's avatar
CapsLock committed
5
@@ -503,12 +503,6 @@
CapsLock's avatar
CapsLock committed
6
 
CapsLock's avatar
CapsLock committed
7
     <service android:name=".service.GenericForegroundService"/>
CapsLock's avatar
CapsLock committed
8
 
CapsLock's avatar
CapsLock committed
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
-
CapsLock's avatar
CapsLock committed
15 16
     <receiver android:name=".service.SmsListener"
               android:permission="android.permission.BROADCAST_SMS"
CapsLock's avatar
CapsLock committed
17
               android:enabled="true"
CapsLock's avatar
CapsLock committed
18
diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java b/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java
CapsLock's avatar
CapsLock committed
19
index c0b2521b0..33e09621e 100644
CapsLock's avatar
CapsLock committed
20 21
--- a/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/EnterPhoneNumberFragment.java
CapsLock's avatar
CapsLock committed
22
@@ -144,18 +144,7 @@ public final class EnterPhoneNumberFragment extends BaseRegistrationFragment {
CapsLock's avatar
CapsLock committed
23
       return;
CapsLock's avatar
CapsLock committed
24
     }
CapsLock's avatar
CapsLock committed
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();
CapsLock's avatar
CapsLock committed
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));
CapsLock's avatar
CapsLock committed
37
-    }
CapsLock's avatar
CapsLock committed
38 39 40 41
+    handlePromptForNoPlayServices(context, e164number);
   }
 
   private void handleRequestVerification(@NonNull Context context, @NonNull String e164number, boolean fcmSupported) {
CapsLock's avatar
CapsLock committed
42
diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/TextSecurePreferences.java b/app/src/main/java/org/thoughtcrime/securesms/util/TextSecurePreferences.java
CapsLock's avatar
CapsLock committed
43
index 9c2c69044..72aa2326c 100644
CapsLock's avatar
CapsLock committed
44 45
--- a/app/src/main/java/org/thoughtcrime/securesms/util/TextSecurePreferences.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/util/TextSecurePreferences.java
CapsLock's avatar
CapsLock committed
46 47 48 49 50 51 52 53 54 55
@@ -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
   }
CapsLock's avatar
CapsLock committed
57
 
CapsLock's avatar
CapsLock committed
58
   public static boolean isWebrtcCallingEnabled(Context context) {
CapsLock's avatar
CapsLock committed
59