登录
  • 欢迎访问Sharezer Blog

2017年07月的内容

Android

I420Frame转YuvImage

private YuvImage i420ToYuvImage(ByteBuffer[] yuvPlanes, int[] yuvStrides, int width, int height) { if (yuvStrides[0] != width) { return fastI420ToYuvImage(yuvPlanes, yuvStrides, width, height); } if (yuvStrides[1] != width / 2) { return fastI420ToYuvImage(yuvPlanes, yuvSt……继续阅读 »

Adb

通过adb获取task id

/** * 通过包名获取task id,不存在为-1 * * @param packageName * @return */ public int getTaskId(String packageName) { String result = execRootCmd("dumpsys activity | grep " + packageName); int start = result.indexOf("TaskRecord{"); if(start > 0){ int end = result……继续阅读 »