Given: A simple Activity created with the Android Studio Wizard, without any custom code inside, consumes perpetually memory calling dumpGfxInfo().
The Android Studio's build in Allocation Tracker reveals at least three threads doing the same:
--- 8< ------------------------------------------------------------------
* < Thread 12 >
* execTransact():446, Binder (andoroid.os)
* onTransact():545, ApplicationThreadNative (android.app)
* dumpGfxInfo():1107, ActivityThread$ApplicationThread (android.app)
--- 8< -------------------------------------------------------------------
Apparently dumpGfxInfo() consumes memory by allocating memory for empty strings. The only relevant dependency compiled in, is com.android.support:appcompat-v7:22.2.1
Along with this memory consumption, following exception (sometimes) arises:
15331-15364/ W/Binder﹕ Caught a RuntimeException from the binder stub implementation.
java.lang.NullPointerException: Attempt to read from field 'android.view.HardwareRenderer android.view.View$AttachInfo.mHardwareRenderer' on a null object reference
at android.view.WindowManagerGlobal.dumpGfxInfo(WindowManagerGlobal.java:466)
at android.app.ActivityThread$ApplicationThread.dumpGfxInfo(ActivityThread.java:1107)
at android.app.ApplicationThreadNative.onTransact(ApplicationThreadNative.java:548)
at android.os.Binder.execTransact(Binder.java:446)
Question: How to fix/turn off this behaviour and get rid of it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…