Android Settings和SettingsProvider源码分析与修改

习惯了,看源码从AndroidManifest文件看起,先对工程有个大致的认识。

Settings也是经常需要改动的部分之一,包名:com.android.settings,工程名:Settings,代码量也不小,慢慢啃。


4.4 SDK的Settings的AndroidManifest文件有2100+行,用ADT格式化后变成2600+行,好吧。

首先是权限,直接把注释写在里面了:


    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    


Setting显示开发者选项的逻辑

默认User版本没有“开发者选项”,我们可以通过点击版本号7次来显示开发者模式,今天来看下代码中是如何处理的:

首先是packages/apps/Settings/src/com/android/settings/Settings.java的初始化处理:

布尔值showDev是否默认显示“开发者选项”:

 final boolean showDev = mDevelopmentPreferences.getBoolean(
                DevelopmentSettings.PREF_SHOW,
                android.os.Build.TYPE.equals("eng"));

如果想让开发者选项默认显示,不需要点击7次版本号,可直接将showDev置为true即可:

final boolean showDev = true; 

如果showDev为false,则在如下代码中隐藏“开发者选项”:

if (id == R.id.development_settings) {
                if (!showDev) {
                    target.remove(i);
                }
            } 


下面看一下点击版本号显示开发者选项的部分:

代码路径:packages/apps/Settings/src/com/android/settings/DeviceInfoSettings.java

首先是定义点击次数:

static final int TAPS_TO_BE_A_DEVELOPER = 7;


点击版本号的处理逻辑,若mDevHitCountdown小于0,则表示”开发者选项“已经显示,参考Resume函数的处理:

if (preference.getKey().equals(KEY_BUILD_NUMBER)) {
            // Don't enable developer options for secondary users.
            if (UserHandle.myUserId() != UserHandle.USER_OWNER) return true;

            if (mDevHitCountdown > 0) {
                if (mDevHitCountdown == 1) {
                    if (super.ensurePinRestrictedPreference(preference)) {
                        return true;
                    }
                }
                mDevHitCountdown--;
                if (mDevHitCountdown == 0) {
                    getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE,
                            Context.MODE_PRIVATE).edit().putBoolean(
                                    DevelopmentSettings.PREF_SHOW, true).apply();
                    if (mDevHitToast != null) {
                        mDevHitToast.cancel();
                    }
                    mDevHitToast = Toast.makeText(getActivity(), R.string.show_dev_on,
                            Toast.LENGTH_LONG);
                    mDevHitToast.show();
                } else if (mDevHitCountdown > 0
                        && mDevHitCountdown < (TAPS_TO_BE_A_DEVELOPER-2)) {
                    if (mDevHitToast != null) {
                        mDevHitToast.cancel();
                    }
                    mDevHitToast = Toast.makeText(getActivity(), getResources().getQuantityString(
                            R.plurals.show_dev_countdown, mDevHitCountdown, mDevHitCountdown),
                            Toast.LENGTH_SHORT);
                    mDevHitToast.show();
                }
            } else if (mDevHitCountdown < 0) {
                if (mDevHitToast != null) {
                    mDevHitToast.cancel();
                }
                mDevHitToast = Toast.makeText(getActivity(), R.string.show_dev_already,
                        Toast.LENGTH_LONG); 
                mDevHitToast.show();
            }
        } 

Resume函数:

@Override
    public void onResume() {
        super.onResume();
        PreferenceGroup parentPreference = getPreferenceScreen();
        mDevHitCountdown = getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE,
                Context.MODE_PRIVATE).getBoolean(DevelopmentSettings.PREF_SHOW,
                        android.os.Build.TYPE.equals("eng")) ? -1 : TAPS_TO_BE_A_DEVELOPER;
        mDevHitToast = null;
    }



Setting的默认初始配置

frameworks/base/packages/SettingsProvider/res/values/default.xml
这里貌似可以修改很多东西,但要在
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

中初始化才会生效:





true


/mnt/sdcard
true

60000


false

cell,bluetooth,wifi,nfc,wimax
bluetooth,wifi,nfc
true
true
true


102
false
100%
100%
true

false
false

false
true



true
true
true
false

0
true

false

com.google.android.backup/.BackupTransportService


true

true
false
true
true


