1 anroid 添加快关机动画
4.4.3 一些代码已经修改,所以如果使用的话,需要测试。
2 ramdisk.img 内容查看的方法
解压、修改Android的ramdisk.img的手动方法:
将ramdisk.img复制一份到任何其他目录下,将其名称改为ramdisk.img.gz,并使用命令
gunzip ramdisk.img.gz
然后新建一个文件夹,叫ramdisk吧,进入,输入命令
cpio -i -F ../ramdisk.img
这下,你就能看见并操作ramdisk里面的内容了。
根据自己的需要对里面的内容修改之后,可以使用下列命令重新打包成镜像
cpio -i -t -F ../ramdisk.img > list
cpio -o -H newc -O lk.img < list
当前目录下生成的lk.img就是我们的新镜像了。
3 单击statusBar中的亮度,以4.4.3原生代码为例子。切换几种亮度。PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
try {
int nowBrightnessValue = android.provider.Settings.System.getInt(mContext.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS);
int newBrightness = 0;
if (nowBrightnessValue
newBrightness = pm.getMinimumScreenBrightnessSetting();
} else if (nowBrightnessValue
newBrightness = pm.getDefaultScreenBrightnessSetting();
} else if (nowBrightnessValue
newBrightness = pm.getMaximumScreenBrightnessSetting();
}
android.provider.Settings.System.putInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, newBrightness);
} catch (Exception e) {
}
5 其他应用种调用statusbar,显示状态栏的通知。Object service = getSystemService("statusbar");
try {
Class> statusbarManager = Class.forName("android.app.StatusBarManager");
Method expand = null;
expand = statusbarManager.getMethod("expandNotificationsPanel");
expand.setAccessible(true);
expand.invoke(service);
} catch (Exception e) {
e.printStackTrace();
} catch (Error e) {
e.printStackTrace();
}
6 CTS 测试,怎样继续中断的测试,和完成后no run 或fail的。
http://blog.csdn.net/subsist/article/details/7209341