File tree Expand file tree Collapse file tree 8 files changed +18
-11
lines changed
src/main/java/com/crazylegend/crashyreporter Expand file tree Collapse file tree 8 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' com.android.application'
22apply plugin : ' kotlin-android'
3- apply plugin : ' kotlin-android-extensions'
43
54android {
65 compileSdkVersion 30
@@ -40,10 +39,10 @@ android {
4039dependencies {
4140 implementation fileTree(dir : " libs" , include : [" *.jar" ])
4241 implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
43- implementation ' androidx.core:core-ktx:1.5.0-alpha03 '
42+ implementation ' androidx.core:core-ktx:1.5.0-alpha04 '
4443 implementation ' androidx.appcompat:appcompat:1.2.0'
45- implementation ' androidx.constraintlayout:constraintlayout:2.0.1 '
46- testImplementation ' junit:junit:4.13'
44+ implementation ' androidx.constraintlayout:constraintlayout:2.0.2 '
45+ testImplementation ' junit:junit:4.13.1 '
4746 androidTestImplementation ' androidx.test.ext:junit:1.1.2'
4847 androidTestImplementation ' androidx.test.espresso:espresso-core:3.3.0'
4948
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ task clean(type: Delete) {
2323
2424ext {
2525 // tests
26- junitVersion = ' 4.13'
26+ junitVersion = ' 4.13.1 '
2727 hamcrestVersion = ' 1.3'
2828 androidXTestCoreVersion = ' 1.3.0'
2929 androidXTestExtKotlinRunnerVersion = ' 1.1.2'
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
22apply plugin : ' kotlin-android'
3- apply plugin : ' kotlin-android-extensions'
43
54android {
65 compileSdkVersion 30
@@ -40,7 +39,7 @@ dependencies {
4039 implementation fileTree(dir : " libs" , include : [" *.jar" ])
4140 implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
4241
43- implementation ' androidx.core:core-ktx:1.3.1 '
42+ implementation ' androidx.core:core-ktx:1.3.2 '
4443
4544 androidTestImplementation ' androidx.test.ext:junit:1.1.2'
4645 androidTestImplementation ' androidx.test.espresso:espresso-core:3.3.0'
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ import java.util.*
1818 */
1919object CrashyReporter {
2020
21+ /* *
22+ * Checks what time the library was initialized
23+ * -1 if not initialized
24+ */
25+ var initializeTime: Long = - 1
26+ private set
27+
2128 private lateinit var applicationContext: Context
2229
2330 // paths
@@ -61,6 +68,7 @@ object CrashyReporter {
6168 fun initialize (context : Context ) {
6269 applicationContext = context
6370 setupExceptionHandler()
71+ initializeTime = System .currentTimeMillis()
6472 }
6573
6674
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import java.util.*
1010 * Created by crazy on 7/19/20 to long live and prosper !
1111 */
1212
13- object ApplicationUtils {
13+ internal object ApplicationUtils {
1414
1515 internal fun appendApplicationInfo (context : Context ): String {
1616 return " *********** Application info ***********\n " +
@@ -27,6 +27,7 @@ object ApplicationUtils {
2727 " Last updated: ${CrashyReporter .dateFormat.format(Date (context.lastUpdateTime))} \n " +
2828 " Requested permissions: ${context.requestedPermissions?.mapWithoutNewLine().notAvailableIfNull()} \n " +
2929 " Default prefs: ${SharedPreferencesUtil .collect(context).notAvailableIfNull()} \n " +
30+ " Default prefs: ${SharedPreferencesUtil .collect(context).notAvailableIfNull()} \n " +
3031 " \n " +
3132 " *********** END of Application info ***********" +
3233 " \n " +
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import java.io.IOException
88/* *
99 * Created by crazy on 7/19/20 to long live and prosper !
1010 */
11- object CPUInfo {
11+ internal object CPUInfo {
1212
1313 fun getNumberOfCores () = Runtime .getRuntime().availableProcessors()
1414
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import java.io.InputStreamReader
99 * Created by crazy on 2/6/19 to long live and prosper !
1010 */
1111
12- object RootUtils {
12+ internal object RootUtils {
1313
1414 internal val isDeviceRooted: Boolean
1515 get() = checkRootMethod1() || checkRootMethod2() || checkRootMethod3()
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import com.crazylegend.crashyreporter.extensions.mapWithoutNewLine
88/* *
99 * Created by crazy on 7/20/20 to long live and prosper !
1010 */
11- object SharedPreferencesUtil {
11+ internal object SharedPreferencesUtil {
1212
1313 fun collect (context : Context ) =
1414 PreferenceManager .getDefaultSharedPreferences(context).all.iterator().asSequence().map {
You can’t perform that action at this time.
0 commit comments