1
/system/media/audio/ui/LowBattery.ogg
0
/system/media/audio/ui/Dock.ogg
/system/media/audio/ui/Undock.ogg
/system/media/audio/ui/Dock.ogg
/system/media/audio/ui/Undock.ogg
1
/system/media/audio/ui/Lock.ogg
/system/media/audio/ui/Unlock.ogg
/system/media/audio/ui/WirelessChargingStarted.ogg

false
false
1


true


true


false


false




0x13=0x01000100;

0x14=0x01010100;

0x15=0x02000001;

0x16=0x02010001;

0x200000013=0x02000601;

0x200000014=0x02010601;


0x200000015=0x03020101;


0x200000016=0x03010201;

0x200000023=0x02000301;

0x200000024=0x02010301;


0x200000037=0x03070201;


0x200000038=0x03000701:0x03010701:0x03020701;




https://ssl.gstatic.com/accessibility/javascript/android/AndroidVox_v1.js



false


200%


false


true


0


-1

-1


500


0


true

false


false


9


false


0



当然还有mtk_default.xml
修改完成后,在
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
中的 private void loadGlobalSettings(SQLiteDatabase db) { ... ... }函数中增加初始化数据库的值:


然后执行:
./mk -t mm frameworks/base/packages/SettingsProvider/
生成目录:
out/target/product/esky82_tb_cn_kk/system/priv-app/SettingsProvider.apk



删除设置中情景模式的震动选项(会议模式和户外模式)


packages/apps/Settings/res/xml/audioprofile_settings.xml

注释掉会议模式和户外模式

packages/apps/Settings/res/xml/edit_profile_prefs.xml
注释掉:



packages/apps/Settings/src/com/medietek/audrioprofile/AduioProfileSettings.java
注释掉public void onCreate(Bundle icicle) {}中以下几行代码:
//pref = (AudioProfilePreference) findPreference(MEETING_PREF_KEY);
//pref.setOnSettingsClickListener(mProfileSettingListener);
//pref = (AudioProfilePreference) findPreference(OUTDOOR_PREF_KEY);
//pref.setOnSettingsClickListener(mProfileSettingListener);

或者改成以下:
这个方案得:import android.os.SystemProperties;
if (!SystemProperties.get("ro.project.target").equals("es706")) {
// Do nothing
} else {
pref = (AudioProfilePreference) findPreference(MEETING_PREF_KEY);
pref.setOnSettingsClickListener(mProfileSettingListener);
pref = (AudioProfilePreference) findPreference(OUTDOOR_PREF_KEY);
pref.setOnSettingsClickListener(mProfileSettingListener);
}

packages/apps/Settings/src/com/medietek/audrioprofile/Editprofile.java
private void initPreference() {}中注释以下:
 
    //   mVibrat = (CheckBoxPreference) findPreference(KEY_VIBRATE);
    ... ...
       //  mVibrat.setEnabled(false);

还有这里,总之搜索mVibrat的结果都注释掉或者加个判断:
if (!isSmsCapable()) {
// parent.removePreference(mVibrat);
}

