-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1912 from bugsnag/lemnik/exit-info-tidy
Make ExitInfoPlugin config more Java friendly
- Loading branch information
Showing
6 changed files
with
85 additions
and
32 deletions.
There are no files selected for viewing
20 changes: 16 additions & 4 deletions
20
bugsnag-plugin-android-exitinfo/api/bugsnag-plugin-android-exitinfo.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
public final class com/bugsnag/android/BugsnagExitInfoPlugin : com/bugsnag/android/Plugin { | ||
public fun <init> ()V | ||
public fun <init> (Z)V | ||
public fun <init> (ZZ)V | ||
public fun <init> (ZZZ)V | ||
public synthetic fun <init> (ZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V | ||
public fun <init> (Lcom/bugsnag/android/ExitInfoPluginConfiguration;)V | ||
public synthetic fun <init> (Lcom/bugsnag/android/ExitInfoPluginConfiguration;ILkotlin/jvm/internal/DefaultConstructorMarker;)V | ||
public fun load (Lcom/bugsnag/android/Client;)V | ||
public fun unload ()V | ||
} | ||
|
||
public final class com/bugsnag/android/ExitInfoPluginConfiguration { | ||
public fun <init> ()V | ||
public fun <init> (ZZZ)V | ||
public synthetic fun <init> (ZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V | ||
public fun equals (Ljava/lang/Object;)Z | ||
public final fun getDisableProcessStateSummaryOverride ()Z | ||
public final fun getIncludeLogcat ()Z | ||
public final fun getListOpenFds ()Z | ||
public fun hashCode ()I | ||
public final fun setDisableProcessStateSummaryOverride (Z)V | ||
public final fun setIncludeLogcat (Z)V | ||
public final fun setListOpenFds (Z)V | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...-plugin-android-exitinfo/src/main/java/com/bugsnag/android/ExitInfoPluginConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.bugsnag.android | ||
|
||
class ExitInfoPluginConfiguration( | ||
/** | ||
* Whether to add the list of open file descriptors to correlated reports | ||
*/ | ||
var listOpenFds: Boolean = true, | ||
|
||
/** | ||
* Whether to report stored logcat messages metadata | ||
*/ | ||
var includeLogcat: Boolean = false, | ||
|
||
/** | ||
* Turn off event correlation based on the | ||
* [processStateSummary](ActivityManager.setProcessStateSummary) field. This can set to `true` | ||
* to stop `BugsnagExitInfoPlugin` overwriting the field if it is being used by the app. | ||
*/ | ||
var disableProcessStateSummaryOverride: Boolean = false | ||
) { | ||
constructor() : this(true, false, false) | ||
|
||
internal fun copy() = | ||
ExitInfoPluginConfiguration(listOpenFds, includeLogcat, disableProcessStateSummaryOverride) | ||
|
||
override fun equals(other: Any?): Boolean { | ||
return other is ExitInfoPluginConfiguration && | ||
listOpenFds == other.listOpenFds && | ||
includeLogcat == other.includeLogcat && | ||
disableProcessStateSummaryOverride == other.disableProcessStateSummaryOverride | ||
} | ||
|
||
override fun hashCode(): Int { | ||
var result = listOpenFds.hashCode() | ||
result = 31 * result + includeLogcat.hashCode() | ||
result = 31 * result + disableProcessStateSummaryOverride.hashCode() | ||
return result | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters