mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 07:57:30 +00:00
Pass on incoming messages until DB is imported.
This commit is contained in:
parent
5eb04328d3
commit
1ff4fd842c
@ -16,13 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.service;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.protocol.WirePrefix;
|
||||
|
||||
import ws.com.google.android.mms.pdu.GenericPdu;
|
||||
import ws.com.google.android.mms.pdu.NotificationInd;
|
||||
import ws.com.google.android.mms.pdu.PduHeaders;
|
||||
import ws.com.google.android.mms.pdu.PduParser;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -30,12 +23,23 @@ import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.protocol.WirePrefix;
|
||||
|
||||
import ws.com.google.android.mms.pdu.GenericPdu;
|
||||
import ws.com.google.android.mms.pdu.NotificationInd;
|
||||
import ws.com.google.android.mms.pdu.PduHeaders;
|
||||
import ws.com.google.android.mms.pdu.PduParser;
|
||||
|
||||
public class MmsListener extends BroadcastReceiver {
|
||||
|
||||
private boolean isRelevent(Context context, Intent intent) {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT)
|
||||
return false;
|
||||
|
||||
if (!ApplicationMigrationService.isDatabaseImported(context))
|
||||
return false;
|
||||
|
||||
if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean(ApplicationPreferencesActivity.ALL_MMS_PERF, true))
|
||||
return true;
|
||||
|
||||
|
@ -82,6 +82,9 @@ public class SmsListener extends BroadcastReceiver {
|
||||
if (isExemption(message, messageBody))
|
||||
return false;
|
||||
|
||||
if (!ApplicationMigrationService.isDatabaseImported(context))
|
||||
return false;
|
||||
|
||||
if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean("pref_all_sms", true))
|
||||
return true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user