private void updatePreference() {
// mVibrat.setChecked(mProfileManager.getVibrationEnabled(mKey));
... ...

还有这一大段:
// if (mVibrat != null) {
// final String name = AudioProfileManager.getVibrationKey(mKey);
// Xlog.d(TAG,"name " + name);
// String vibrateEnabled = Settings.System.getString(
// getContentResolver(), name);
// if (vibrateEnabled != null) {
// mVibrat.setChecked("true"
// .equals(vibrateEnabled));
// Xlog.d(TAG,
// "vibrate setting is "
// + "true".equals(vibrateEnabled));
// }
//
// }

还有:
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference) {
Xlog.d(TAG, "Key :" + preference.getKey());
// if ((preference.getKey()).equals(KEY_VIBRATE)) {
// boolean isVibrate = mVibrat.isChecked();
// Xlog.d(TAG, "set vibrate" + isVibrate);
// mProfileManager.setVibrationEnabled(mKey, isVibrate);
// } else


显示设置中增加“永不休眠”功能

首先在frameworks\base\packages\SettingsProvider\res\values\defaults.xml中设置def_screen_off_timeout为-1,即
-1
然后修改alps\packages\apps\Settings\res\values\arrays.xml:

 
    
        15 seconds
        30 seconds
        1 minute
        2 minutes
        10 minutes
        30 minutes
        never
    
 
    
   
        
        15000
        
        30000
        
        60000
        
        120000
        
        600000
        
        1800000
         -1
    

接着修改对比语言value文件夹下的arrays.xml, 修改screen_timeout_entries对应的翻译。不用管那个msgid,只是google用来表示是他自己的资源而已,直接添加"永不休眠"即可。

然后是代码的改动:

frameworks/base/services/java/com/android/server/power/PowerManagerService.java

private void updateUserActivitySummaryLocked(long now, int dirty) {
.....
 
//change code here ==============
                      Slog.d(TAG,"mScreenOffTimeoutSetting ="+mScreenOffTimeoutSetting);
                      //if (mUserActivitySummary != 0 ) {
                if (mUserActivitySummary != 0 && mScreenOffTimeoutSetting > 0) {
//change code here  end ==============
                    Message msg = mHandler.obtainMessage(MSG_USER_ACTIVITY_TIMEOUT);
                    msg.setAsynchronous(true);
                    mHandler.sendMessageAtTime(msg, nextTimeout);
                }
Android修改应用的默认安装位置

Google默认的PackageManager,会读取应用AndroidManifest.xml的对应定义

installLocation规则如下:

1.如果没有定义安装位置,表示安装在手机内存上;

2.android:installLocation ="auto" :先查看手机内存是否足够,如果够就安装在手机内存上,不够就安装在T 卡上;

3.android:installLocation = "internalOnly":表示安装在手机内存上;

4.android:installLocation = "preferExternal":表示安装在 T 卡上;

如何在设置中增加“选取应用安装位置”的功能,让用户选择默认的安装位置?

修改如下文件:frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

loadSetting(stmt, Global.SET_INSTALL_LOCATION, 0);

改为:

loadSetting(stmt, Secure.SET_INSTALL_LOCATION, 1);

并将

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

改为:
loadSetting(stmt, Settings.Secure.SET_INSTALL_LOCATION, 1);

这样修改之后,在设置>应用中会出现“选取应用安装位置”的功能,不过无论在这里选择什么,对于应用中AndroidManifest.xml文件中声明

android:installLocation = "internalOnly"
的,该apk 都会安装到手机上,这样做的好处是避免程序运行错误,因为定义android:installLocation = "internalOnly" 的 apk 一般要安装到手机内存上才能正常运行。


默认输入法勾选多国语言,并默认其中一种语言

1.首先在设备上调整输入法

设置>语言输入法>Android键盘(AOSP),在输入语言里勾选要选择的语言,比如选“英语(美国)”和“西班牙文”两种:

Android Settings和SettingsProvider源码分析与修改_第1张图片


2.选择系统输入法的默认语言(默认为两种语言中的“西班牙文”)

打开一个能能调出输入法的应用,下拉通知栏里,“选择输入法”调整为“西班牙文”

Android Settings和SettingsProvider源码分析与修改_第2张图片


3.查看Setting数据库文件

adb pull data/data/com.android.providers.settings/databases/settings.db C:\

打开Secure表,查看default_input_method,enabled_input_methods和selected_input_method_subtype三个字段内容,并记录:

Android Settings和SettingsProvider源码分析与修改_第3张图片

default_input_method       com.android.inputmethod.latin/.LatinIME

enabled_input_methods    com.android.inputmethod.latin/.LatinIME;816242702;-921088104

selected_input_method_subtype    816242702


4.修改SettingsProvider文件

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

将函数private void loadSecureSettings(SQLiteDatabase db) 中的以下两行(注意是loadSecureSettings函数,不是loadSystemSettings):

           

 loadSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS, defaultIme);
            loadSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD, defaultIme);

修改为以下三行:

loadSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS,"com.android.inputmethod.latin/.LatinIME;816242702;-921088104");//选中的输入法
loadSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD, "com.android.inputmethod.latin/.LatinIME");// 默认输入法为系统输入法
loadSetting(stmt, Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE, "816242702"); // 默认输入法的默认语言

android.provider.Settings的Secure和System常量

android.provider.Settings.Secure常量

String ACCESSIBILITY_DISPLAY_INVERSION_ENABLEDSetting that specifies whether display color inversion is enabled.

