|
2 | 2 |
|
3 | 3 | import static com.bugsnag.android.SeverityReason.REASON_HANDLED_EXCEPTION; |
4 | 4 |
|
5 | | -import android.app.Application; |
6 | | -import android.content.Context; |
7 | | - |
8 | | -import androidx.annotation.NonNull; |
9 | | -import androidx.annotation.Nullable; |
10 | | -import androidx.annotation.VisibleForTesting; |
11 | | - |
12 | 5 | import com.bugsnag.android.internal.BackgroundTaskService; |
13 | 6 | import com.bugsnag.android.internal.ForegroundDetector; |
14 | 7 | import com.bugsnag.android.internal.ImmutableConfig; |
|
22 | 15 | import com.bugsnag.android.internal.dag.Provider; |
23 | 16 | import com.bugsnag.android.internal.dag.SystemServiceModule; |
24 | 17 |
|
| 18 | +import android.app.Application; |
| 19 | +import android.content.Context; |
| 20 | + |
| 21 | +import androidx.annotation.NonNull; |
| 22 | +import androidx.annotation.Nullable; |
| 23 | +import androidx.annotation.VisibleForTesting; |
| 24 | + |
| 25 | +import kotlin.Unit; |
| 26 | +import kotlin.jvm.functions.Function2; |
| 27 | + |
25 | 28 | import java.io.File; |
26 | 29 | import java.util.Collection; |
27 | 30 | import java.util.Collections; |
|
34 | 37 | import java.util.concurrent.RejectedExecutionException; |
35 | 38 | import java.util.regex.Pattern; |
36 | 39 |
|
37 | | -import kotlin.Unit; |
38 | | -import kotlin.jvm.functions.Function2; |
39 | | - |
40 | 40 | /** |
41 | 41 | * A Bugsnag Client instance allows you to use Bugsnag in your Android app. |
42 | 42 | * Typically you'd instead use the static access provided in the Bugsnag class. |
@@ -383,23 +383,23 @@ public Unit invoke(String oldOrientation, String newOrientation) { |
383 | 383 | return null; |
384 | 384 | } |
385 | 385 | }, new Function2<Boolean, Integer, Unit>() { |
386 | | - @Override |
387 | | - public Unit invoke(Boolean isLowMemory, Integer memoryTrimLevel) { |
388 | | - memoryTrimState.setLowMemory(Boolean.TRUE.equals(isLowMemory)); |
389 | | - if (memoryTrimState.updateMemoryTrimLevel(memoryTrimLevel)) { |
390 | | - leaveAutoBreadcrumb( |
391 | | - "Trim Memory", |
392 | | - BreadcrumbType.STATE, |
393 | | - Collections.<String, Object>singletonMap( |
394 | | - "trimLevel", memoryTrimState.getTrimLevelDescription() |
395 | | - ) |
396 | | - ); |
397 | | - } |
| 386 | + @Override |
| 387 | + public Unit invoke(Boolean isLowMemory, Integer memoryTrimLevel) { |
| 388 | + memoryTrimState.setLowMemory(Boolean.TRUE.equals(isLowMemory)); |
| 389 | + if (memoryTrimState.updateMemoryTrimLevel(memoryTrimLevel)) { |
| 390 | + leaveAutoBreadcrumb( |
| 391 | + "Trim Memory", |
| 392 | + BreadcrumbType.STATE, |
| 393 | + Collections.<String, Object>singletonMap( |
| 394 | + "trimLevel", memoryTrimState.getTrimLevelDescription() |
| 395 | + ) |
| 396 | + ); |
| 397 | + } |
398 | 398 |
|
399 | | - memoryTrimState.emitObservableEvent(); |
400 | | - return null; |
401 | | - } |
402 | | - } |
| 399 | + memoryTrimState.emitObservableEvent(); |
| 400 | + return null; |
| 401 | + } |
| 402 | + } |
403 | 403 | )); |
404 | 404 | } |
405 | 405 |
|
|
0 commit comments