當前位置: 首頁>>代碼示例>>Java>>正文


Java Debug.startMethodTracing方法代碼示例

本文整理匯總了Java中android.os.Debug.startMethodTracing方法的典型用法代碼示例。如果您正苦於以下問題:Java Debug.startMethodTracing方法的具體用法?Java Debug.startMethodTracing怎麽用?Java Debug.startMethodTracing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Debug的用法示例。


在下文中一共展示了Debug.startMethodTracing方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: start

import android.os.Debug; //導入方法依賴的package包/類
void start(int initialVelocity) {
    initialVelocity = modifyFlingInitialVelocity(initialVelocity);

    int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0;
    mLastFlingY = initialY;
    mScroller.fling(0, initialY, 0, initialVelocity,
            0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE);

    mTouchMode = TOUCH_MODE_FLING;
    post(this);

    if (PROFILE_FLINGING) {
        if (!mFlingProfilingStarted) {
            Debug.startMethodTracing("AbsListViewFling");
            mFlingProfilingStarted = true;
        }
    }
}
 
開發者ID:Shmilyz,項目名稱:Swap,代碼行數:19,代碼來源:PLA_AbsListView.java

示例2: start

import android.os.Debug; //導入方法依賴的package包/類
void start(int initialVelocity) {
    initialVelocity = modifyFlingInitialVelocity(initialVelocity);

    int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0;
    mLastFlingY = initialY;
    mScroller.fling(0, initialY, 0, initialVelocity, 0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE);

    if (DEBUG)
        Log.d(TAG, String.format("String Fling: [%d, %d] to [%d]", initialY, initialVelocity, mScroller.getFinalY()));

    mTouchMode = TOUCH_MODE_FLING;
    post(this);

    if (PROFILE_FLINGING) {
        if (!mFlingProfilingStarted) {
            Debug.startMethodTracing("AbsListViewFling");
            mFlingProfilingStarted = true;
        }
    }
}
 
開發者ID:ysYvonne,項目名稱:KitchenSecret_Android,代碼行數:21,代碼來源:PLA_AbsListView.java

示例3: startupStep2

import android.os.Debug; //導入方法依賴的package包/類
void startupStep2()
{
  // ***** LOG FRAMEWORK
  TDLog.setLogTarget();
  TDLog.loadLogPreferences( mPrefs );

  mData.compileStatements();

  PtCmapActivity.setMap( mPrefs.getString( "DISTOX_PT_CMAP", null ) );

  TDSetting.loadSecondaryPreferences( this, mPrefs );
  checkAutoPairing();

  if ( TDLog.LOG_DEBUG ) {
    isTracing = true;
    Debug.startMethodTracing("DISTOX");
  }

  mPrefs.registerOnSharedPreferenceChangeListener( this );
  // TDLog.Debug("ready");
}
 
開發者ID:marcocorvi,項目名稱:topodroid,代碼行數:22,代碼來源:TopoDroidApp.java

示例4: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
	resetPattern();
	final float x = event.getX();
	final float y = event.getY();
	final Cell hitCell = detectAndAddHit(x, y);
	if (hitCell != null) {
		mPatternInProgress = true;
		mPatternDisplayMode = DisplayMode.Right;
		notifyPatternStarted();
	} else {
		mPatternInProgress = false;
		notifyPatternCleared();
	}
	if (hitCell != null) {
		invalidate();
	}
	mInProgressX = x;
	mInProgressY = y;
	if (PROFILE_DRAWING) {
		if (!mDrawingProfilingStarted) {
			Debug.startMethodTracing("LockPatternDrawing");
			mDrawingProfilingStarted = true;
		}
	}
}
 
開發者ID:androidertc,項目名稱:iLocker,代碼行數:26,代碼來源:LockCPicturePatternView.java

示例5: onCreate

import android.os.Debug; //導入方法依賴的package包/類
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mCtx = MainMvpActivity.this;
        initDatas();

        Debug.startMethodTracing("traceFile");
        // 自行維護觀察者關係,跟隨生命周期取消觀察
//        onInitView();
        Debug.stopMethodTracing();

        // 第一種寫法:直接Post, 線程回調後不一定達成懶加載
//        new MyBackTask().start();

        // 第二種寫法:直接PostDelay DEALY_TIME比較難控製.
//        mainHandler.postDelayed(new MyBackTask(), DEALY_TIME);

        /**
         * 第三種寫法:利用DecorView內部維護的Looper時機,優化的DelayLoad,在onResume之後回調
         * 需要使用本地handler進行承接,注意post和sendMessage方式在線程調度上的區別
         */
        getWindow().getDecorView().post(new Runnable() {
            @Override
            public void run() {
                Log.d(TAG, "getDecorView.post: currentThread-> " + Thread.currentThread().getName());
                // 懶加載3.1:-》main Thread
//                mainHandler.post(new MyBackTask());
                // 懶加載3.2:-》work Thread
                mainHandler.obtainMessage(MSG_BACK_TASK).sendToTarget();


            }
        });
    }
 
開發者ID:BlueYangDroid,項目名稱:MvpPlus,代碼行數:35,代碼來源:MainMvpActivity.java

