
org.robolectric.shadows.ShadowDebug Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.os.Debug;
import com.google.common.collect.ImmutableMap;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import java.util.Map;
import static android.os.Build.VERSION_CODES;
import static android.os.Build.VERSION_CODES.M;
@Implements(Debug.class)
public class ShadowDebug {
@Implementation
public static void __staticInitializer__() {
// Avoid calling Environment.getLegacyExternalStorageDirectory()
}
@Implementation
public static long getNativeHeapAllocatedSize() {
return Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
}
@Implementation(minSdk = M)
public static Map getRuntimeStats() {
return ImmutableMap.builder().build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy