zoukankan      html  css  js  c++  java
  • android4.0.4 系统默认值的修改

    android4.0.4 系统默认值的修改  【设置-》SIM卡管理-》卡(1/2)代表色/名字/本机号-》本机号显示,修改默认为后四位】  frameworks\base\core\java\android\provider\Telephony.java      public&nbspstatic&nbspfinal&nbspint&nbspDISLPAY_NUMBER_DEFAULT =&nbspDISPLAY_NUMBER_LAST; 【设置-》SIM卡管理-》默认SIM卡-》数据连接-》点击SIM卡时,在弹出的提示框标题中加入字符提示】  frameworks\base\packages\SystemUI\res\values-zh-rCN\strings.xml packages\apps\Settings\res\values-zh-rCN\strings.xml packages\apps\Settings\res\values-zh-rTW\strings.xml 修改如下字符串:     <string&nbspname="data_connection_service">数据连接-打开产生流量费用</string>  【设置-》存储-》首选安装位置-》修改默认为SD卡】  frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java  函数private&nbspvoid&nbsploadSystemSettings(SQLiteDatabase&nbspdb)中    loadSetting(stmt,&nbspSettings.Secure.DEFAULT_INSTALL_LOCATION,  PackageHelper.APP_INSTALL_AUTO); 改为   loadSetting(stmt,&nbspSettings.Secure.DEFAULT_INSTALL_LOCATION,  PackageHelper.APP_INSTALL_EXTERNAL);  【设置-》位置服务-》GPS卫星,修改默认为关闭】  frameworks\base\packages\SettingsProvider\res\values\defaults.xml   <string&nbspname="def_location_providers_allowed" 

    translatable="false">gps</string> 改为     <string&nbspname="def_location_providers_allowed" translatable="false"></string>  【设置-》日期和时间-》自动确定日期和时间,修改默认为关闭】 frameworks\base\packages\SettingsProvider\res\values\defaults.xml     <bool&nbspname="def_auto_time">false</bool> 【设置-》日期和时间-》自动确定时区,修改默认为关闭】  frameworks\base\packages\SettingsProvider\res\values\defaults.xml   <bool&nbspname="def_auto_time_zone">false</bool> 【设置-》日期和时间-》使用24小时格式,修改默认为打开】 frameworks\base\core\java\android\text\format\DateFormat.java 在该文件中下面的代码:  ?                  public&nbspstatic&nbspboolean&nbspis24HourFormat(Context&nbspcontext) {  String value = Settings.System.getString(context.getContentResolver(),  Settings.System.TIME_12_24);  if (value ==&nbspnull) {  Locale&nbsplocale =&nbspcontext.getResources().getConfiguration().locale;  synchronized (sLocaleLock) {  if (sIs24HourLocale !=&nbspnull &&&nbspsIs24HourLocale.equals(locale)) {  return&nbspsIs24Hour;  }  }  java.text.DateFormat&nbspnatural =  java.text.DateFormat.getTimeInstance(  java.text.DateFormat.LONG,&nbsplocale);  if (natural&nbspinstanceof&nbspSimpleDateFormat) {  SimpleDateFormat&nbspsdf = (SimpleDateFormat)&nbspnatural;  String&nbsppattern =&nbspsdf.toPattern();  if (pattern.indexOf('H') >=&nbsp0) {  

                          value = "24";  }&nbspelse {  value = "12";  }  }&nbspelse {  value = "12";  }  synchronized (sLocaleLock) {  sIs24HourLocale =&nbsplocale;  sIs24Hour = !value.equals("12");  }  }  boolean&nbspb24 = !(value ==&nbspnull ||&nbspvalue.equals("12"));  return&nbspb24;  } 改为                 public&nbspstatic&nbspboolean&nbspis24HourFormat(Context&nbspcontext) {  String value = Settings.System.getString(context.getContentResolver(),  Settings.System.TIME_12_24);  if (value ==&nbspnull) {  Settings.System.putString(context.getContentResolver(),  Settings.System.TIME_12_24,"24");  value = "24";  }  boolean&nbspb24 = !(value ==&nbspnull ||&nbspvalue.equals("12"));  return&nbspb24;  } 【设置-》开发人员选项-》USB调试,修改默认为关闭】  packages\apps\Provision\src\com\android\provision\DefaultActivity.java  在该文件中加入下面的代码: 

    android4.0.4 系统默认值的修改  【设置-》SIM卡管理-》卡(1/2)代表色/名字/本机号-》本机号显示,修改默认为后四位】  frameworks\base\core\java\android\provider\Telephony.java      public&nbspstatic&nbspfinal&nbspint&nbspDISLPAY_NUMBER_DEFAULT =&nbspDISPLAY_NUMBER_LAST; 【设置-》SIM卡管理-》默认SIM卡-》数据连接-》点击SIM卡时,在弹出的提示框标题中加入字符提示】  frameworks\base\packages\SystemUI\res\values-zh-rCN\strings.xml packages\apps\Settings\res\values-zh-rCN\strings.xml packages\apps\Settings\res\values-zh-rTW\strings.xml 修改如下字符串:     <string&nbspname="data_connection_service">数据连接-打开产生流量费用</string>  【设置-》存储-》首选安装位置-》修改默认为SD卡】  frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java  函数private&nbspvoid&nbsploadSystemSettings(SQLiteDatabase&nbspdb)中    loadSetting(stmt,&nbspSettings.Secure.DEFAULT_INSTALL_LOCATION,  PackageHelper.APP_INSTALL_AUTO); 改为   loadSetting(stmt,&nbspSettings.Secure.DEFAULT_INSTALL_LOCATION,  PackageHelper.APP_INSTALL_EXTERNAL);  【设置-》位置服务-》GPS卫星,修改默认为关闭】  frameworks\base\packages\SettingsProvider\res\values\defaults.xml   <string&nbspname="def_location_providers_allowed" 

    translatable="false">gps</string> 改为     <string&nbspname="def_location_providers_allowed" translatable="false"></string>  【设置-》日期和时间-》自动确定日期和时间,修改默认为关闭】 frameworks\base\packages\SettingsProvider\res\values\defaults.xml     <bool&nbspname="def_auto_time">false</bool> 【设置-》日期和时间-》自动确定时区,修改默认为关闭】  frameworks\base\packages\SettingsProvider\res\values\defaults.xml   <bool&nbspname="def_auto_time_zone">false</bool> 【设置-》日期和时间-》使用24小时格式,修改默认为打开】 frameworks\base\core\java\android\text\format\DateFormat.java 在该文件中下面的代码:  ?                  public&nbspstatic&nbspboolean&nbspis24HourFormat(Context&nbspcontext) {  String value = Settings.System.getString(context.getContentResolver(),  Settings.System.TIME_12_24);  if (value ==&nbspnull) {  Locale&nbsplocale =&nbspcontext.getResources().getConfiguration().locale;  synchronized (sLocaleLock) {  if (sIs24HourLocale !=&nbspnull &&&nbspsIs24HourLocale.equals(locale)) {  return&nbspsIs24Hour;  }  }  java.text.DateFormat&nbspnatural =  java.text.DateFormat.getTimeInstance(  java.text.DateFormat.LONG,&nbsplocale);  if (natural&nbspinstanceof&nbspSimpleDateFormat) {  SimpleDateFormat&nbspsdf = (SimpleDateFormat)&nbspnatural;  String&nbsppattern =&nbspsdf.toPattern();  if (pattern.indexOf('H') >=&nbsp0) {  

                          value = "24";  }&nbspelse {  value = "12";  }  }&nbspelse {  value = "12";  }  synchronized (sLocaleLock) {  sIs24HourLocale =&nbsplocale;  sIs24Hour = !value.equals("12");  }  }  boolean&nbspb24 = !(value ==&nbspnull ||&nbspvalue.equals("12"));  return&nbspb24;  } 改为                 public&nbspstatic&nbspboolean&nbspis24HourFormat(Context&nbspcontext) {  String value = Settings.System.getString(context.getContentResolver(),  Settings.System.TIME_12_24);  if (value ==&nbspnull) {  Settings.System.putString(context.getContentResolver(),  Settings.System.TIME_12_24,"24");  value = "24";  }  boolean&nbspb24 = !(value ==&nbspnull ||&nbspvalue.equals("12"));  return&nbspb24;  } 【设置-》开发人员选项-》USB调试,修改默认为关闭】  packages\apps\Provision\src\com\android\provision\DefaultActivity.java  在该文件中加入下面的代码: 

    Settings.Secure.putInt(getContentResolver(), Settings.Secure.ADB_ENABLED,&nbsp0); 
    【设置-》开发人员选项-》允许模拟地点,修改默认为关闭】 
    frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java 将该文件中的如下代码: 
        //&nbspAllow&nbspmock&nbsplocations&nbspdefault,&nbspbased&nbspon&nbspbuild  loadSetting(stmt,&nbspSettings.Secure.ALLOW_MOCK_LOCATION,  "1".equals(SystemProperties.get("ro.allow.mock.location")) ?&nbsp1 :&nbsp0); 修改为: 
       //&nbspAllow&nbspmock&nbsplocations&nbspdefault,&nbspbased&nbspon&nbspbuild  loadSetting(stmt,&nbspSettings.Secure.ALLOW_MOCK_LOCATION,0); 【设置-》关于手机-》型号,修改默认值】 build\core\product_config.mk     ifndef&nbspPRODUCT_MODEL  PRODUCT_MODEL :=&nbspXXXXXX  endif 
    【设置-》关于手机-》版本号,修改默认值】 mediatek\config\common\ProjectConfig.mk  
     MTK_BUILD_VERNO =&nbspXXXXXX 

  • 相关阅读:
    java Activiti 工作流引擎 SSM 框架模块设计方案
    自定义表单 Flowable 工作流 Springboot vue.js 前后分离 跨域 有代码生成器
    数据库设计的十个最佳实践
    activiti 汉化 stencilset.json 文件内容
    JAVA oa 办公系统模块 设计方案
    java 考试系统 在线学习 视频直播 人脸识别 springboot框架 前后分离 PC和手机端
    集成 nacos注册中心配置使用
    “感恩节 ”怼记
    仓颉编程语言的一点期望
    关于System.out.println()与System.out.print("\n")的区别
  • 原文地址:https://www.cnblogs.com/maimai/p/3487858.html
Copyright © 2011-2022 走看看