Skip to content

Commit

Permalink
fix(phonestatus): manage exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelje authored and Hector Rondon committed Jan 18, 2018
1 parent 160c240 commit 997cdec
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@ public PhoneStatus(Context xCtx) {
//TODO Solved the problem Thread inside other Thread to make PhoenStatus works
// The problem here is with a the PhoneStateListener and the
// AsyncTask we got a Thread inside other Thread
try {

final Category c = new Category("PHONE_STATUS", "phoneStatus");

TelephonyManager telMng = (TelephonyManager)xCtx.getSystemService(Context.TELEPHONY_SERVICE);

try {
telMng.listen(new PhoneStateListener() {
@Override
public void onServiceStateChanged(ServiceState serviceState) {
Expand Down

0 comments on commit 997cdec

Please sign in to comment.