Skip to content

Commit

Permalink
further NPE handling in shoutController.
Browse files Browse the repository at this point in the history
  • Loading branch information
LvH authored and LvH committed Oct 8, 2011
1 parent 7b4675b commit 7ed2c1c
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -31,7 +31,7 @@ public static String testData() {
}

public static String getMyPhoneNumber() {
String out = null;
String out = "";
try {
out = tm.getLine1Number();
return out;
Expand All @@ -41,7 +41,7 @@ public static String getMyPhoneNumber() {
}

public static String getOperator() {
String out = null;
String out = "";
try {
if(tm.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE)
out = tm.getNetworkOperator();
Expand All @@ -52,7 +52,7 @@ public static String getOperator() {
}

public static String getCellId() {
String out = null;
String out = "";
try {
if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
final GsmCellLocation gLoc = (GsmCellLocation) tm.getCellLocation();
Expand All @@ -66,7 +66,7 @@ public static String getCellId() {
}

public static String getLAC() {
String out = null;
String out = "";
try {
if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM){
final GsmCellLocation gLoc = (GsmCellLocation) tm.getCellLocation();
Expand All @@ -81,7 +81,7 @@ public static String getLAC() {
}

public static String getIMSI() {
String out = null;
String out = "";
try {
out = tm.getSubscriberId();
return out;
Expand All @@ -91,7 +91,7 @@ public static String getIMSI() {
}

public static String getMCC() {
String out = null;
String out = "";
try {
out = tm.getNetworkOperator().substring(0,3);
return out;
Expand All @@ -101,7 +101,7 @@ public static String getMCC() {
}

public static String getMNC() {
String out = null;
String out = "";
try {
out = tm.getNetworkOperator().substring(3);
return out;
Expand All @@ -111,7 +111,7 @@ public static String getMNC() {
}

public static String getIMEI() {
String out = null;
String out = "";
try {
out = tm.getDeviceId();
return out;
Expand Down

0 comments on commit 7ed2c1c

Please sign in to comment.