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

android 菜单不显示auto time zone菜单

packages\apps\Settings\res\xml\date_time_prefs.xml 

有对应的xml

packages\apps\Settings\src\com\android\settings\datetime\AutoTimeZonePreferenceController.java 

@Overridepublic boolean isAvailable() {if (mIsFromSUW) {return false;}TimeZoneCapabilities timeZoneCapabilities =getTimeZoneCapabilitiesAndConfig().getCapabilities();int capability = timeZoneCapabilities.getConfigureAutoDetectionEnabledCapability();// The preference only has two states: present and not present. The preference is never// present but disabled.if (capability == CAPABILITY_NOT_SUPPORTED|| capability == CAPABILITY_NOT_ALLOWED|| capability == CAPABILITY_NOT_APPLICABLE) {return false;} else if (capability == CAPABILITY_POSSESSED) {return true;} else {throw new IllegalStateException("Unknown capability=" + capability);}}

打印 日志发现,capability == CAPABILITY_NOT_SUPPORTED

查看哪里设置了CAPABILITY_NOT_SUPPORTED

frameworks\base\services\core\java\com\android\server\timezonedetector\ConfigurationInternal.java

  /** Returns true if the device supports any form of auto time zone detection. */public boolean isAutoDetectionSupported() {return mTelephonyDetectionSupported || mGeoDetectionSupported;}/** Returns true if the device supports telephony time zone detection. */public boolean isTelephonyDetectionSupported() {return mTelephonyDetectionSupported;}/** Returns true if the device supports geolocation time zone detection. */public boolean isGeoDetectionSupported() {return mGeoDetectionSupported;}

http://www.lryc.cn/news/455572.html

相关文章:

  • 51单片机的金属探测器【proteus仿真+程序+报告+原理图+演示视频】
  • 使用Spring Security实现用户-权限-资源的精细化控制
  • 动态规划10:174. 地下城游戏
  • 【数据结构】链表-1
  • Python进阶--正则表达式
  • 富格林:发现潜在欺诈安全交易
  • Linux复习--Linux服务管理类(SSH服务、DHCP+FTP、DNS服务、Apache服务、Nginx服务、HTTP状态码)
  • 如何用大模型来提升学习效率?
  • SQL进阶技巧:如何优雅求解指标累计去重问题?
  • 大数据毕业设计选题推荐-国产电影数据分析-Python数据可视化-Hive-Hadoop-Spark
  • Linux:无法为立即文档创建临时文件: 设备上没有空间
  • 【SQL】掌握SQL查询技巧:数据筛选与限制
  • 大学生社团活动系统小程序的设计
  • codetop标签双指针题目大全解析(三),双指针刷穿地心!!!!!
  • HarmonyOS应用六之应用程序进阶一
  • vue开发中变量第一次双向绑定无效,界面并没有变化,第二次则又好了。
  • C++基础(8)——string的相关面试题
  • 【Docker】06-DockerCompose
  • 代码随想录训练营Day27 | 77. 组合 | 216.组合总和III | 17.电话号码的字母组合
  • Linux文件重定向文件缓冲区
  • 训练贪吃蛇ai的后续记录
  • WPF 手撸插件 八 操作数据库一
  • 代数结构基础 - 离散数学系列(八)
  • 函数的arguments为什么不是数组?如何转化为数组?
  • Java之反射
  • 3dsMax添加天空盒
  • C语言的类型提升机制
  • Pandas和Seaborn数据可视化
  • 爬虫(Python版本)
  • 【分布式训练 debug】VS Code Debug 技巧:launch.json实用参数