Skip to content

Commit

Permalink
Crashlytics can no longer be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Feb 19, 2015
1 parent 522b3c8 commit 3dd23ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ android {
testBuildType 'debugTest'

defaultConfig {
versionCode 26
versionName "1.17"
versionCode 27
versionName "1.18"
minSdkVersion 10
targetSdkVersion 21
applicationId "com.irccloud.android"
Expand Down
5 changes: 0 additions & 5 deletions res/xml-sw600dp/preferences_device.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
android:entryValues="@array/pref_timeout_values"
android:summary="How long to remain connected to IRCCloud while running in the background"
android:defaultValue="300000" />
<CheckBoxPreference android:key="acra.enable"
android:title="Crash Reporting"
android:summaryOn="Crash reports will be sent to IRCCloud"
android:summaryOff="Crash reports will not be sent to IRCCloud"
android:defaultValue="true"/>
<CheckBoxPreference
android:key="kb_caps"
android:defaultValue="true"
Expand Down
5 changes: 0 additions & 5 deletions res/xml/preferences_device.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
android:entryValues="@array/pref_timeout_values"
android:summary="How long to remain connected to IRCCloud while running in the background"
android:defaultValue="300000" />
<CheckBoxPreference android:key="acra.enable"
android:title="Crash Reporting"
android:summaryOn="Crash reports will be sent to IRCCloud"
android:summaryOff="Crash reports will not be sent to IRCCloud"
android:defaultValue="true"/>
<CheckBoxPreference
android:key="kb_send"
android:defaultValue="false"
Expand Down
15 changes: 7 additions & 8 deletions src/com/irccloud/android/IRCCloudApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public static IRCCloudApplication getInstance() {
public void onCreate() {
super.onCreate();
instance = this;
Fabric.with(this, new Crashlytics());

//Disable HTTP keep-alive for our app, as some versions of Android will return an empty response
System.setProperty("http.keepAlive", "false");
Expand All @@ -78,14 +79,6 @@ public void onCreate() {
ColorFormatter.init();

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
if(prefs.getBoolean("acra.enable", true)) {
try {
ApplicationInfo ai = getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
if(ai.metaData.getString("com.crashlytics.ApiKey").length() > 0)
Fabric.with(this, new Crashlytics());
} catch (Exception e) {
}
}

if(prefs.contains("notify")) {
SharedPreferences.Editor editor = prefs.edit();
Expand Down Expand Up @@ -157,6 +150,12 @@ public void onScanCompleted(String path, Uri uri) {
}
}

if(prefs.contains("acra.enable")) {
SharedPreferences.Editor editor = prefs.edit();
editor.remove("acra.enable");
editor.commit();
}

prefs = getSharedPreferences("prefs", 0);
if(prefs.getString("host", "www.irccloud.com").equals("www.irccloud.com") && !prefs.contains("path") && prefs.contains("session_key")) {
Crashlytics.log(Log.INFO, "IRCCloud", "Migrating path from session key");
Expand Down

0 comments on commit 3dd23ac

Please sign in to comment.