当前位置: 首页>>代码示例>>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;未经允许,请勿转载。