android4.0.4 系统默认值的修改

【设置-》SIM卡管理-》卡(1/2)代表色/名字/本机号-》本机号显示,修改默认为后四位】

frameworks\base\core\java\android\provider\Telephony.java

?

1

public
static final int DISLPAY_NUMBER_DEFAULT = DISPLAY_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

修改如下字符串:

?

1

<string
name=
"data_connection_service" >数据连接-打开产生流量费用</string>

【设置-》存储-》首选安装位置-》修改默认为SD卡】

frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java

函数private void loadSystemSettings(SQLiteDatabase db)中

?

1

2

loadSetting(stmt,
Settings.Secure.DEFAULT_INSTALL_LOCATION,

         PackageHelper.APP_INSTALL_AUTO);

改为

?

1

2

loadSetting(stmt,
Settings.Secure.DEFAULT_INSTALL_LOCATION,

         PackageHelper.APP_INSTALL_EXTERNAL);

【设置-》位置服务-》GPS卫星,修改默认为关闭】

frameworks\base\packages\SettingsProvider\res\values\defaults.xml

?

1

<string
name=
"def_location_providers_allowed"

translatable=
"false" >gps</string>

改为

?

1

<string
name=
"def_location_providers_allowed"

translatable=
"false" ></string>

设置-》日期和时间-》自动确定日期和时间,修改默认为关闭

frameworks\base\packages\SettingsProvider\res\values\defaults.xml

?

1

<bool
name=
"def_auto_time" > false </bool>

设置-》日期和时间-》自动确定时区,修改默认为关闭

frameworks\base\packages\SettingsProvider\res\values\defaults.xml

?

1

<bool
name=
"def_auto_time_zone" > false </bool>

设置-》日期和时间-》使用24小时格式,修改默认为打开

frameworks\base\core\java\android\text\format\DateFormat.java

在该文件中下面的代码:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

public
static boolean is24HourFormat(Context context) {

     String
value = Settings.System.getString(context.getContentResolver(),

             Settings.System.TIME_12_24);

 

     if

(value ==
null )
{

         Locale
locale = context.getResources().getConfiguration().locale;

 

         synchronized
(sLocaleLock) {

             if

(sIs24HourLocale !=
null

&& sIs24HourLocale.equals(locale)) {

                 return

sIs24Hour;

             }

         }

 

         java.text.DateFormat
natural =

             java.text.DateFormat.getTimeInstance(

                 java.text.DateFormat.LONG,
locale);

 

         if

(natural
instanceof

SimpleDateFormat) {

             SimpleDateFormat
sdf = (SimpleDateFormat) natural;

             String
pattern = sdf.toPattern();

 

             if

(pattern.indexOf(
'H' )
>= 0) {

                 value
=
"24" ;

             }
else

{

                 value
=
"12" ;

             }

         }
else

{

             value
=
"12" ;

         }

 

         synchronized
(sLocaleLock) {

             sIs24HourLocale
= locale;

             sIs24Hour
= !value.equals(
"12" );

         }

     }

 

     boolean
b24 =  !(value ==
null

|| value.equals(
"12" ));

     return

b24;

}

改为

?

1

2

3

4

5

6

7

8

9

10

11

12

13

public
static boolean is24HourFormat(Context context) {

     String
value = Settings.System.getString(context.getContentResolver(),

             Settings.System.TIME_12_24);

 

     if

(value ==
null )
{

                 Settings.System.putString(context.getContentResolver(),

                 Settings.System.TIME_12_24, "24" );

       value
=
"24" ;

     }

 

     boolean
b24 =  !(value ==
null

|| value.equals(
"12" ));

     return

b24;

}

设置-》开发人员选项-》USB调试,修改默认为关闭】
packages\apps\Provision\src\com\android\provision\DefaultActivity.java

在该文件中加入下面的代码:

?

1

Settings.Secure.putInt(getContentResolver(),
Settings.Secure.ADB_ENABLED, 0);

设置-》开发人员选项-》允许模拟地点,修改默认为关闭
frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java

将该文件中的如下代码:

?

1

2

3

//
Allow mock locations default, based on build

loadSetting(stmt,
Settings.Secure.ALLOW_MOCK_LOCATION,

         "1" .equals(SystemProperties.get( "ro.allow.mock.location" ))
? 1 : 0);

修改为:

?

1

2

//
Allow mock locations default, based on build

loadSetting(stmt,
Settings.Secure.ALLOW_MOCK_LOCATION,0);

设置-》关于手机-》型号,修改默认值

build\core\product_config.mk

?

1

2

3

ifndef
PRODUCT_MODEL

   PRODUCT_MODEL
:= XXXXXX

endif

设置-》关于手机-》版本号,修改默认值

mediatek\config\common\ProjectConfig.mk

?

1

MTK_BUILD_VERNO
= XXXXXX

from: http://www.apkbus.com/blog-103303-43422.html

你可能感兴趣的:(android4.0.4 系统默认值的修改)