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

实惠网站建设聊城网站建设有限公司

实惠网站建设,聊城网站建设有限公司,网站主服务器ip地址,电子商务营销手段有哪些需求#xff1a;在11.0在定制化系统中#xff0c;默认是没有开机铃声的#xff0c;有客户提出需要要添加开机铃声#xff0c;所以为了完成需求#xff0c;就来实现这一个功能关于开机铃声 都是在bootanimation_main.cpp 这里面负责管理。添加添加开机铃声的核心类framewor…需求在11.0在定制化系统中默认是没有开机铃声的有客户提出需要要添加开机铃声所以为了完成需求就来实现这一个功能关于开机铃声 都是在bootanimation_main.cpp 这里面负责管理。添加添加开机铃声的核心类frameworks\base\cmds\bootanimation\bootanimation_main.cpp frameworks\base\cmds\bootanimation\BootAnimation.cpp添加开机铃声的核心功能分析和实现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) {spProcessState proc(ProcessState::self());ProcessState::self()-startThreadPool();// create the boot animation object (may take up to 200ms for 2MB zip)#ifdef BOOTANIMATION_EXT spBootAnimation boot new BootAnimation(audioplay::createAnimationCallbacks(),true); #else spBootAnimation 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.cppstatic 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 its not present, default to allowed. if (!property_get_bool(PLAY_SOUND_PROP_NAME, 1)) {return false; }// Dont 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.hkea.cn/news/14398970/

相关文章:

  • 中国建设业管理协会网站2022手机能看的你们知道
  • 巴南城乡建设网站朋友圈营销广告
  • wordpress站内跳转中牟建设局网站
  • 武陟县住房和城乡建设局网站彩票网站怎么样建设
  • 图片优化网站成都网站推广营销微信
  • 网站建设的基本流程图网站开发课程设计报告
  • 建设网站硬件怎么进行网站备案
  • 接网站开发私活如何签合同百度贴吧怎么发广告
  • 有空间站的国家wordpress产品模板
  • 建工网校app下载seo优化名词解释
  • 网站建设与管理好吗用照片做模板下载网站好
  • 网站备案号查询平台郸城网站建设
  • 福州网站建设推进百度竞价排名收费
  • 凡科网做的网站在百度上能找到吗wordpress文章驳回
  • 网站建设优化扬州套模板网站
  • 新开传奇手游发布网站做门户网站广告
  • 网站批量发布网站上传格式
  • x网站免费模板免费下载免费职业技能培训网站
  • 北京网站推广价格如何做彩票网站
  • 自己做免费手机网站吗商城网上购物
  • 网站主题怎么介绍伊利集团网站建设怎么样呢
  • 为什么用开源建站网站开发赚钱吗 知乎
  • 无备案网站广告如何做暴雪游戏代理最新消息
  • 电子商务网站建设程序应用题平台搭建一条龙
  • 郑州锐途网站建设wordpress代码生成器
  • 深圳平台网站建设鱼爪商标交易平台
  • 苏州市姑苏区建设局网站正规的跨境电商平台有哪些
  • 外文网站建设天津seo技术教程
  • it网站建设厦门网站建设方案
  • 二级域名建立网站公司百度网站怎么做