Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Commit 0cb0dc1

Browse files
author
Michael Farb
committed
prevent debug builds from posting crashes
1 parent f216c77 commit 0cb0dc1

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

safeslinger-messenger/src/edu/cmu/cylab/starslinger/SafeSlinger.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,16 @@ public void onConfigurationChanged(Configuration newConfig) {
121121
@Override
122122
public void onCreate() {
123123
super.onCreate();
124-
Crashlytics.start(this);
125-
126124
sSafeSlinger = this;
127125

128-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
126+
// we only want to run crashlytics in release, not debug
127+
if (!SafeSlingerConfig.isDebug()) {
128+
Crashlytics.start(this);
129+
}
130+
131+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
129132
registerActivityLifecycleCallbacks(new ActivityLifeCallbacks());
130-
// Catching Unhandled Exceptions...
131-
// We used to use UncaughtExceptionHandler to catch exceptions here,
132-
// and send via email, however the android system has such a good
133-
// feedback mechanism, that already takes pains to protect user privacy
134-
// we prefer now to use the default method and let users decide when
135-
// to submit anonymous error data that way.
133+
}
136134

137135
updateLanguage(SafeSlingerPrefs.getLanguage());
138136

0 commit comments

Comments
 (0)