Skip to content

Commit

Permalink
Removed crash reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
fire-light42 authored Oct 14, 2024
1 parent 3ece1ab commit d870978
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ import kotlin.system.exitProcess
class CustomReportSender : ReportSender {
// Sends all your crashes to google forms
override fun send(context: Context, errorContent: CrashReportData) {
println("Sending report")
/*println("Sending report")
val url =
"https://docs.google.com/forms/d/e/1FAIpQLSfO4r353BJ79TTY_-t5KWSIJT2xfqcQWY81xjAA1-1N0U2eSg/formResponse"
"https://docs.google.com/forms/d/e/$id/formResponse"
val data = mapOf(
"entry.1993829403" to errorContent.toJSON()
"entry.$entry" to errorContent.toJSON()
)
thread { // to not run it on main thread
Expand All @@ -62,7 +62,7 @@ class CustomReportSender : ReportSender {
normalSafeApiCall {
Toast.makeText(context, R.string.acra_report_toast, Toast.LENGTH_SHORT).show()
}
}
}*/
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SetupFragmentLayout : Fragment() {
.apply()
activity?.recreate()
}
acraSwitch.setOnCheckedChangeListener { _, enableCrashReporting ->
/*acraSwitch.setOnCheckedChangeListener { _, enableCrashReporting ->
// Use same pref as in settings
settingsManager.edit().putBoolean(ACRA.PREF_DISABLE_ACRA, !enableCrashReporting)
.apply()
Expand All @@ -83,7 +83,7 @@ class SetupFragmentLayout : Fragment() {
crashReportingText.text =
getText(
if (enableCrashReporting) R.string.bug_report_settings_off else R.string.bug_report_settings_on
)
)*/


nextBtt.setOnClickListener {
Expand Down
66 changes: 34 additions & 32 deletions app/src/main/res/layout/fragment_setup_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,46 @@
android:layout_height="match_parent"
android:orientation="vertical">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="horizontal">

<LinearLayout
<!--
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginHorizontal="50dp"
android:orientation="vertical">
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/crash_reporting_title"
android:textSize="18sp" />
<TextView
android:id="@+id/crash_reporting_text"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginHorizontal="50dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/crash_reporting_title"
android:textSize="18sp" />
<TextView
android:id="@+id/crash_reporting_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/bug_report_settings_off" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/acra_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/bug_report_settings_off" />
</LinearLayout>


<androidx.appcompat.widget.SwitchCompat
android:id="@+id/acra_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:checked="true">
android:layout_gravity="end|center_vertical"
android:checked="true">
</androidx.appcompat.widget.SwitchCompat>
</FrameLayout>
</androidx.appcompat.widget.SwitchCompat>
</FrameLayout>-->

<TextView
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/xml/settings_updates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
android:icon="@drawable/ic_baseline_construction_24"
android:title="@string/redo_setup_process"
app:key="@string/redo_setup_key" />
<SwitchPreference
<!--<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_baseline_bug_report_24"
android:key="acra.disable"
android:summaryOff="@string/bug_report_settings_off"
android:summaryOn="@string/bug_report_settings_on"
android:title="@string/pref_disable_acra" />
android:title="@string/pref_disable_acra" />-->
</PreferenceCategory>
</PreferenceScreen>

0 comments on commit d870978

Please sign in to comment.