Skip to content

Commit f21b94a

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Remove unused Secure settings." into jb-mr1-dev
2 parents 68b7a6d + 4de9936 commit f21b94a

File tree

2 files changed

+7
-157
lines changed

2 files changed

+7
-157
lines changed

core/java/android/provider/Settings.java

Lines changed: 0 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -3763,133 +3763,6 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
37633763
*/
37643764
public static final String LAST_SETUP_SHOWN = "last_setup_shown";
37653765

3766-
/**
3767-
* How frequently (in seconds) to check the memory status of the
3768-
* device.
3769-
* @hide
3770-
*/
3771-
public static final String MEMCHECK_INTERVAL = "memcheck_interval";
3772-
3773-
/**
3774-
* Max frequency (in seconds) to log memory check stats, in realtime
3775-
* seconds. This allows for throttling of logs when the device is
3776-
* running for large amounts of time.
3777-
* @hide
3778-
*/
3779-
public static final String MEMCHECK_LOG_REALTIME_INTERVAL =
3780-
"memcheck_log_realtime_interval";
3781-
3782-
/**
3783-
* Boolean indicating whether rebooting due to system memory checks
3784-
* is enabled.
3785-
* @hide
3786-
*/
3787-
public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled";
3788-
3789-
/**
3790-
* How many bytes the system process must be below to avoid scheduling
3791-
* a soft reboot. This reboot will happen when it is next determined
3792-
* to be a good time.
3793-
* @hide
3794-
*/
3795-
public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft";
3796-
3797-
/**
3798-
* How many bytes the system process must be below to avoid scheduling
3799-
* a hard reboot. This reboot will happen immediately.
3800-
* @hide
3801-
*/
3802-
public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard";
3803-
3804-
/**
3805-
* How many bytes the phone process must be below to avoid scheduling
3806-
* a soft restart. This restart will happen when it is next determined
3807-
* to be a good time.
3808-
* @hide
3809-
*/
3810-
public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft";
3811-
3812-
/**
3813-
* How many bytes the phone process must be below to avoid scheduling
3814-
* a hard restart. This restart will happen immediately.
3815-
* @hide
3816-
*/
3817-
public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard";
3818-
3819-
/**
3820-
* Boolean indicating whether restarting the phone process due to
3821-
* memory checks is enabled.
3822-
* @hide
3823-
*/
3824-
public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled";
3825-
3826-
/**
3827-
* First time during the day it is okay to kill processes
3828-
* or reboot the device due to low memory situations. This number is
3829-
* in seconds since midnight.
3830-
* @hide
3831-
*/
3832-
public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time";
3833-
3834-
/**
3835-
* Last time during the day it is okay to kill processes
3836-
* or reboot the device due to low memory situations. This number is
3837-
* in seconds since midnight.
3838-
* @hide
3839-
*/
3840-
public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time";
3841-
3842-
/**
3843-
* How long the screen must have been off in order to kill processes
3844-
* or reboot. This number is in seconds. A value of -1 means to
3845-
* entirely disregard whether the screen is on.
3846-
* @hide
3847-
*/
3848-
public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off";
3849-
3850-
/**
3851-
* How much time there must be until the next alarm in order to kill processes
3852-
* or reboot. This number is in seconds. Note: this value must be
3853-
* smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will
3854-
* always see an alarm scheduled within its time.
3855-
* @hide
3856-
*/
3857-
public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm";
3858-
3859-
/**
3860-
* How frequently to check whether it is a good time to restart things,
3861-
* if the device is in a bad state. This number is in seconds. Note:
3862-
* this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else
3863-
* the alarm to schedule the recheck will always appear within the
3864-
* minimum "do not execute now" time.
3865-
* @hide
3866-
*/
3867-
public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval";
3868-
3869-
/**
3870-
* How frequently (in DAYS) to reboot the device. If 0, no reboots
3871-
* will occur.
3872-
* @hide
3873-
*/
3874-
public static final String REBOOT_INTERVAL = "reboot_interval";
3875-
3876-
/**
3877-
* First time during the day it is okay to force a reboot of the
3878-
* device (if REBOOT_INTERVAL is set). This number is
3879-
* in seconds since midnight.
3880-
* @hide
3881-
*/
3882-
public static final String REBOOT_START_TIME = "reboot_start_time";
3883-
3884-
/**
3885-
* The window of time (in seconds) after each REBOOT_INTERVAL in which
3886-
* a reboot can be executed. If 0, a reboot will always be executed at
3887-
* exactly the given time. Otherwise, it will only be executed if
3888-
* the device is idle within the window.
3889-
* @hide
3890-
*/
3891-
public static final String REBOOT_WINDOW = "reboot_window";
3892-
38933766
/**
38943767
* Threshold values for the duration and level of a discharge cycle, under
38953768
* which we log discharge cycle info.
@@ -4310,14 +4183,6 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
43104183
public static final String
43114184
READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
43124185

4313-
/**
4314-
* Duration in milliseconds before pre-authorized URIs for the contacts
4315-
* provider should expire.
4316-
* @hide
4317-
*/
4318-
public static final String CONTACTS_PREAUTH_URI_EXPIRATION =
4319-
"contacts_preauth_uri_expiration";
4320-
43214186
/**
43224187
* This are the settings to be backed up.
43234188
*

services/java/com/android/server/Watchdog.java

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import android.os.ServiceManager;
3434
import android.os.SystemClock;
3535
import android.os.SystemProperties;
36-
import android.provider.Settings;
3736
import android.util.EventLog;
3837
import android.util.Log;
3938
import android.util.Slog;
@@ -118,9 +117,7 @@ public void handleMessage(Message msg) {
118117
case MONITOR: {
119118
// See if we should force a reboot.
120119
int rebootInterval = mReqRebootInterval >= 0
121-
? mReqRebootInterval : Settings.Secure.getInt(
122-
mResolver, Settings.Secure.REBOOT_INTERVAL,
123-
REBOOT_DEFAULT_INTERVAL);
120+
? mReqRebootInterval : REBOOT_DEFAULT_INTERVAL;
124121
if (mRebootInterval != rebootInterval) {
125122
mRebootInterval = rebootInterval;
126123
// We have been running long enough that a reboot can
@@ -226,9 +223,7 @@ public void addMonitor(Monitor monitor) {
226223

227224
void checkReboot(boolean fromAlarm) {
228225
int rebootInterval = mReqRebootInterval >= 0 ? mReqRebootInterval
229-
: Settings.Secure.getInt(
230-
mResolver, Settings.Secure.REBOOT_INTERVAL,
231-
REBOOT_DEFAULT_INTERVAL);
226+
: REBOOT_DEFAULT_INTERVAL;
232227
mRebootInterval = rebootInterval;
233228
if (rebootInterval <= 0) {
234229
// No reboot interval requested.
@@ -238,17 +233,11 @@ void checkReboot(boolean fromAlarm) {
238233
}
239234

240235
long rebootStartTime = mReqRebootStartTime >= 0 ? mReqRebootStartTime
241-
: Settings.Secure.getLong(
242-
mResolver, Settings.Secure.REBOOT_START_TIME,
243-
REBOOT_DEFAULT_START_TIME);
236+
: REBOOT_DEFAULT_START_TIME;
244237
long rebootWindowMillis = (mReqRebootWindow >= 0 ? mReqRebootWindow
245-
: Settings.Secure.getLong(
246-
mResolver, Settings.Secure.REBOOT_WINDOW,
247-
REBOOT_DEFAULT_WINDOW)) * 1000;
238+
: REBOOT_DEFAULT_WINDOW) * 1000;
248239
long recheckInterval = (mReqRecheckInterval >= 0 ? mReqRecheckInterval
249-
: Settings.Secure.getLong(
250-
mResolver, Settings.Secure.MEMCHECK_RECHECK_INTERVAL,
251-
MEMCHECK_DEFAULT_RECHECK_INTERVAL)) * 1000;
240+
: MEMCHECK_DEFAULT_RECHECK_INTERVAL) * 1000;
252241

253242
retrieveBrutalityAmount();
254243

@@ -325,13 +314,9 @@ void rebootSystem(String reason) {
325314
*/
326315
void retrieveBrutalityAmount() {
327316
mMinScreenOff = (mReqMinScreenOff >= 0 ? mReqMinScreenOff
328-
: Settings.Secure.getInt(
329-
mResolver, Settings.Secure.MEMCHECK_MIN_SCREEN_OFF,
330-
MEMCHECK_DEFAULT_MIN_SCREEN_OFF)) * 1000;
317+
: MEMCHECK_DEFAULT_MIN_SCREEN_OFF) * 1000;
331318
mMinAlarm = (mReqMinNextAlarm >= 0 ? mReqMinNextAlarm
332-
: Settings.Secure.getInt(
333-
mResolver, Settings.Secure.MEMCHECK_MIN_ALARM,
334-
MEMCHECK_DEFAULT_MIN_ALARM)) * 1000;
319+
: MEMCHECK_DEFAULT_MIN_ALARM) * 1000;
335320
}
336321

337322
/**

0 commit comments

Comments
 (0)