public int getCellStatus(Context c){
TelephonyManager tm = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);
List<CellInfo> cellInfoList = tm.getAllCellInfo();
int z = 0;
//This means cell is off
if(cellInfoList.isEmpty()){
z = 1;
}
return z;
}
Change code snippet found in WifiReceiver.java:
To this: