summaryrefslogtreecommitdiff
path: root/workspace/BlaMail/src
diff options
context:
space:
mode:
authorLuke Miller <lgdmiller@hotmail.com>2010-12-02 09:52:20 +0000
committerLuke Miller <lgdmiller@hotmail.com>2010-12-02 09:52:20 +0000
commitc132b6d924caba5557b5f26c34f609c60dc966d0 (patch)
treec17dee3481cf156b8f966b8afd9d2a247966c74c /workspace/BlaMail/src
parent4e3da78e8d1dd3f7673ceb71199315511b23810d (diff)
Disabled the notification SMSes.HEADmaster
Diffstat (limited to 'workspace/BlaMail/src')
-rw-r--r--workspace/BlaMail/src/com/blatech/blamail/BlaMail.java35
1 files changed, 12 insertions, 23 deletions
diff --git a/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java b/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java
index 1fe08ca..78a947b 100644
--- a/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java
+++ b/workspace/BlaMail/src/com/blatech/blamail/BlaMail.java
@@ -80,32 +80,21 @@ public class BlaMail extends Activity {
Boolean serviceDisconnected = true;
@Override
public void onServiceStateChanged(ServiceState serviceState){
- try {
+ //try {
if(serviceState.getState() == 0 && serviceDisconnected == true){
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: The phone is registered with an operator.");
+ //sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: The phone is registered with an operator.");
serviceDisconnected = false;
}
else {
serviceDisconnected = true;
}
- /*switch(serviceState.getState()){
- case 0: //serviceState.STATE_IN_SERVICE
- if (serviceDisconnected == true) {
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: The phone is registered with an operator.");
- }
- serviceDisconnected = false;
- break;
- case 1: //serviceState.STATE_OUT_OF_SERVICE
- serviceDisconnected = true;
- break;
- }*/
- } catch (AddressException e) {
+ /*} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- }
+ }*/
}
};
@@ -115,7 +104,7 @@ public class BlaMail extends Activity {
public void onDataConnectionStateChanged(int state){
Thread t = null;
//Thread s = null;
- try {
+ //try {
switch (state) {
case TelephonyManager.DATA_CONNECTED:
if(dataDisconnected == true){
@@ -123,14 +112,14 @@ public class BlaMail extends Activity {
if(t != null){
t.destroy(); //not good practice. TODO: fix this!
}
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Connected. IP traffic should be available.");
+ //sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Connected. IP traffic should be available.");
t = new Thread(new Monitor());
t.start();
}
break;
case TelephonyManager.DATA_DISCONNECTED:
dataDisconnected = true;
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Disconnected. IP traffic not available.");
+ //sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Disconnected. IP traffic not available.");
if(t != null){
t.destroy(); //not good practice. TODO: fix this!
//t.interrupt();
@@ -141,7 +130,7 @@ public class BlaMail extends Activity {
case TelephonyManager.DATA_ACTIVITY_DORMANT:
if(t != null){
dataDisconnected = true;
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Data connection is active, but physical link is down");
+ //sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Data connection is active, but physical link is down");
t.destroy(); //not good practice. TODO: fix this!
//t.interrupt();
//s = new Thread(new StopIdle());
@@ -151,7 +140,7 @@ public class BlaMail extends Activity {
case TelephonyManager.DATA_SUSPENDED:
if(t != null){
dataDisconnected = true;
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Suspended. The connection is up, but IP traffic is temporarily unavailable. For example, in a 2G network, data activity may be suspended when a voice call arrives.");
+ //sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Suspended. The connection is up, but IP traffic is temporarily unavailable. For example, in a 2G network, data activity may be suspended when a voice call arrives.");
t.destroy(); //not good practice. TODO: fix this!
//t.interrupt();
//s = new Thread(new StopIdle());
@@ -161,18 +150,18 @@ public class BlaMail extends Activity {
default:
if(t != null){
dataDisconnected = true;
- sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Current state is \"" + state + "\"");
+ //sendSMS("0000000000000000000", "07927278978", "!blamail Notification from blamail: Current state is \"" + state + "\"");
t.destroy(); //not good practice. TODO: fix this!
}
break;
}
- } catch (AddressException e) {
+ /*} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- }
+ }*/
}
};