android 帖子功能,anroid 各个功能的帖子 和代码片段

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值