Skip to content

Commit 79cf1a2

Browse files
Christopher TateAndroid (Google) Code Review
authored andcommitted
Merge "Moved a few telephony settings from Secure to Global" into jb-mr1-dev
2 parents bbbb154 + c868b64 commit 79cf1a2

File tree

3 files changed

+65
-12
lines changed

3 files changed

+65
-12
lines changed

core/java/android/provider/Settings.java

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,6 +2616,12 @@ public static final class Secure extends NameValueTable {
26162616
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
26172617
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS);
26182618
MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
2619+
MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE);
2620+
MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT);
2621+
MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
2622+
MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
2623+
MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
2624+
MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS);
26192625
MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
26202626
}
26212627

@@ -4254,30 +4260,28 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
42544260
Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT;
42554261

42564262
/**
4257-
* The number of milliseconds to delay when checking for data stalls during
4258-
* non-aggressive detection. (screen is turned off.)
4263+
* @deprecated Moved to Settings.Global
42594264
* @hide
42604265
*/
4266+
@Deprecated
42614267
public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
4262-
"data_stall_alarm_non_aggressive_delay_in_ms";
4268+
Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS;
42634269

42644270
/**
4265-
* The number of milliseconds to delay when checking for data stalls during
4266-
* aggressive detection. (screen on or suspected data stall)
4271+
* @deprecated Moved to Settings.Global
42674272
* @hide
42684273
*/
4274+
@Deprecated
42694275
public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
4270-
"data_stall_alarm_aggressive_delay_in_ms";
4276+
Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS;
42714277

42724278
/**
4273-
* The interval in milliseconds at which to check gprs registration
4274-
* after the first registration mismatch of gprs and voice service,
4275-
* to detect possible data network registration problems.
4276-
*
4279+
* @deprecated Moved to Settings.Global
42774280
* @hide
42784281
*/
4282+
@Deprecated
42794283
public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
4280-
"gprs_register_check_period_ms";
4284+
Global.GPRS_REGISTER_CHECK_PERIOD_MS;
42814285

42824286
/**
42834287
* @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead
@@ -5603,6 +5607,32 @@ public static final class Global extends NameValueTable {
56035607
*/
56045608
public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
56055609

5610+
/**
5611+
* The number of milliseconds to delay when checking for data stalls during
5612+
* non-aggressive detection. (screen is turned off.)
5613+
* @hide
5614+
*/
5615+
public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
5616+
"data_stall_alarm_non_aggressive_delay_in_ms";
5617+
5618+
/**
5619+
* The number of milliseconds to delay when checking for data stalls during
5620+
* aggressive detection. (screen on or suspected data stall)
5621+
* @hide
5622+
*/
5623+
public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
5624+
"data_stall_alarm_aggressive_delay_in_ms";
5625+
5626+
/**
5627+
* The interval in milliseconds at which to check gprs registration
5628+
* after the first registration mismatch of gprs and voice service,
5629+
* to detect possible data network registration problems.
5630+
*
5631+
* @hide
5632+
*/
5633+
public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
5634+
"gprs_register_check_period_ms";
5635+
56065636
/**
56075637
* Nonzero causes Log.wtf() to crash.
56085638
* @hide

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
6767
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
6868
// is properly propagated through your change. Not doing so will result in a loss of user
6969
// settings.
70-
private static final int DATABASE_VERSION = 87;
70+
private static final int DATABASE_VERSION = 88;
7171

7272
private Context mContext;
7373
private int mUserHandle;
@@ -1305,6 +1305,23 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) {
13051305
upgradeVersion = 87;
13061306
}
13071307

1308+
if (upgradeVersion == 87) {
1309+
db.beginTransaction();
1310+
try {
1311+
String[] settingsToMove = {
1312+
Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS,
1313+
Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS,
1314+
Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS
1315+
};
1316+
moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true);
1317+
1318+
db.setTransactionSuccessful();
1319+
} finally {
1320+
db.endTransaction();
1321+
}
1322+
upgradeVersion = 88;
1323+
}
1324+
13081325
// *** Remember to update DATABASE_VERSION above!
13091326

13101327
if (upgradeVersion != currentVersion) {

packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ public class SettingsProvider extends ContentProvider {
195195
sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
196196
sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS);
197197
sSecureGlobalKeys.add(Settings.Secure.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
198+
sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_ENABLE);
199+
sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_TIMEOUT);
200+
sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
201+
sSecureGlobalKeys.add(Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
202+
sSecureGlobalKeys.add(Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
203+
sSecureGlobalKeys.add(Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS);
198204
sSecureGlobalKeys.add(Settings.Secure.WTF_IS_FATAL);
199205

200206
// Keys from the 'system' table now moved to 'global'

0 commit comments

Comments
 (0)