String ACCESSIBILITY_ENABLED If accessibility is enabled.
String ACCESSIBILITY_SPEAK_PASSWORD Whether to speak passwords while in accessibility mode.
String ADB_ENABLED This constant was deprecated in API level 17. Use ADB_ENABLED instead
String ALLOWED_GEOLOCATION_ORIGINS Origins for which browsers should allow geolocation by default.
String ALLOW_MOCK_LOCATION Setting to allow mock locations and location provider status to be injected into the LocationManager service for testing purposes during application development.
String ANDROID_ID A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device.
String BACKGROUND_DATA This constant was deprecated in API level 14. As of ICE_CREAM_SANDWICH, availability of background data depends on several combined factors. When background data is unavailable, getActiveNetworkInfo() will now appear disconnected.
String BLUETOOTH_ON This constant was deprecated in API level 17. Use BLUETOOTH_ON instead
String DATA_ROAMING This constant was deprecated in API level 17. Use DATA_ROAMING instead
String DEFAULT_INPUT_METHOD Setting to record the input method used by default, holding the ID of the desired method.
String DEVELOPMENT_SETTINGS_ENABLED This constant was deprecated in API level 17. Use DEVELOPMENT_SETTINGS_ENABLED instead
String DEVICE_PROVISIONED This constant was deprecated in API level 17. Use DEVICE_PROVISIONED instead
String ENABLED_ACCESSIBILITY_SERVICES List of the enabled accessibility providers.
String ENABLED_INPUT_METHODS List of input methods that are currently enabled.
String HTTP_PROXY This constant was deprecated in API level 17. Use HTTP_PROXY
String INPUT_METHOD_SELECTOR_VISIBILITY Setting to record the visibility of input method selector
String INSTALL_NON_MARKET_APPS Whether applications can be installed for this user via the system's ACTION_INSTALL_PACKAGE mechanism.
String LOCATION_MODE The degree of location access enabled by the user.
int LOCATION_MODE_BATTERY_SAVING Reduced power usage, such as limiting the number of GPS updates per hour.
int LOCATION_MODE_HIGH_ACCURACY Best-effort location computation allowed.
int LOCATION_MODE_OFF Location access disabled.
int LOCATION_MODE_SENSORS_ONLY Network Location Provider disabled, but GPS and other sensors enabled.
String LOCATION_PROVIDERS_ALLOWED This constant was deprecated in API level 19. use LOCATION_MODE and MODE_CHANGED_ACTION (or PROVIDERS_CHANGED_ACTION)
String LOCK_PATTERN_ENABLED Whether autolock is enabled (0 = false, 1 = true)
String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED This constant was deprecated in API level 17. Starting in JELLY_BEAN_MR1 the lockscreen uses HAPTIC_FEEDBACK_ENABLED.
String LOCK_PATTERN_VISIBLE Whether lock pattern is visible as user enters (0 = false, 1 = true)
String LOGGING_ID This constant was deprecated in API level 3. This identifier is poorly initialized and has many collisions. It should not be used. 
String NETWORK_PREFERENCE This constant was deprecated in API level 17. Use NETWORK_PREFERENCE instead
String PARENTAL_CONTROL_ENABLED No longer supported.
String PARENTAL_CONTROL_LAST_UPDATE No longer supported.
String PARENTAL_CONTROL_REDIRECT_URL No longer supported.
String SELECTED_INPUT_METHOD_SUBTYPE Setting to record the input method subtype used by default, holding the ID of the desired method.
String SETTINGS_CLASSNAME Settings classname to launch when Settings is clicked from All Applications.
String SYS_PROP_SETTING_VERSION  
String TOUCH_EXPLORATION_ENABLED If touch exploration is enabled.
String TTS_DEFAULT_COUNTRY This constant was deprecated in API level 14. this setting is no longer in use, as of the Ice Cream Sandwich release. Apps should never need to read this setting directly, instead can query the TextToSpeech framework classes for the default locale. getLanguage().
String TTS_DEFAULT_LANG This constant was deprecated in API level 14. this setting is no longer in use, as of the Ice Cream Sandwich release. Apps should never need to read this setting directly, instead can query the TextToSpeech framework classes for the default locale. getLanguage().
String TTS_DEFAULT_PITCH Default text-to-speech engine pitch.
String TTS_DEFAULT_RATE Default text-to-speech engine speech rate.
String TTS_DEFAULT_SYNTH Default text-to-speech engine.
String TTS_DEFAULT_VARIANT This constant was deprecated in API level 14. this setting is no longer in use, as of the Ice Cream Sandwich release. Apps should never need to read this setting directly, instead can query the TextToSpeech framework classes for the locale that is in use getLanguage().
String TTS_ENABLED_PLUGINS Space delimited list of plugin packages that are enabled.
String TTS_USE_DEFAULTS This constant was deprecated in API level 14. The value of this setting is no longer respected by the framework text to speech APIs as of the Ice Cream Sandwich release.
String USB_MASS_STORAGE_ENABLED This constant was deprecated in API level 17. Use USB_MASS_STORAGE_ENABLED instead
String USE_GOOGLE_MAIL This constant was deprecated in API level 17. Use USE_GOOGLE_MAIL instead
String WIFI_MAX_DHCP_RETRY_COUNT This constant was deprecated in API level 17. Use WIFI_MAX_DHCP_RETRY_COUNT instead
String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS This constant was deprecated in API level 17. Use WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS instead
String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON This constant was deprecated in API level 17. Use WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead.
String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY This constant was deprecated in API level 17. Use WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead.
String WIFI_NUM_OPEN_NETWORKS_KEPT This constant was deprecated in API level 17. Use WIFI_NUM_OPEN_NETWORKS_KEPT instead.
String WIFI_ON This constant was deprecated in API level 17. Use WIFI_ON instead.
String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_AP_COUNT This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_MAX_AP_CHECKS This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_ON This constant was deprecated in API level 17. Use WIFI_WATCHDOG_ON instead
String WIFI_WATCHDOG_PING_COUNT This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_PING_DELAY_MS This constant was deprecated in API level 14. This setting is not used.
String WIFI_WATCHDOG_PING_TIMEOUT_MS This constant was deprecated in API level 14. This setting is not used.

