This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Field; | |
import java.lang.reflect.Modifier; | |
import android.os.Build; | |
private void traceBuildValues() { | |
Build build = new Build(); | |
Class<?> c = build.getClass(); | |
Field[] fieldArray = c.getDeclaredFields(); | |
for(Field aField : fieldArray) { | |
int modifiers = aField.getModifiers(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hack to work around "TypeError: Converting circular structure to JSON" | |
* which is seen when using JSON.stringify | |
* Intended to inspection/debugging purposes. | |
* Note: Will not display an Array in square brackets. | |
* Shows extra trailing comma before closing brace. | |
* @param obj | |
* @param [onlyProps] - Show only property names | |
* @param {String[]} [skipTypes=['function']] - array of types to trace only the type instead of value. | |
* @return {String} |