当前位置: 首页 > news >正文

石家庄做网站备案有哪些公司网站如何做QQ登录

石家庄做网站备案有哪些公司,网站如何做QQ登录,新安商品混泥土网站建设,wordpress php版本号需求:在11.0在定制化系统中,默认是没有开机铃声的,有客户提出需要要添加开机铃声,所以为了完成需求,就来实现这一个功能关于开机铃声 都是在bootanimation_main.cpp 这里面负责管理。添加添加开机铃声的核心类framewor…

需求:在11.0在定制化系统中,默认是没有开机铃声的,有客户提出需要要添加开机铃声,所以为了完成需求,就来实现这一个功能关于开机铃声 都是在bootanimation_main.cpp 这里面负责管理。

  1. 添加添加开机铃声的核心类

frameworks\base\cmds\bootanimation\bootanimation_main.cpp
frameworks\base\cmds\bootanimation\BootAnimation.cpp
  1. 添加开机铃声的核心功能分析和实现

2.1 bootanimation_main.cpp开机动画处理分析

frameworks\base\cmds\bootanimation\bootanimation_main.cpp
int main()
{
setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_DISPLAY);
bool noBootAnimation = bootAnimationDisabled();
ALOGI_IF(noBootAnimation,  "boot animation disabled");
if (!noBootAnimation) {sp<ProcessState> proc(ProcessState::self());ProcessState::self()->startThreadPool();// create the boot animation object (may take up to 200ms for 2MB zip)#ifdef BOOTANIMATION_EXT
sp<BootAnimation> boot = new BootAnimation(audioplay::createAnimationCallbacks(),true);
#else
sp<BootAnimation> boot = new BootAnimation(audioplay::createAnimationCallbacks());
#endif
waitForSurfaceFlinger();boot->run("BootAnimation", PRIORITY_DISPLAY);ALOGV("Boot animation set up. Joining pool.");IPCThreadState::self()->joinThreadPool();
}
return 0;}

从代码中可以看到 是由BootAnimation来处理 开机铃声

frameworks\base\cmds\bootanimation\BootAnimation.cpp

static const char OEM_BOOTSOUND_FILE[] = "/oem/media/bootsound.mp3";
static const char PRODUCT_BOOTSOUND_FILE[] = "/product/media/bootsound.mp3";
static const char SYSTEM_BOOTSOUND_FILE[] = "/system/media/bootsound.mp3";
static const char OEM_SHUTDOWNSOUND_FILE[] = "/oem/media/shutdownsound.mp3";
static const char PRODUCT_SHUTDOWNSOUND_FILE[] = "/product/media/shutdownsound.mp3";
static const char SYSTEM_SHUTDOWNSOUND_FILE[] = "/system/media/shutdownsound.mp3";
void BootAnimation::findBootAnimationFile() {
// If the device has encryption turned on or is in process
// of being encrypted we show the encrypted boot animation.
char decrypt[PROPERTY_VALUE_MAX];
property_get("vold.decrypt", decrypt, "");
bool encryptedAnimation = atoi(decrypt) != 0 ||!strcmp("trigger_restart_min_framework", decrypt);if (!mShuttingDown && encryptedAnimation) {static const char* encryptedBootFiles[] ={PRODUCT_ENCRYPTED_BOOTANIMATION_FILE, SYSTEM_ENCRYPTED_BOOTANIMATION_FILE};for (const char* f : encryptedBootFiles) {if (access(f, R_OK) == 0) {mZipFileName = f;return;}}
}const bool playDarkAnim = android::base::GetIntProperty("ro.boot.theme", 0) == 1;
static const char* bootFiles[] ={APEX_BOOTANIMATION_FILE, playDarkAnim ? PRODUCT_BOOTANIMATION_DARK_FILE : PRODUCT_BOOTANIMATION_FILE,OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE};
static const char* shutdownFiles[] ={PRODUCT_SHUTDOWNANIMATION_FILE, OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE, ""};for (const char* f : (!mShuttingDown ? bootFiles : shutdownFiles)) {if (access(f, R_OK) == 0) {mZipFileName = f;#ifdef BOOTANIMATION_EXT
break;
#else
return;
#endif
}
}
#ifdef BOOTANIMATION_EXT
static const char* bootSoundFiles[] =
{PRODUCT_BOOTSOUND_FILE, OEM_BOOTSOUND_FILE, SYSTEM_BOOTSOUND_FILE};
static const char* shutdownSoundFiles[] =
{PRODUCT_SHUTDOWNSOUND_FILE, OEM_SHUTDOWNSOUND_FILE, SYSTEM_SHUTDOWNSOUND_FILE};
for (const char* f : (!mShuttingDown ? bootSoundFiles : shutdownSoundFiles)) {
if (access(f, R_OK) == 0) {
mSoundFileName = f;
SLOGD("mSoundFileName string is %s,length is %zu",mSoundFileName.string(),mSoundFileName.length());
return;
}
}
SLOGD("set mSoundFileName null");
mSoundFileName = "";
#endif
return;}

