Skip to content

Commit ae01e60

Browse files
committed
feat: add logging for low memory events in MainApplication
1 parent 6e9116e commit ae01e60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android/app/src/main/java/im/status/ethereum/MainApplication.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import im.status.ethereum.pushnotifications.PushNotificationPackage
2424
import im.status.ethereum.StatusOkHttpClientFactory
2525
import org.json.JSONObject
2626
import android.content.ComponentCallbacks2
27+
import android.util.Log
2728

2829
class MainApplication : NavigationApplication() {
2930

@@ -57,12 +58,14 @@ class MainApplication : NavigationApplication() {
5758

5859
override fun onLowMemory() {
5960
super.onLowMemory()
61+
Log.i("MainApplication", "onLowMemory called")
6062
StatusPackage.switchToLowMemoryMode()
6163
emitEvent(ComponentCallbacks2.TRIM_MEMORY_COMPLETE)
6264
}
6365

6466
override fun onTrimMemory(level: Int) {
6567
super.onTrimMemory(level)
68+
Log.i("MainApplication", "onTrimMemory called with level: $level")
6669
if (level !in arrayOf(
6770
ComponentCallbacks2.TRIM_MEMORY_BACKGROUND,
6871
ComponentCallbacks2.TRIM_MEMORY_MODERATE,

0 commit comments

Comments
 (0)