本文整理匯總了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;
}
}
}
示例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;
}
}
}
示例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");
}
示例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;
}
}
}
示例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();
}
});
}
示例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;
}
}
}
示例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);
}
}
示例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;
}
}
}
示例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();
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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();
}
示例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);
}