String WIFI_WATCHDOG_WATCH_LISTThis constant was deprecated in API level 14. This setting is not used.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

android.provider.Settings.System常量

StringACCELEROMETER_ROTATIONControl whether the accelerometer will be used to change screen orientation.
StringADB_ENABLEDThis constant was deprecated in API level 3. Use ADB_ENABLED instead
StringAIRPLANE_MODE_ONThis constant was deprecated in API level 17. Use AIRPLANE_MODE_ON instead
StringAIRPLANE_MODE_RADIOSThis constant was deprecated in API level 17. Use AIRPLANE_MODE_RADIOS instead
StringALARM_ALERTPersistent store for the system-wide default alarm alert.
StringALWAYS_FINISH_ACTIVITIESThis constant was deprecated in API level 17. Use ALWAYS_FINISH_ACTIVITIES instead
StringANDROID_IDThis constant was deprecated in API level 3. Use ANDROID_ID instead
StringANIMATOR_DURATION_SCALEThis constant was deprecated in API level 17. Use ANIMATOR_DURATION_SCALE instead
StringAPPEND_FOR_LAST_AUDIBLEAppended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.
StringAUTO_TIMEThis constant was deprecated in API level 17. Use AUTO_TIME instead
StringAUTO_TIME_ZONEThis constant was deprecated in API level 17. Use AUTO_TIME_ZONE instead
StringBLUETOOTH_DISCOVERABILITYDetermines whether remote devices may discover and/or connect to this device.
StringBLUETOOTH_DISCOVERABILITY_TIMEOUTBluetooth discoverability timeout.
StringBLUETOOTH_ONThis constant was deprecated in API level 3. Use BLUETOOTH_ON instead
StringDATA_ROAMINGThis constant was deprecated in API level 3. Use DATA_ROAMING instead
StringDATE_FORMATDate format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd
StringDEBUG_APPThis constant was deprecated in API level 17. Use DEBUG_APP instead
StringDEVICE_PROVISIONEDThis constant was deprecated in API level 3. Use DEVICE_PROVISIONED instead
StringDIM_SCREENThis constant was deprecated in API level 17. This setting is no longer used.
StringDTMF_TONE_WHEN_DIALINGWhether the audible DTMF tones are played by the dialer when dialing.
StringEND_BUTTON_BEHAVIORWhat happens when the user presses the end call button if they're not on a call.
StringFONT_SCALEScaling factor for fonts, float.
StringHAPTIC_FEEDBACK_ENABLEDWhether the haptic feedback (long presses, ...) are enabled.
StringHTTP_PROXYThis constant was deprecated in API level 3. Use HTTP_PROXY instead
StringINSTALL_NON_MARKET_APPSThis constant was deprecated in API level 3. Use INSTALL_NON_MARKET_APPS instead
StringLOCATION_PROVIDERS_ALLOWEDThis constant was deprecated in API level 3. Use LOCATION_PROVIDERS_ALLOWED instead
StringLOCK_PATTERN_ENABLEDThis constant was deprecated in API level 8. Use LOCK_PATTERN_ENABLED instead
StringLOCK_PATTERN_TACTILE_FEEDBACK_ENABLEDThis constant was deprecated in API level 8. Use LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED instead
StringLOCK_PATTERN_VISIBLEThis constant was deprecated in API level 8. Use LOCK_PATTERN_VISIBLE instead
StringLOGGING_IDThis constant was deprecated in API level 3. Use LOGGING_ID instead
StringMODE_RINGERThis constant was deprecated in API level 17. Use MODE_RINGER instead
StringMODE_RINGER_STREAMS_AFFECTEDDetermines which streams are affected by ringer mode changes.
StringMUTE_STREAMS_AFFECTEDDetermines which streams are affected by mute.
StringNETWORK_PREFERENCEThis constant was deprecated in API level 3. Use NETWORK_PREFERENCE instead
StringNEXT_ALARM_FORMATTEDA formatted string of the next alarm that is set, or the empty string if there is no alarm set.
StringNOTIFICATION_SOUNDPersistent store for the system-wide default notification sound.
StringPARENTAL_CONTROL_ENABLEDThis constant was deprecated in API level 3. Use PARENTAL_CONTROL_ENABLED instead
StringPARENTAL_CONTROL_LAST_UPDATEThis constant was deprecated in API level 3. Use PARENTAL_CONTROL_LAST_UPDATE instead
StringPARENTAL_CONTROL_REDIRECT_URLThis constant was deprecated in API level 3. Use PARENTAL_CONTROL_REDIRECT_URL instead
StringRADIO_BLUETOOTHThis constant was deprecated in API level 17. Use RADIO_BLUETOOTH instead
StringRADIO_CELLThis constant was deprecated in API level 17. Use RADIO_CELL instead
StringRADIO_NFCThis constant was deprecated in API level 17. Use RADIO_NFC instead
StringRADIO_WIFIThis constant was deprecated in API level 17. Use RADIO_WIFI instead
StringRINGTONEPersistent store for the system-wide default ringtone URI.
StringSCREEN_BRIGHTNESSThe screen backlight brightness between 0 and 255.
StringSCREEN_BRIGHTNESS_MODEControl whether to enable automatic brightness mode.
intSCREEN_BRIGHTNESS_MODE_AUTOMATICSCREEN_BRIGHTNESS_MODE value for automatic mode.
intSCREEN_BRIGHTNESS_MODE_MANUALSCREEN_BRIGHTNESS_MODE value for manual mode.
StringSCREEN_OFF_TIMEOUTThe timeout before the screen turns off.
StringSETTINGS_CLASSNAMEThis constant was deprecated in API level 3. Use SETTINGS_CLASSNAME instead
StringSETUP_WIZARD_HAS_RUNWhether the setup wizard has been run before (on first boot), or if it still needs to be run.
StringSHOW_GTALK_SERVICE_STATUS 
StringSHOW_PROCESSESThis constant was deprecated in API level 17. Use SHOW_PROCESSES instead
StringSHOW_WEB_SUGGESTIONSThis constant was deprecated in API level 11. Each application that shows web suggestions should have its own setting for this.
StringSOUND_EFFECTS_ENABLEDWhether the sounds effects (key clicks, lid open ...) are enabled.
StringSTAY_ON_WHILE_PLUGGED_INThis constant was deprecated in API level 17. Use STAY_ON_WHILE_PLUGGED_IN instead
StringSYS_PROP_SETTING_VERSION 
StringTEXT_AUTO_CAPSSetting to enable Auto Caps in text editors.
StringTEXT_AUTO_PUNCTUATESetting to enable Auto Punctuate in text editors.
StringTEXT_AUTO_REPLACESetting to enable Auto Replace (AutoText) in text editors.
StringTEXT_SHOW_PASSWORDSetting to showing password characters in text editors.
StringTIME_12_24Display times as 12 or 24 hours 12 24
StringTRANSITION_ANIMATION_SCALEThis constant was deprecated in API level 17. Use TRANSITION_ANIMATION_SCALE instead
StringUSB_MASS_STORAGE_ENABLEDThis constant was deprecated in API level 3. Use USB_MASS_STORAGE_ENABLED instead
StringUSER_ROTATIONDefault screen rotation when no other policy applies.
StringUSE_GOOGLE_MAILThis constant was deprecated in API level 3. Use USE_GOOGLE_MAIL instead
StringVIBRATE_ONWhether vibrate is on for different events.
StringVOLUME_ALARMAlarm volume.
StringVOLUME_BLUETOOTH_SCOBluetooth Headset volume.
StringVOLUME_MUSICMusic/media/gaming volume.
StringVOLUME_NOTIFICATIONNotification volume.
StringVOLUME_RINGRinger volume.
StringVOLUME_SYSTEMSystem/notifications volume.
StringVOLUME_VOICEVoice call volume.
StringWAIT_FOR_DEBUGGERThis constant was deprecated in API level 17. Use WAIT_FOR_DEBUGGER instead
StringWALLPAPER_ACTIVITYThis constant was deprecated in API level 17. Use WallpaperManager instead.
StringWIFI_MAX_DHCP_RETRY_COUNTThis constant was deprecated in API level 3. Use WIFI_MAX_DHCP_RETRY_COUNT instead
StringWIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MSThis constant was deprecated in API level 3. Use WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS instead
StringWIFI_NETWORKS_AVAILABLE_NOTIFICATION_ONThis constant was deprecated in API level 3. Use WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead
StringWIFI_NETWORKS_AVAILABLE_REPEAT_DELAYThis constant was deprecated in API level 3. Use WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead
StringWIFI_NUM_OPEN_NETWORKS_KEPTThis constant was deprecated in API level 3. Use WIFI_NUM_OPEN_NETWORKS_KEPT instead
StringWIFI_ONThis constant was deprecated in API level 3. Use WIFI_ON instead
StringWIFI_SLEEP_POLICYThis constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY instead
intWIFI_SLEEP_POLICY_DEFAULTThis constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY_DEFAULT instead
intWIFI_SLEEP_POLICY_NEVERThis constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY_NEVER instead
intWIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGEDThis constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED instead
StringWIFI_STATIC_DNS1This constant was deprecated in API level 17. Use WifiManager instead
StringWIFI_STATIC_DNS2This constant was deprecated in API level 17. Use WifiManager instead
StringWIFI_STATIC_GATEWAYThis constant was deprecated in API level 17. Use WifiManager instead
StringWIFI_STATIC_IPThis constant was deprecated in API level 17. Use WifiManager instead
StringWIFI_STATIC_NETMASKThis constant was deprecated in API level 17. Use WifiManager instead
StringWIFI_USE_STATIC_IPThis constant was deprecated in API level 17. Use WifiManager instead
StringWIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGEThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE instead
StringWIFI_WATCHDOG_AP_COUNTThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_AP_COUNT instead
StringWIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MSThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS instead
StringWIFI_WATCHDOG_BACKGROUND_CHECK_ENABLEDThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED instead
StringWIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MSThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS instead 
StringWIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNTThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT instead
StringWIFI_WATCHDOG_MAX_AP_CHECKSThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_MAX_AP_CHECKS instead
StringWIFI_WATCHDOG_ONThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_ON instead
StringWIFI_WATCHDOG_PING_COUNTThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_PING_COUNT instead
StringWIFI_WATCHDOG_PING_DELAY_MSThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_PING_DELAY_MS instead
StringWIFI_WATCHDOG_PING_TIMEOUT_MSThis constant was deprecated in API level 3. Use WIFI_WATCHDOG_PING_TIMEOUT_MS instead
StringWINDOW_ANIMATION_SCALEThis constant was deprecated in API level 17. Use WINDOW_ANIMATION_SCALE instead 



转载请注明出处:周木水的CSDN博客 http://blog.csdn.net/zhoumushui





你可能感兴趣的:(Android,Android源码分析)