示例6: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
    resetPattern();
    float x = event.getX();
    float y = event.getY();
    Dot hitDot = detectAndAddHit(x, y);
    if (hitDot != null) {
        mPatternInProgress = true;
        mPatternViewMode = CORRECT;
        notifyPatternStarted();
    } else {
        mPatternInProgress = false;
        notifyPatternCleared();
    }
    if (hitDot != null) {
        float startX = getCenterXForColumn(hitDot.mColumn);
        float startY = getCenterYForRow(hitDot.mRow);

        float widthOffset = mViewWidth / 2f;
        float heightOffset = mViewHeight / 2f;

        invalidate((int) (startX - widthOffset),
                (int) (startY - heightOffset),
                (int) (startX + widthOffset), (int) (startY + heightOffset));
    }
    mInProgressX = x;
    mInProgressY = y;
    if (PROFILE_DRAWING) {
        if (!mDrawingProfilingStarted) {
            Debug.startMethodTracing("PatternLockDrawing");
            mDrawingProfilingStarted = true;
        }
    }
}
 
開發者ID:aritraroy,項目名稱:PatternLockView,代碼行數:34,代碼來源:PatternLockView.java

示例7: startLogging

import android.os.Debug; //導入方法依賴的package包/類
@SuppressLint("NewApi")
private void startLogging() {
    if (getConfigBoolean("CAPTURE_NETLOG")) {
        mCronetEngine.startNetLogToFile(
                getFilesDir().getPath() + "/" + mName + ".json", false);
    }
    if (getConfigBoolean("CAPTURE_TRACE")) {
        Debug.startMethodTracing(getFilesDir().getPath() + "/" + mName + ".trace");
    } else if (getConfigBoolean("CAPTURE_SAMPLED_TRACE")) {
        Debug.startMethodTracingSampling(
                getFilesDir().getPath() + "/" + mName + ".trace", 8000000, 10);
    }
}
 
開發者ID:lizhangqu,項目名稱:chromium-net-for-android,代碼行數:14,代碼來源:CronetPerfTestActivity.java

示例8: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
    resetPattern();
    final float x = event.getX();
    final float y = event.getY();
    final Cell hitCell = detectAndAddHit(x, y);
    if (hitCell != null) {
        mPatternInProgress = true;
        mPatternDisplayMode = DisplayMode.Correct;
        notifyPatternStarted();
    } else {
        mPatternInProgress = false;
        notifyPatternCleared();
    }
    if (hitCell != null) {
        final float startX = getCenterXForColumn(hitCell.column);
        final float startY = getCenterYForRow(hitCell.row);

        final float widthOffset = mSquareWidth / 2f;
        final float heightOffset = mSquareHeight / 2f;

        invalidate((int) (startX - widthOffset), (int) (startY - heightOffset),
                (int) (startX + widthOffset), (int) (startY + heightOffset));
    }
    mInProgressX = x;
    mInProgressY = y;
    if (PROFILE_DRAWING) {
        if (!mDrawingProfilingStarted) {
            Debug.startMethodTracing("LockPatternDrawing");
            mDrawingProfilingStarted = true;
        }
    }
}
 
開發者ID:SShineTeam,項目名稱:Huochexing12306,代碼行數:33,代碼來源:LockPatternView.java

示例9: startTracing

import android.os.Debug; //導入方法依賴的package包/類
public static void startTracing(String name) {
    if (!debug)
        return;
    if (!TextUtils.isEmpty(name))
        Debug.startMethodTracing(name);
    tracingName = name;
    tracingStartTime = System.currentTimeMillis();
}
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:9,代碼來源:L.java

示例10: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
    resetPattern();
    final float x = event.getX();
    final float y = event.getY();
    final Cell hitCell = detectAndAddHit(x, y);
    if (hitCell != null) {
        mPatternInProgress = true;
        mPatternDisplayMode = DisplayMode.Correct;
        notifyPatternStarted();
    } else if (mPatternInProgress) {
        mPatternInProgress = false;
        notifyPatternCleared();
    }
    if (hitCell != null) {
        final float startX = getCenterXForColumn(hitCell.column);
        final float startY = getCenterYForRow(hitCell.row);

        final float widthOffset = mSquareWidth / 2f;
        final float heightOffset = mSquareHeight / 2f;

        invalidate((int) (startX - widthOffset),
                (int) (startY - heightOffset),
                (int) (startX + widthOffset), (int) (startY + heightOffset));
    }
    mInProgressX = x;
    mInProgressY = y;
    if (PROFILE_DRAWING) {
        if (!mDrawingProfilingStarted) {
            Debug.startMethodTracing("LockPatternDrawing");
            mDrawingProfilingStarted = true;
        }
    }
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:34,代碼來源:LockPatternViewEx.java

