Merge "Moved a few telephony settings from Secure to Global" into jb-mr1-dev

This commit is contained in:
Christopher Tate
2012-09-12 17:51:35 -07:00
committed by Android (Google) Code Review
3 changed files with 65 additions and 12 deletions

View File

@@ -2616,6 +2616,12 @@ public final class Settings {
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS);
MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE);
MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT);
MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS);
MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
}
@@ -4254,30 +4260,28 @@ public final class Settings {
Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT;
/**
* The number of milliseconds to delay when checking for data stalls during
* non-aggressive detection. (screen is turned off.)
* @deprecated Moved to Settings.Global
* @hide
*/
@Deprecated
public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
"data_stall_alarm_non_aggressive_delay_in_ms";
Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS;
/**
* The number of milliseconds to delay when checking for data stalls during
* aggressive detection. (screen on or suspected data stall)
* @deprecated Moved to Settings.Global
* @hide
*/
@Deprecated
public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
"data_stall_alarm_aggressive_delay_in_ms";
Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS;
/**
* The interval in milliseconds at which to check gprs registration
* after the first registration mismatch of gprs and voice service,
* to detect possible data network registration problems.
*
* @deprecated Moved to Settings.Global
* @hide
*/
@Deprecated
public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
"gprs_register_check_period_ms";
Global.GPRS_REGISTER_CHECK_PERIOD_MS;
/**
* @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead
@@ -5603,6 +5607,32 @@ public final class Settings {
*/
public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
/**
* The number of milliseconds to delay when checking for data stalls during
* non-aggressive detection. (screen is turned off.)
* @hide
*/
public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
"data_stall_alarm_non_aggressive_delay_in_ms";
/**
* The number of milliseconds to delay when checking for data stalls during
* aggressive detection. (screen on or suspected data stall)
* @hide
*/
public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
"data_stall_alarm_aggressive_delay_in_ms";
/**
* The interval in milliseconds at which to check gprs registration
* after the first registration mismatch of gprs and voice service,
* to detect possible data network registration problems.
*
* @hide
*/
public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
"gprs_register_check_period_ms";
/**
* Nonzero causes Log.wtf() to crash.
* @hide

View File

@@ -67,7 +67,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
private static final int DATABASE_VERSION = 87;
private static final int DATABASE_VERSION = 88;
private Context mContext;
private int mUserHandle;
@@ -1305,6 +1305,23 @@ public class DatabaseHelper extends SQLiteOpenHelper {
upgradeVersion = 87;
}
if (upgradeVersion == 87) {
db.beginTransaction();
try {
String[] settingsToMove = {
Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS,
Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS,
Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS
};
moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
upgradeVersion = 88;
}
// *** Remember to update DATABASE_VERSION above!
if (upgradeVersion != currentVersion) {

View File

@@ -195,6 +195,12 @@ public class SettingsProvider extends ContentProvider {
sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS);
sSecureGlobalKeys.add(Settings.Secure.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_ENABLE);
sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_TIMEOUT);
sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
sSecureGlobalKeys.add(Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
sSecureGlobalKeys.add(Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
sSecureGlobalKeys.add(Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS);
sSecureGlobalKeys.add(Settings.Secure.WTF_IS_FATAL);
// Keys from the 'system' table now moved to 'global'