|
|
@ -16,6 +16,13 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
package org.thoughtcrime.securesms.service;
|
|
|
|
package org.thoughtcrime.securesms.service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
|
|
|
import android.preference.PreferenceManager;
|
|
|
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
|
|
|
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
|
|
|
import org.thoughtcrime.securesms.protocol.WirePrefix;
|
|
|
|
import org.thoughtcrime.securesms.protocol.WirePrefix;
|
|
|
|
|
|
|
|
|
|
|
@ -23,12 +30,6 @@ import ws.com.google.android.mms.pdu.GenericPdu;
|
|
|
|
import ws.com.google.android.mms.pdu.NotificationInd;
|
|
|
|
import ws.com.google.android.mms.pdu.NotificationInd;
|
|
|
|
import ws.com.google.android.mms.pdu.PduHeaders;
|
|
|
|
import ws.com.google.android.mms.pdu.PduHeaders;
|
|
|
|
import ws.com.google.android.mms.pdu.PduParser;
|
|
|
|
import ws.com.google.android.mms.pdu.PduParser;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
|
|
|
import android.preference.PreferenceManager;
|
|
|
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class MmsListener extends BroadcastReceiver {
|
|
|
|
public class MmsListener extends BroadcastReceiver {
|
|
|
|
|
|
|
|
|
|
|
@ -36,6 +37,9 @@ public class MmsListener extends BroadcastReceiver {
|
|
|
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT)
|
|
|
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ApplicationMigrationService.isDatabaseImported(context))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean(ApplicationPreferencesActivity.ALL_MMS_PERF, true))
|
|
|
|
if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean(ApplicationPreferencesActivity.ALL_MMS_PERF, true))
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|