Browse Source

Handle possible exception on MainActivity destroy. Fixes part of austinhuang0131/barinsta#1099

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
8f4691a72a
  1. 6
      app/src/main/java/awais/instagrabber/activities/MainActivity.java

6
app/src/main/java/awais/instagrabber/activities/MainActivity.java

@ -326,7 +326,11 @@ public class MainActivity extends BaseLanguageActivity implements FragmentManage
Log.e(TAG, "onDestroy: ", e); Log.e(TAG, "onDestroy: ", e);
} }
unbindActivityCheckerService(); unbindActivityCheckerService();
RetrofitFactory.getInstance().destroy();
try {
RetrofitFactory.getInstance().destroy();
} catch (Exception e) {
Log.e(TAG, "onDestroy: ", e);
}
} }
@Override @Override

Loading…
Cancel
Save