追踪调用

import java.lang.StackTraceElement;
import android.util.Slog;

StackTraceElement[] stack = new Throwable().getStackTrace();

for (StackTraceElement element : stack)
{
Slog.d(TAG, " |----" + element.toString());

}



Log.d("tag", "mExpandedHeight: " + mExpandedHeight);

Log.d("tag", Log.getStackTraceString(new Throwable()));



Exception e = new Exception();
e.fillInStackTrace();
Log.d("liufan", "mExpandedHeight: " + mExpandedHeight);
Log.d("liufan", "Stack: " + e);

你可能感兴趣的:(android,framework)