当前位置: 首页>>代码示例>>Java>>正文


Java Debug.stopMethodTracing方法代码示例

本文整理汇总了Java中android.os.Debug.stopMethodTracing方法的典型用法代码示例。如果您正苦于以下问题:Java Debug.stopMethodTracing方法的具体用法?Java Debug.stopMethodTracing怎么用?Java Debug.stopMethodTracing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Debug的用法示例。


在下文中一共展示了Debug.stopMethodTracing方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hideWindow

import android.os.Debug; //导入方法依赖的package包/类
@Override
public void hideWindow() {
    LatinImeLogger.commit();
    onAutoCompletionStateChanged(false);

    if (TRACE)
        Debug.stopMethodTracing();
    if (mOptionsDialog != null && mOptionsDialog.isShowing()) {
        mOptionsDialog.dismiss();
        mOptionsDialog = null;
    }
    mWordToSuggestions.clear();
    mWordHistory.clear();
    super.hideWindow();
    TextEntryState.endSession();
}
 
开发者ID:klausw,项目名称:hackerskeyboard,代码行数:17,代码来源:LatinIME.java

示例2: runOneByOneTests

import android.os.Debug; //导入方法依赖的package包/类
protected void runOneByOneTests(List<T> list, int loadCount, int modifyCount) {
    dao.insertInTx(list);
    List<K> keys = new ArrayList<K>(loadCount);
    for (int i = 0; i < loadCount; i++) {
        keys.add(daoAccess.getKey(list.get(i)));
    }
    clearIdentityScopeIfAny();

    list = runLoadOneByOne(keys, "load-one-by-one-1");
    list = runLoadOneByOne(keys, "load-one-by-one-2");
    Debug.stopMethodTracing();

    dao.deleteAll();

    startClock("insert-one-by-one");
    for (int i = 0; i < modifyCount; i++) {
        dao.insert(list.get(i));
    }
    stopClock();

    startClock("update-one-by-one");
    for (int i = 0; i < modifyCount; i++) {
        dao.update(list.get(i));
    }
    stopClock();

    startClock("delete-one-by-one");
    for (int i = 0; i < modifyCount; i++) {
        dao.delete(list.get(i));
    }
    stopClock();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:33,代码来源:PerformanceTest.java

示例3: hideWindow

import android.os.Debug; //导入方法依赖的package包/类
@Override
public void hideWindow() {
    LatinImeLogger.commit();
    onAutoCompletionStateChanged(false);

    if (TRACE) Debug.stopMethodTracing();
    if (mOptionsDialog != null && mOptionsDialog.isShowing()) {
        mOptionsDialog.dismiss();
        mOptionsDialog = null;
    }
    mWordToSuggestions.clear();
    mWordHistory.clear();
    super.hideWindow();
    TextEntryState.endSession();
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:16,代码来源:KP2AKeyboard.java

示例4: 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

示例5: onTouchEvent

import android.os.Debug; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
    if (!mInputEnabled || !isEnabled()) {
        return false;
    }

    switch (event.getAction()) {
        case MotionEvent.ACTION_DOWN:
            handleActionDown(event);
            return true;
        case MotionEvent.ACTION_UP:
            handleActionUp(event);
            return true;
        case MotionEvent.ACTION_MOVE:
            handleActionMove(event);
            return true;
        case MotionEvent.ACTION_CANCEL:
            mPatternInProgress = false;
            resetPattern();
            notifyPatternCleared();

            if (PROFILE_DRAWING) {
                if (mDrawingProfilingStarted) {
                    Debug.stopMethodTracing();
                    mDrawingProfilingStarted = false;
                }
            }
            return true;
    }
    return false;
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:32,代码来源:PatternLockView.java

示例6: handleActionUp

import android.os.Debug; //导入方法依赖的package包/类
private void handleActionUp(MotionEvent event) {
    // Report pattern detected
    if (!mPattern.isEmpty()) {
        mPatternInProgress = false;
        cancelLineAnimations();
        notifyPatternDetected();
        invalidate();
    }
    if (PROFILE_DRAWING) {
        if (mDrawingProfilingStarted) {
            Debug.stopMethodTracing();
            mDrawingProfilingStarted = false;
        }
    }
}
 
开发者ID:aritraroy,项目名称:PatternLockView,代码行数:16,代码来源:PatternLockView.java

示例7: hideWindow

import android.os.Debug; //导入方法依赖的package包/类
@Override
public void hideWindow() {
    mKeyboardSwitcher.onHideWindow();

    if (TRACE) Debug.stopMethodTracing();
    if (isShowingOptionDialog()) {
        mOptionsDialog.dismiss();
        mOptionsDialog = null;
    }
    super.hideWindow();
}
 
开发者ID:rkkr,项目名称:simple-keyboard,代码行数:12,代码来源:LatinIME.java

示例8: stopLogging

import android.os.Debug; //导入方法依赖的package包/类
private void stopLogging() {
    if (getConfigBoolean("CAPTURE_NETLOG")) {
        mCronetEngine.stopNetLog();
    }
    if (getConfigBoolean("CAPTURE_TRACE") || getConfigBoolean("CAPTURE_SAMPLED_TRACE")) {
        Debug.stopMethodTracing();
    }
}
 
开发者ID:lizhangqu,项目名称:chromium-net-for-android,代码行数:9,代码来源:CronetPerfTestActivity.java

示例9: onTouchEvent

import android.os.Debug; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
    if (!mInputEnabled || !isEnabled()) {
        return false;
    }

    switch(event.getAction()) {
        case MotionEvent.ACTION_DOWN:
            handleActionDown(event);
            return true;
        case MotionEvent.ACTION_UP:
            handleActionUp(event);
            return true;
        case MotionEvent.ACTION_MOVE:
            handleActionMove(event);
            return true;
        case MotionEvent.ACTION_CANCEL:
            resetPattern();
            mPatternInProgress = false;
            notifyPatternCleared();
            if (PROFILE_DRAWING) {
                if (mDrawingProfilingStarted) {
                    Debug.stopMethodTracing();
                    mDrawingProfilingStarted = false;
                }
            }
            return true;
    }
    return false;
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:31,代码来源:LockPatternView.java

示例10: handleActionUp

import android.os.Debug; //导入方法依赖的package包/类
private void handleActionUp(MotionEvent event) {
    // report pattern detected
    if (!mPattern.isEmpty()) {
        mPatternInProgress = false;
        notifyPatternDetected();
        invalidate();
    }
    if (PROFILE_DRAWING) {
        if (mDrawingProfilingStarted) {
            Debug.stopMethodTracing();
            mDrawingProfilingStarted = false;
        }
    }
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:15,代码来源:LockPatternView.java

示例11: stopTracing

import android.os.Debug; //导入方法依赖的package包/类
public static void stopTracing() {
    if (!debug)
        return;

    long tracingStopTime = System.currentTimeMillis();

    if (!TextUtils.isEmpty(tracingName))
        Debug.stopMethodTracing();

    float ts = (tracingStopTime - tracingStartTime) / 1000f;
    L.d("Tracing Name: " + tracingName + " Consuming Time: " + ts + "s");
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:13,代码来源:L.java

示例12: onTouchEvent

import android.os.Debug; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
    if (!mInputEnabled || !isEnabled()) {
        return false;
    }

    switch (event.getAction()) {
        case MotionEvent.ACTION_DOWN:
            handleActionDown(event);
            return true;
        case MotionEvent.ACTION_UP:
            handleActionUp(event);
            return true;
        case MotionEvent.ACTION_MOVE:
            handleActionMove(event);
            return true;
        case MotionEvent.ACTION_CANCEL:
            if (mPatternInProgress) {
                mPatternInProgress = false;
                resetPattern();
                notifyPatternCleared();
            }
            if (PROFILE_DRAWING) {
                if (mDrawingProfilingStarted) {
                    Debug.stopMethodTracing();
                    mDrawingProfilingStarted = false;
                }
            }
            return true;
    }
    return false;
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:33,代码来源:LockPatternViewEx.java

示例13: handleActionUp

import android.os.Debug; //导入方法依赖的package包/类
private void handleActionUp(MotionEvent event) {
    // report pattern detected
    if (!mPattern.isEmpty()) {
        mPatternInProgress = false;
        cancelLineAnimations();
        notifyPatternDetected();
        invalidate();
    }
    if (PROFILE_DRAWING) {
        if (mDrawingProfilingStarted) {
            Debug.stopMethodTracing();
            mDrawingProfilingStarted = false;
        }
    }
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:16,代码来源:LockPatternViewEx.java

示例14: resetCurrentContext

import android.os.Debug; //导入方法依赖的package包/类
private void resetCurrentContext(@Nullable ReactContext reactContext) {
  if (mCurrentContext == reactContext) {
    // new context is the same as the old one - do nothing
    return;
  }

  // if currently profiling stop and write the profile file
  if (mIsCurrentlyProfiling) {
    mIsCurrentlyProfiling = false;
    String profileName = (Environment.getExternalStorageDirectory().getPath() +
        "/profile_" + mProfileIndex + ".json");
    mProfileIndex++;
    Debug.stopMethodTracing();
    mCurrentContext.getCatalystInstance().stopProfiler("profile", profileName);
  }

  mCurrentContext = reactContext;

  // Recreate debug overlay controller with new CatalystInstance object
  if (mDebugOverlayController != null) {
    mDebugOverlayController.setFpsDebugViewVisible(false);
  }
  if (reactContext != null) {
    mDebugOverlayController = new DebugOverlayController(reactContext);
  }

  if (mDevSettings.isHotModuleReplacementEnabled() && mCurrentContext != null) {
    try {
      URL sourceUrl = new URL(getSourceUrl());
      String path = sourceUrl.getPath().substring(1); // strip initial slash in path
      String host = sourceUrl.getHost();
      int port = sourceUrl.getPort();
      mCurrentContext.getJSModule(HMRClient.class).enable("android", path, host, port);
    } catch (MalformedURLException e) {
      showNewJavaError(e.getMessage(), e);
    }
  }

  reloadSettings();
}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:41,代码来源:DevSupportManagerImpl.java

示例15: onTouchEvent

import android.os.Debug; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
    if (!mInputEnabled || !isEnabled()) {
        return false;
    }

    switch(event.getAction()) {
        case MotionEvent.ACTION_DOWN:
            handleActionDown(event);
            return true;
        case MotionEvent.ACTION_UP:
            handleActionUp(event);
            return true;
        case MotionEvent.ACTION_MOVE:
            handleActionMove(event);
            return true;
        case MotionEvent.ACTION_CANCEL:
            if (mPatternInProgress) {
                mPatternInProgress = false;
                resetPattern();
                notifyPatternCleared();
            }
            if (PROFILE_DRAWING) {
                if (mDrawingProfilingStarted) {
                    Debug.stopMethodTracing();
                    mDrawingProfilingStarted = false;
                }
            }
            return true;
    }
    return false;
}
 
开发者ID:jiangzehui,项目名称:xmpp,代码行数:33,代码来源:LockPatternView.java


注:本文中的android.os.Debug.stopMethodTracing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。