I just want to use StrictMode.noteSlowCall . I don't know what to do. Developer site/androidxref don't have enough explanation.
Below is my code.
@Override
public void onCreate() {
StrictMode.ThreadPolicy.Builder builder = new StrictMode.ThreadPolicy.Builder();
builder.detectCustomSlowCalls();
builder.penaltyLog();
builder.penaltyDropBox();
builder.penaltyDialog();
builder.penaltyFlashScreen();
StrictMode.setThreadPolicy(builder.build());
below is other file...
public static BigInteger computeRecursivelyWithCache(int n)
{
StrictMode.noteSlowCall("jheeTest CustomSlowCall");
SparseArray<BigInteger> cache = new SparseArray<BigInteger>();
return computeRecursivelyWithCache(n);
}
OnClickListener mAboutKeyboardImageOnClickListener = new OnClickListener() {
@Override
public void onClick(View v) {
computeRecursivelyWithCache(5);
I've tried to these codes. But it doesn't work at all.Even I pressed the button, it doesn't appear on log file or dropbox. Can you tell me what the problem is?