示例11: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
    resetPattern();
    final float x = event.getX();
    final float y = event.getY();
    final Cell hitCell = detectAndAddHit(x, y);
    if (hitCell != null) {
        mPatternInProgress = true;
        mPatternDisplayMode = DisplayMode.Correct;
        notifyPatternStarted();
    } else if (mPatternInProgress) {
        mPatternInProgress = false;
        notifyPatternCleared();
    }
    if (hitCell != null) {
        final float startX = getCenterXForColumn(hitCell.column);
        final float startY = getCenterYForRow(hitCell.row);

        final float widthOffset = mSquareWidth / 2f;
        final float heightOffset = mSquareHeight / 2f;

        invalidate((int) (startX - widthOffset), (int) (startY - heightOffset),
                (int) (startX + widthOffset), (int) (startY + heightOffset));
    }
    mInProgressX = x;
    mInProgressY = y;
    if (PROFILE_DRAWING) {
        if (!mDrawingProfilingStarted) {
            Debug.startMethodTracing("LockPatternDrawing");
            mDrawingProfilingStarted = true;
        }
    }
}
 
開發者ID:jiangzehui,項目名稱:xmpp,代碼行數:33,代碼來源:LockPatternView.java

示例12: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
    resetPattern();
    final float x = event.getX();
    final float y = event.getY();
    final Cell hitCell = detectAndAddHit(x, y);
    if (hitCell != null) {
        mPatternInProgress = true;
        mPatternDisplayMode = DisplayMode.Correct;
        notifyPatternStarted();
    } else {
        /*
         * Original source check for mPatternInProgress == true first before
         * calling this block. But if we do that, there will be nothing
         * happened when the user taps at empty area and releases the
         * finger. We want the pattern to be reset and the message will be
         * updated after the user did that.
         */
        mPatternInProgress = false;
        notifyPatternCleared();
    }
    if (hitCell != null) {
        final float startX = getCenterXForColumn(hitCell.column);
        final float startY = getCenterYForRow(hitCell.row);

        final float widthOffset = mSquareWidth / 2f;
        final float heightOffset = mSquareHeight / 2f;

        invalidate((int) (startX - widthOffset),
                (int) (startY - heightOffset),
                (int) (startX + widthOffset), (int) (startY + heightOffset));
    }
    mInProgressX = x;
    mInProgressY = y;
    if (PROFILE_DRAWING) {
        if (!mDrawingProfilingStarted) {
            Debug.startMethodTracing("LockPatternDrawing");
            mDrawingProfilingStarted = true;
        }
    }
}
 
開發者ID:sathishmscict,項目名稱:Materila-Pattern-Lockview,代碼行數:41,代碼來源:MaterialLockView.java

示例13: handleActionDown

import android.os.Debug; //導入方法依賴的package包/類
private void handleActionDown(MotionEvent event) {
    clearPattern();

    final float x = event.getX();
    final float y = event.getY();
    final Cell hitCell = detectAndAddHit(x, y);

    if (hitCell != null) {
        mPatternInProgress = true;
        mPatternDisplayMode = DisplayMode.Correct;
        notifyPatternStarted();
    } else {
        mPatternInProgress = false;
        notifyPatternCleared();
    }

    if (hitCell != null) {
        final float startX = getCenterXForColumn(hitCell.column);
        final float startY = getCenterYForRow(hitCell.row);
        final float widthOffset = mSquareWidth / 2f;
        final float heightOffset = mSquareHeight / 2f;

        invalidate((int) (startX - widthOffset), (int) (startY - heightOffset), (int) (startX + widthOffset), (int) (startY + heightOffset));
    }
    mInProgressX = x;
    mInProgressY = y;

    if (PROFILE_DRAWING) {
        if (!mDrawingProfilingStarted) {
            Debug.startMethodTracing("LockPatternDrawing");
            mDrawingProfilingStarted = true;
        }
    }
}
 
開發者ID:michaelbel,項目名稱:material,代碼行數:35,代碼來源:PatternView.java

示例14: onCreate

import android.os.Debug; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Debug.startMethodTracing("main");
    setContentView(R.layout.act_main);
    bindViews();
    initData();
    initFragments();
}
 
開發者ID:a371166028,項目名稱:likequanmintv,代碼行數:11,代碼來源:MainActivity.java

示例15: onMenuItemSelected

import android.os.Debug; //導入方法依賴的package包/類
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
    Intent i;
    switch(item.getItemId()) {
    case CHANGE_LEVEL_ID:
        i = new Intent(this, LevelSelectActivity.class);
        startActivityForResult(i, ACTIVITY_CHANGE_LEVELS);
        return true;
    case TEST_ANIMATION_ID:
        i = new Intent(this, AnimationPlayerActivity.class);
        i.putExtra("animation", AnimationPlayerActivity.ROKUDOU_ENDING);
        startActivity(i);
        return true;
    case TEST_DIARY_ID:
        i = new Intent(this, DiaryActivity.class);
        i.putExtra("text", R.string.Diary10);
        startActivity(i);
        return true;
    case METHOD_TRACING_ID:
        if (mMethodTracing) {
            Debug.stopMethodTracing();
        } else {
            Debug.startMethodTracing("andou");
        }
        mMethodTracing = !mMethodTracing;
        return true;
    }
    
    return super.onMenuItemSelected(featureId, item);
}
 
開發者ID:gogas,項目名稱:replicaisland,代碼行數:31,代碼來源:AndouKun.java


注:本文中的android.os.Debug.startMethodTracing方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。