获取播放开机音乐路径:PRODUCT_BOOTSOUND_FILE, OEM_BOOTSOUND_FILE, SYSTEM_BOOTSOUND_FILE 中的一个

所以系统默认的路径为SYSTEM_BOOTSOUND_FILE 即为 /system/media/bootsound.mp3

也就是说和开机动画放在同一个目录就可

persist.sys.bootanim.play_sound 属性的设置

static const char PLAY_SOUND_PROP_NAME[] = "persist.sys.bootanim.play_sound";
bool BootAnimation::playSoundsAllowed() {
// Compatible with Android Things
// only system called will play sounds in system/media/
if (!mSystemCalled) {
return false;
}
// Read the system property to see if we should play the sound.
// If it's not present, default to allowed.
if (!property_get_bool(PLAY_SOUND_PROP_NAME, 1)) {return false;
}// Don't play sounds if this is a reboot due to an error.
char bootreason[PROPERTY_VALUE_MAX];
if (property_get(BOOTREASON_PROP_NAME, bootreason, nullptr) > 0) {for (const auto& str : PLAY_SOUND_BOOTREASON_BLACKLIST) {if (strcasecmp(str.c_str(), bootreason) == 0) {return false;}}
}
return true;}

是否允许播放中 会判断persist.sys.bootanim.play_sound 是否为1 如果不能播放 请查看这个值是否为1

开机铃声添加路径为:

路径:device/sprd/common/customer/system/media/bootsound.mp3

和开机动画放在同一个目录下就可以了

http://www.yayakq.cn/news/441283/

相关文章:

  • 成都网站制作创新互联wordpress版本不一致如何更换空间
  • 科技网站的一些案例展示建设工程公司名称大全
  • 做qq头像的网站有哪些商务网站前台模板
  • 网站建设维护多少钱周口搜索引擎优化
  • 廖雪峰的网站怎么做的株洲的网络营销公司有哪些
  • 元器件网站开发客户wordpress的交叉表单
  • 已备案网站新增接入广告软文范例大全100字
  • 服务器网站后台登陆密码黄框显示软件开发和编程的区别
  • 定制网站建设哪家便宜图片变视频制作软件
  • 长沙品牌网站制作服务报价成都百度推广公司地址
  • 公司一个人做网站网络营销实验报告
  • 什么是行业网站?自己做网站怎么弄
  • 广州网站设计服务制作网页的网站推荐
  • 网站域名重定向怎么做扬州工程信息网
  • 哪个网站做系统好做的比较好的二手交易网站有哪些
  • 传统建筑网站建设部网站怎么查岗位人员
  • 网站开发需不需要考研网站开发用到的技术
  • 网站开发工程师 北大青鸟手机wap网站开发与设计
  • 政法网站建设有哪些不足wordpress 安装后梅花
  • 网络科技公司 网站建设网站显示乱码怎么办
  • 台州做网站的公司有哪些公司wordpress笑话主题模板
  • 成功案例网站建设wordpress 源码剖析
  • 做竞价要会做网站吗采购平台官网
  • 织梦网站地图自动更新四线城市做网站建设怎么样
  • 广西河池住房和城乡建设厅网站福州省建设局网站
  • 做外贸网站要花多少钱wiki wordpress
  • 软件推广网站网络品牌公关
  • vs做网站怎么放视频登录手机wordpress
  • 做付费网站站长全自动年赚30万wordpress 内容居中
  • 宁波制作企业网站图们网络推广