2015-08-09 Klaus Ma
What Is Google C++ Mocking Framework? When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A mock object implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods 继续阅读 »
2015-08-09 Klaus Ma
You can find recipes for using Google Mock here. If you haven't yet, please read the ForDummies document first to make sure you understand the basics. 继续阅读 »
2015-07-21 Jason Liao
click here! I rewrite all the demos with ES6, some note here, source code here 继续阅读 »
2015-06-07 Jason Liao
Installation npm install express Usage ```javascript var express = require('express'); var app = express(); 继续阅读 »
2016-08-24 Klaus Ma
When looking at container orchestration platforms, open-source communities have produced a number of viable options including Kubernetes, Marathon-Mesos, or Docker Swarm. Kubernetes stands out as a popular choice amongst many users looking to run cloud-native on-line workloads. It has built-in support for a number of u 继续阅读 »
2015-03-21 Roger
最近由于工作上的需要,研究了一下framework层面的东西。收获良多,感受颇深啊。 在 设置->安全 中选择屏幕锁定,选择屏幕锁定方式为密码,然后勾选显示密码选项,此时应该在输入密码时,先显示输入的密码,过1.5S后将变为小圆点,若取消显示密码则输入直接为小圆点。 而由于“前人”对锁屏的改动造成取消显示密码后,还是先显示密码才跳为小圆点,这是我要解决的BUG。 研究后发现“前人”将 Keyguard 中 com.android.keyguard.KeyguardPasswordView 类 106 行改变了Textview的inputtype,将其恢复后BUG得以解决。 Why?我一头雾水,甚至都不知道是在哪把输入的字符变 继续阅读 »
2015-08-14 Roger
最近研究了一下andorid的启动过程,记录一点心得. 学习资料主要为这两篇博客: Android Framework启动流程分析 Android启动过程深入解析,感谢博主. 继续阅读 »
2018-10-17 Roger
Android P Notification 那些你不知道的坑 Android Pie 已经发布许久,相信大家已经做过了 Android P 版本的适配,如果不升级 Target SDK 来说的话,问题不大,基本没有什么工作量。但若是需要升级 Target SDK 到 28 的话,如果是 MESSAGE 的类型的 Notification 是有一些官方文档没提到的坑,在这总结一下: 继续阅读 »
2016-03-05 Roger
最近工作上遇到了广播接受不到的问题,查看了《Android 开发艺术探索》一书中关于广播的发送和接受的章节(P356-P362)。其中(P358)介绍了从Android 3.1 之后广播的一些区别 。 从 Android 3.1 开始,系统为所有的广播都默认添加了FLAG_EXCLUDE_STOPPED_PACKAGES 标志。所有处于停止状态的应用将无法接受到该标志的广播。注意,只有两种情况下应用才会处于停止状态: 继续阅读 »
2017-09-18 Roger
Android 追加流生成 Mp4 文件技术方案(支持中断继续生成) 背景 Android 中 Mp4 文件的生成主要是通过 Mediacodec 将摄像头采集到的视频从 YUV 格式转成 h264 ,再通过 MediaMuxer 将 h264 的视频流生成 mp4 文件,这个过程就不在赘述了, Google 一搜一大把,其中需要注意的是在将 YUV 数据送入 Mediacodec 中之前需要将 YUV 格式从 NV21 转换成编码器能接收的 I420 格式,建议这个过程使用 JNI 来提高效率, java 的实现方式可以参考一下方法: 继续阅读 »