import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.content.ComponentName;
import android.content.ContentQueryMap;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
+import android.content.IContentProvider;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.AndroidException;
+import android.util.Config;
import android.util.Log;
import java.net.URISyntaxException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
/**
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
+ * The account types available to add via the add account button may be restricted by adding an
+ * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
+ * authorities. Only account types which can sync with that content provider will be offered to
+ * the user.
+ * <p>
* Input: Nothing.
* <p>
* Output: Nothing.
"android.settings.SYNC_SETTINGS";
/**
+ * Activity Action: Show add account screen for creating a new account.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
+ * extra to the Intent with one or more syncable content provider's authorities. Only account
+ * types which can sync with that content provider will be offered to the user.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_ADD_ACCOUNT =
+ "android.settings.ADD_ACCOUNT_SETTINGS";
+
+ /**
* Activity Action: Show settings for selecting the network operator.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
public static final String ACTION_MEMORY_CARD_SETTINGS =
"android.settings.MEMORY_CARD_SETTINGS";
+ /**
+ * Activity Action: Show settings for global search.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_SEARCH_SETTINGS =
+ "android.search.action.SEARCH_SETTINGS";
+
+ /**
+ * Activity Action: Show general device information settings (serial
+ * number, software version, phone number, etc.).
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_DEVICE_INFO_SETTINGS =
+ "android.settings.DEVICE_INFO_SETTINGS";
+
// End of Intent actions for Settings
+ /**
+ * @hide - Private call() method on SettingsProvider to read from 'system' table.
+ */
+ public static final String CALL_METHOD_GET_SYSTEM = "GET_system";
+
+ /**
+ * @hide - Private call() method on SettingsProvider to read from 'secure' table.
+ */
+ public static final String CALL_METHOD_GET_SECURE = "GET_secure";
+
+ /**
+ * Activity Extra: Limit available options in launched activity based on the given authority.
+ * <p>
+ * This can be passed as an extra field in an Activity Intent with one or more syncable content
+ * provider's authorities as a String[]. This field is used by some intents to alter the
+ * behavior of the called activity.
+ * <p>
+ * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
+ * on the authority given.
+ */
+ public static final String EXTRA_AUTHORITIES =
+ "authorities";
+
private static final String JID_RESOURCE_PREFIX = "android";
public static final String AUTHORITY = "settings";
private static final String TAG = "Settings";
+ private static final boolean LOCAL_LOGV = Config.LOGV || false;
public static class SettingNotFoundException extends AndroidException {
public SettingNotFoundException(String msg) {
}
}
+ // Thread-safe.
private static class NameValueCache {
private final String mVersionSystemProperty;
- private final HashMap<String, String> mValues = Maps.newHashMap();
- private long mValuesVersion = 0;
private final Uri mUri;
- NameValueCache(String versionSystemProperty, Uri uri) {
+ private static final String[] SELECT_VALUE =
+ new String[] { Settings.NameValueTable.VALUE };
+ private static final String NAME_EQ_PLACEHOLDER = "name=?";
+
+ // Must synchronize on 'this' to access mValues and mValuesVersion.
+ private final HashMap<String, String> mValues = new HashMap<String, String>();
+ private long mValuesVersion = 0;
+
+ // Initially null; set lazily and held forever. Synchronized on 'this'.
+ private IContentProvider mContentProvider = null;
+
+ // The method we'll call (or null, to not use) on the provider
+ // for the fast path of retrieving settings.
+ private final String mCallCommand;
+
+ public NameValueCache(String versionSystemProperty, Uri uri, String callCommand) {
mVersionSystemProperty = versionSystemProperty;
mUri = uri;
+ mCallCommand = callCommand;
}
- String getString(ContentResolver cr, String name) {
+ public String getString(ContentResolver cr, String name) {
long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
- if (mValuesVersion != newValuesVersion) {
- mValues.clear();
- mValuesVersion = newValuesVersion;
+
+ synchronized (this) {
+ if (mValuesVersion != newValuesVersion) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current " +
+ newValuesVersion + " != cached " + mValuesVersion);
+ }
+
+ mValues.clear();
+ mValuesVersion = newValuesVersion;
+ }
+
+ if (mValues.containsKey(name)) {
+ return mValues.get(name); // Could be null, that's OK -- negative caching
+ }
+ }
+
+ IContentProvider cp = null;
+ synchronized (this) {
+ cp = mContentProvider;
+ if (cp == null) {
+ cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
+ }
}
- if (!mValues.containsKey(name)) {
- String value = null;
- Cursor c = null;
+
+ // Try the fast path first, not using query(). If this
+ // fails (alternate Settings provider that doesn't support
+ // this interface?) then we fall back to the query/table
+ // interface.
+ if (mCallCommand != null) {
try {
- c = cr.query(mUri, new String[] { Settings.NameValueTable.VALUE },
- Settings.NameValueTable.NAME + "=?", new String[]{name}, null);
- if (c != null && c.moveToNext()) value = c.getString(0);
+ Bundle b = cp.call(mCallCommand, name, null);
+ if (b != null) {
+ String value = b.getPairValue();
+ synchronized (this) {
+ mValues.put(name, value);
+ }
+ return value;
+ }
+ // If the response Bundle is null, we fall through
+ // to the query interface below.
+ } catch (RemoteException e) {
+ // Not supported by the remote side? Fall through
+ // to query().
+ }
+ }
+
+ Cursor c = null;
+ try {
+ c = cp.query(mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER,
+ new String[]{name}, null);
+ if (c == null) {
+ Log.w(TAG, "Can't get key " + name + " from " + mUri);
+ return null;
+ }
+
+ String value = c.moveToNext() ? c.getString(0) : null;
+ synchronized (this) {
mValues.put(name, value);
- } catch (SQLException e) {
- // SQL error: return null, but don't cache it.
- Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
- } finally {
- if (c != null) c.close();
+ }
+ if (LOCAL_LOGV) {
+ Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " +
+ name + " = " + (value == null ? "(null)" : value));
}
return value;
- } else {
- return mValues.get(name);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
+ return null; // Return null, but don't cache it.
+ } finally {
+ if (c != null) c.close();
}
}
}
public static final class System extends NameValueTable {
public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
- private static volatile NameValueCache mNameValueCache = null;
+ // Populated lazily, guarded by class object:
+ private static NameValueCache sNameValueCache = null;
private static final HashSet<String> MOVED_TO_SECURE;
static {
MOVED_TO_SECURE.add(Secure.HTTP_PROXY);
MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS);
MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED);
+ MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED);
+ MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE);
+ MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
MOVED_TO_SECURE.add(Secure.LOGGING_ID);
MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED);
MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE);
+ " to android.provider.Settings.Secure, returning read-only value.");
return Secure.getString(resolver, name);
}
- if (mNameValueCache == null) {
- mNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI);
+ if (sNameValueCache == null) {
+ sNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI,
+ CALL_METHOD_GET_SYSTEM);
}
- return mNameValueCache.getString(resolver, name);
+ return sNameValueCache.getString(resolver, name);
}
/**
return Settings.System.putFloat(cr, FONT_SCALE, config.fontScale);
}
+ /** @hide */
+ public static boolean hasInterestingConfigurationChanges(int changes) {
+ return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0;
+ }
+
public static boolean getShowGTalkServiceStatus(ContentResolver cr) {
return getInt(cr, SHOW_GTALK_SERVICE_STATUS, 0) != 0;
}
public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";
/**
+ * END_BUTTON_BEHAVIOR value for "go home".
+ * @hide
+ */
+ public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;
+
+ /**
+ * END_BUTTON_BEHAVIOR value for "go to sleep".
+ * @hide
+ */
+ public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;
+
+ /**
+ * END_BUTTON_BEHAVIOR default value.
+ * @hide
+ */
+ public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;
+
+ /**
* Whether Airplane Mode is on.
*/
public static final String AIRPLANE_MODE_ON = "airplane_mode_on";
"bluetooth_discoverability_timeout";
/**
- * Whether autolock is enabled (0 = false, 1 = true)
+ * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED}
+ * instead
*/
- public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
+ @Deprecated
+ public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED;
/**
- * Whether lock pattern is visible as user enters (0 = false, 1 = true)
+ * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE}
+ * instead
*/
+ @Deprecated
public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
/**
- * Whether lock pattern will vibrate as user enters (0 = false, 1 = true)
+ * @deprecated Use
+ * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED}
+ * instead
*/
+ @Deprecated
public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
"lock_pattern_tactile_feedback_enabled";
/**
* Control whether to enable automatic brightness mode.
- * @hide
*/
public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
/**
* SCREEN_BRIGHTNESS_MODE value for manual mode.
- * @hide
*/
public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
/**
* SCREEN_BRIGHTNESS_MODE value for manual mode.
- * @hide
*/
public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
public static final String VOLUME_NOTIFICATION = "volume_notification";
/**
+ * Bluetooth Headset volume. This is used internally, changing this value will
+ * not change the volume. See AudioManager.
+ */
+ public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
+
+ /**
* Whether the notifications should use the ring volume (value of 1) or
* a separate notification volume (value of 0). In most cases, users
* will have this enabled so the notification and ringer volumes will be
"notifications_use_ring_volume";
/**
+ * Whether silent mode should allow vibration feedback. This is used
+ * internally in AudioService and the Sound settings activity to
+ * coordinate decoupling of vibrate and silent modes. This setting
+ * will likely be removed in a future release with support for
+ * audio/vibe feedback profiles.
+ *
+ * @hide
+ */
+ public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
+
+ /**
* The mapping of stream type (integer) to its setting.
*/
public static final String[] VOLUME_SETTINGS = {
VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
- VOLUME_ALARM, VOLUME_NOTIFICATION
+ VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
};
/**
public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
/**
+ * Show pointer location on screen?
+ * 0 = no
+ * 1 = yes
+ * @hide
+ */
+ public static final String POINTER_LOCATION = "pointer_location";
+
+ /**
+ * Whether to play a sound for low-battery alerts.
+ * @hide
+ */
+ public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled";
+
+ /**
+ * Whether to play a sound for dock events.
+ * @hide
+ */
+ public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled";
+
+ /**
+ * Whether to play sounds when the keyguard is shown and dismissed.
+ * @hide
+ */
+ public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
+
+ /**
+ * URI for the low battery sound file.
+ * @hide
+ */
+ public static final String LOW_BATTERY_SOUND = "low_battery_sound";
+
+ /**
+ * URI for the desk dock "in" event sound.
+ * @hide
+ */
+ public static final String DESK_DOCK_SOUND = "desk_dock_sound";
+
+ /**
+ * URI for the desk dock "out" event sound.
+ * @hide
+ */
+ public static final String DESK_UNDOCK_SOUND = "desk_undock_sound";
+
+ /**
+ * URI for the car dock "in" event sound.
+ * @hide
+ */
+ public static final String CAR_DOCK_SOUND = "car_dock_sound";
+
+ /**
+ * URI for the car dock "out" event sound.
+ * @hide
+ */
+ public static final String CAR_UNDOCK_SOUND = "car_undock_sound";
+
+ /**
+ * URI for the "device locked" (keyguard shown) sound.
+ * @hide
+ */
+ public static final String LOCK_SOUND = "lock_sound";
+
+ /**
+ * URI for the "device unlocked" (keyguard dismissed) sound.
+ * @hide
+ */
+ public static final String UNLOCK_SOUND = "unlock_sound";
+
+ /**
* Settings to backup. This is here so that it's in the same place as the settings
* keys and easy to update.
* @hide
*/
public static final String[] SETTINGS_TO_BACKUP = {
STAY_ON_WHILE_PLUGGED_IN,
- END_BUTTON_BEHAVIOR,
WIFI_SLEEP_POLICY,
WIFI_USE_STATIC_IP,
WIFI_STATIC_IP,
VOLUME_MUSIC,
VOLUME_ALARM,
VOLUME_NOTIFICATION,
+ VOLUME_BLUETOOTH_SCO,
VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE,
VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_RING + APPEND_FOR_LAST_AUDIBLE,
VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE,
VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE,
+ VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE,
+ VIBRATE_IN_SILENT,
TEXT_AUTO_REPLACE,
TEXT_AUTO_CAPS,
TEXT_AUTO_PUNCTUATE,
TTY_MODE,
SOUND_EFFECTS_ENABLED,
HAPTIC_FEEDBACK_ENABLED,
+ POWER_SOUNDS_ENABLED,
+ DOCK_SOUNDS_ENABLED,
+ LOCKSCREEN_SOUNDS_ENABLED,
SHOW_WEB_SUGGESTIONS,
NOTIFICATION_LIGHT_PULSE
};
public static final class Secure extends NameValueTable {
public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
- private static volatile NameValueCache mNameValueCache = null;
+ // Populated lazily, guarded by class object:
+ private static NameValueCache sNameValueCache = null;
/**
* Look up a name in the database.
* @return the corresponding value, or null if not present
*/
public synchronized static String getString(ContentResolver resolver, String name) {
- if (mNameValueCache == null) {
- mNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI);
+ if (sNameValueCache == null) {
+ sNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI,
+ CALL_METHOD_GET_SECURE);
}
- return mNameValueCache.getString(resolver, name);
+ return sNameValueCache.getString(resolver, name);
}
/**
public static final String ALLOW_MOCK_LOCATION = "mock_location";
/**
- * The Android ID (a unique 64-bit value) as a hex string.
- * Identical to that obtained by calling
- * GoogleLoginService.getAndroidId(); it is also placed here
- * so you can get it without binding to a service.
+ * A 64-bit number (as a hex string) that is randomly
+ * generated on the device's first boot and should remain
+ * constant for the lifetime of the device. (The value may
+ * change if a factory reset is performed on the device.)
*/
public static final String ANDROID_ID = "android_id";
public static final String ENABLED_INPUT_METHODS = "enabled_input_methods";
/**
+ * List of system input methods that are currently disabled. This is a string
+ * containing the IDs of all disabled input methods, each ID separated
+ * by ':'.
+ * @hide
+ */
+ public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods";
+
+ /**
* Host name and port for a user-selected proxy.
*/
public static final String HTTP_PROXY = "http_proxy";
public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
/**
+ * Whether autolock is enabled (0 = false, 1 = true)
+ */
+ public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
+
+ /**
+ * Whether lock pattern is visible as user enters (0 = false, 1 = true)
+ */
+ public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
+
+ /**
+ * Whether lock pattern will vibrate as user enters (0 = false, 1 = true)
+ */
+ public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
+ "lock_pattern_tactile_feedback_enabled";
+
+ /**
* Whether assisted GPS should be enabled or not.
* @hide
*/
public static final String LOGGING_ID = "logging_id";
/**
- * The Logging ID (a unique 64-bit value) as a hex string.
- * Used as a pseudonymous identifier for logging.
+ * User preference for which network(s) should be used. Only the
+ * connectivity service should touch this.
+ */
+ public static final String NETWORK_PREFERENCE = "network_preference";
+
+ /**
+ * Used to disable Tethering on a device - defaults to true
* @hide
*/
- public static final String LOGGING_ID2 = "logging_id2";
+ public static final String TETHER_SUPPORTED = "tether_supported";
/**
- * User preference for which network(s) should be used. Only the
- * connectivity service should touch this.
+ * Used to require DUN APN on the device or not - defaults to a build config value
+ * which defaults to false
+ * @hide
*/
- public static final String NETWORK_PREFERENCE = "network_preference";
+ public static final String TETHER_DUN_REQUIRED = "tether_dun_required";
+
+ /**
+ * Used to hold a gservices-provisioned apn value for DUN. If set, or the
+ * corresponding build config values are set it will override the APN DB
+ * values.
+ * Consists of a comma seperated list of strings:
+ * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
+ * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN"
+ * @hide
+ */
+ public static final String TETHER_DUN_APN = "tether_dun_apn";
/**
+ * No longer supported.
*/
public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
/**
+ * No longer supported.
*/
public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
/**
+ * No longer supported.
*/
public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
public static final String TTS_DEFAULT_VARIANT = "tts_default_variant";
/**
+ * Space delimited list of plugin packages that are enabled.
+ */
+ public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
+
+ /**
* Whether to notify the user of open networks.
* <p>
* If not connected and the scan results have an open network, we will
public static final String WIFI_ON = "wifi_on";
/**
+ * Used to save the Wifi_ON state prior to tethering.
+ * This state will be checked to restore Wifi after
+ * the user turns off tethering.
+ *
+ * @hide
+ */
+ public static final String WIFI_SAVED_STATE = "wifi_saved_state";
+
+ /**
+ * AP SSID
+ *
+ * @hide
+ */
+ public static final String WIFI_AP_SSID = "wifi_ap_ssid";
+
+ /**
+ * AP security
+ *
+ * @hide
+ */
+ public static final String WIFI_AP_SECURITY = "wifi_ap_security";
+
+ /**
+ * AP passphrase
+ *
+ * @hide
+ */
+ public static final String WIFI_AP_PASSWD = "wifi_ap_passwd";
+
+ /**
* The acceptable packet loss percentage (range 0 - 100) before trying
* another AP on the same network.
*/
public static final String BACKGROUND_DATA = "background_data";
/**
- * The time in msec, when the LAST_KMSG file was send to the checkin server.
- * We will only send the LAST_KMSG file if it was modified after this time.
- *
- * @hide
- */
- public static final String CHECKIN_SEND_LAST_KMSG_TIME = "checkin_kmsg_time";
-
- /**
- * The time in msec, when the apanic_console file was send to the checkin server.
- * We will only send the apanic_console file if it was modified after this time.
- *
- * @hide
+ * Origins for which browsers should allow geolocation by default.
+ * The value is a space-separated list of origins.
*/
- public static final String CHECKIN_SEND_APANIC_CONSOLE_TIME =
- "checkin_apanic_console_time";
+ public static final String ALLOWED_GEOLOCATION_ORIGINS
+ = "allowed_geolocation_origins";
/**
- * The time in msec, when the apanic_thread file was send to the checkin server.
- * We will only send the apanic_thread file if it was modified after this time.
- *
+ * Whether mobile data connections are allowed by the user. See
+ * ConnectivityManager for more info.
* @hide
*/
- public static final String CHECKIN_SEND_APANIC_THREAD_TIME =
- "checkin_apanic_thread_time";
+ public static final String MOBILE_DATA = "mobile_data";
/**
* The CDMA roaming mode 0 = Home Networks, CDMA default
public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
/**
- * Flag for allowing service provider to use location information to improve products and
- * services.
- * Type: int ( 0 = disallow, 1 = allow )
+ * Controls whether settings backup is enabled.
+ * Type: int ( 0 = disabled, 1 = enabled )
* @hide
*/
- public static final String USE_LOCATION_FOR_SERVICES = "use_location";
+ public static final String BACKUP_ENABLED = "backup_enabled";
/**
- * Controls whether settings backup is enabled.
+ * Controls whether application data is automatically restored from backup
+ * at install time.
* Type: int ( 0 = disabled, 1 = enabled )
* @hide
*/
- public static final String BACKUP_ENABLED = "backup_enabled";
+ public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore";
/**
* Indicates whether settings backup has been fully provisioned.
public static final String LAST_SETUP_SHOWN = "last_setup_shown";
/**
+ * How frequently (in seconds) to check the memory status of the
+ * device.
* @hide
*/
- public static final String[] SETTINGS_TO_BACKUP = {
- ADB_ENABLED,
- ALLOW_MOCK_LOCATION,
- PARENTAL_CONTROL_ENABLED,
- PARENTAL_CONTROL_REDIRECT_URL,
- USB_MASS_STORAGE_ENABLED,
- ACCESSIBILITY_ENABLED,
- ENABLED_ACCESSIBILITY_SERVICES,
- TTS_USE_DEFAULTS,
- TTS_DEFAULT_RATE,
- TTS_DEFAULT_PITCH,
- TTS_DEFAULT_SYNTH,
- TTS_DEFAULT_LANG,
- TTS_DEFAULT_COUNTRY,
- WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
- WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
- WIFI_NUM_ALLOWED_CHANNELS,
- WIFI_NUM_OPEN_NETWORKS_KEPT,
- };
+ public static final String MEMCHECK_INTERVAL = "memcheck_interval";
/**
- * Helper method for determining if a location provider is enabled.
- * @param cr the content resolver to use
- * @param provider the location provider to query
- * @return true if the provider is enabled
- *
+ * Max frequency (in seconds) to log memory check stats, in realtime
+ * seconds. This allows for throttling of logs when the device is
+ * running for large amounts of time.
* @hide
*/
- public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) {
- String allowedProviders = Settings.Secure.getString(cr, LOCATION_PROVIDERS_ALLOWED);
- if (allowedProviders != null) {
- return (allowedProviders.equals(provider) ||
- allowedProviders.contains("," + provider + ",") ||
- allowedProviders.startsWith(provider + ",") ||
- allowedProviders.endsWith("," + provider));
- }
- return false;
- }
-
- /**
- * Thread-safe method for enabling or disabling a single location provider.
- * @param cr the content resolver to use
- * @param provider the location provider to enable or disable
- * @param enabled true if the provider should be enabled
- *
- * @hide
- */
- public static final void setLocationProviderEnabled(ContentResolver cr,
- String provider, boolean enabled) {
- // to ensure thread safety, we write the provider name with a '+' or '-'
- // and let the SettingsProvider handle it rather than reading and modifying
- // the list of enabled providers.
- if (enabled) {
- provider = "+" + provider;
- } else {
- provider = "-" + provider;
- }
- putString(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider);
- }
- }
-
- /**
- * Gservices settings, containing the network names for Google's
- * various services. This table holds simple name/addr pairs.
- * Addresses can be accessed through the getString() method.
- *
- * TODO: This should move to partner/google/... somewhere.
- *
- * @hide
- */
- public static final class Gservices extends NameValueTable {
- public static final String SYS_PROP_SETTING_VERSION = "sys.settings_gservices_version";
-
- /**
- * Intent action broadcast when the Gservices table is updated by the server.
- * This is broadcast once after settings change (so many values may have been updated).
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String CHANGED_ACTION =
- "com.google.gservices.intent.action.GSERVICES_CHANGED";
-
- /**
- * Intent action to override Gservices for testing. (Requires WRITE_GSERVICES permission.)
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String OVERRIDE_ACTION =
- "com.google.gservices.intent.action.GSERVICES_OVERRIDE";
-
- private static volatile NameValueCache mNameValueCache = null;
- private static final Object mNameValueCacheLock = new Object();
-
- /**
- * Look up a name in the database.
- * @param resolver to access the database with
- * @param name to look up in the table
- * @return the corresponding value, or null if not present
- */
- public static String getString(ContentResolver resolver, String name) {
- synchronized (mNameValueCacheLock) {
- if (mNameValueCache == null) {
- mNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI);
- }
- return mNameValueCache.getString(resolver, name);
- }
- }
-
- /**
- * Store a name/value pair into the database.
- * @param resolver to access the database with
- * @param name to store
- * @param value to associate with the name
- * @return true if the value was set, false on database errors
- */
- public static boolean putString(ContentResolver resolver,
- String name, String value) {
- return putString(resolver, CONTENT_URI, name, value);
- }
-
- /**
- * Look up the value for name in the database, convert it to an int using Integer.parseInt
- * and return it. If it is null or if a NumberFormatException is caught during the
- * conversion then return defValue.
- */
- public static int getInt(ContentResolver resolver, String name, int defValue) {
- String valString = getString(resolver, name);
- int value;
- try {
- value = valString != null ? Integer.parseInt(valString) : defValue;
- } catch (NumberFormatException e) {
- value = defValue;
- }
- return value;
- }
-
- /**
- * Look up the value for name in the database, convert it to a long using Long.parseLong
- * and return it. If it is null or if a NumberFormatException is caught during the
- * conversion then return defValue.
- */
- public static long getLong(ContentResolver resolver, String name, long defValue) {
- String valString = getString(resolver, name);
- long value;
- try {
- value = valString != null ? Long.parseLong(valString) : defValue;
- } catch (NumberFormatException e) {
- value = defValue;
- }
- return value;
- }
-
- /**
- * Construct the content URI for a particular name/value pair,
- * useful for monitoring changes with a ContentObserver.
- * @param name to look up in the table
- * @return the corresponding content URI, or null if not present
- */
- public static Uri getUriFor(String name) {
- return getUriFor(CONTENT_URI, name);
- }
-
- /**
- * The content:// style URL for this table
- */
- public static final Uri CONTENT_URI =
- Uri.parse("content://" + AUTHORITY + "/gservices");
-
- /**
- * MMS - URL to use for HTTP "x-wap-profile" header
- */
- public static final String MMS_X_WAP_PROFILE_URL
- = "mms_x_wap_profile_url";
-
- /**
- * YouTube - the flag to indicate whether to use proxy
- */
- public static final String YOUTUBE_USE_PROXY
- = "youtube_use_proxy";
-
- /**
- * MMS - maximum message size in bytes for a MMS message.
- */
- public static final String MMS_MAXIMUM_MESSAGE_SIZE
- = "mms_maximum_message_size";
-
- /**
- * Event tags from the kernel event log to upload during checkin.
- */
- public static final String CHECKIN_EVENTS = "checkin_events";
-
- /**
- * Comma-separated list of service names to dump and upload during checkin.
- */
- public static final String CHECKIN_DUMPSYS_LIST = "checkin_dumpsys_list";
-
- /**
- * Comma-separated list of packages to specify for each service that is
- * dumped (currently only meaningful for user activity).
- */
- public static final String CHECKIN_PACKAGE_LIST = "checkin_package_list";
-
- /**
- * The interval (in seconds) between periodic checkin attempts.
- */
- public static final String CHECKIN_INTERVAL = "checkin_interval";
-
- /**
- * Boolean indicating if the market app should force market only checkins on
- * install/uninstall. Any non-0 value is considered true.
- */
- public static final String MARKET_FORCE_CHECKIN = "market_force_checkin";
-
- /**
- * How frequently (in seconds) to check the memory status of the
- * device.
- */
- public static final String MEMCHECK_INTERVAL = "memcheck_interval";
-
- /**
- * Max frequency (in seconds) to log memory check stats, in realtime
- * seconds. This allows for throttling of logs when the device is
- * running for large amounts of time.
- */
public static final String MEMCHECK_LOG_REALTIME_INTERVAL =
"memcheck_log_realtime_interval";
/**
* Boolean indicating whether rebooting due to system memory checks
* is enabled.
+ * @hide
*/
public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled";
* How many bytes the system process must be below to avoid scheduling
* a soft reboot. This reboot will happen when it is next determined
* to be a good time.
+ * @hide
*/
public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft";
/**
* How many bytes the system process must be below to avoid scheduling
* a hard reboot. This reboot will happen immediately.
+ * @hide
*/
public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard";
* How many bytes the phone process must be below to avoid scheduling
* a soft restart. This restart will happen when it is next determined
* to be a good time.
+ * @hide
*/
public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft";
/**
* How many bytes the phone process must be below to avoid scheduling
* a hard restart. This restart will happen immediately.
+ * @hide
*/
public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard";
/**
* Boolean indicating whether restarting the phone process due to
* memory checks is enabled.
+ * @hide
*/
public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled";
* First time during the day it is okay to kill processes
* or reboot the device due to low memory situations. This number is
* in seconds since midnight.
+ * @hide
*/
public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time";
* Last time during the day it is okay to kill processes
* or reboot the device due to low memory situations. This number is
* in seconds since midnight.
+ * @hide
*/
public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time";
* How long the screen must have been off in order to kill processes
* or reboot. This number is in seconds. A value of -1 means to
* entirely disregard whether the screen is on.
+ * @hide
*/
public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off";
* or reboot. This number is in seconds. Note: this value must be
* smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will
* always see an alarm scheduled within its time.
+ * @hide
*/
public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm";
* this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else
* the alarm to schedule the recheck will always appear within the
* minimum "do not execute now" time.
+ * @hide
*/
public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval";
/**
* How frequently (in DAYS) to reboot the device. If 0, no reboots
* will occur.
+ * @hide
*/
public static final String REBOOT_INTERVAL = "reboot_interval";
* First time during the day it is okay to force a reboot of the
* device (if REBOOT_INTERVAL is set). This number is
* in seconds since midnight.
+ * @hide
*/
public static final String REBOOT_START_TIME = "reboot_start_time";
* a reboot can be executed. If 0, a reboot will always be executed at
* exactly the given time. Otherwise, it will only be executed if
* the device is idle within the window.
+ * @hide
*/
public static final String REBOOT_WINDOW = "reboot_window";
/**
- * The minimum version of the server that is required in order for the device to accept
- * the server's recommendations about the initial sync settings to use. When this is unset,
- * blank or can't be interpreted as an integer then we will not ask the server for a
- * recommendation.
- */
- public static final String GMAIL_CONFIG_INFO_MIN_SERVER_VERSION =
- "gmail_config_info_min_server_version";
-
- /**
- * Controls whether Gmail offers a preview button for images.
- */
- public static final String GMAIL_DISALLOW_IMAGE_PREVIEWS = "gmail_disallow_image_previews";
-
- /**
- * The maximal size in bytes allowed for attachments when composing messages in Gmail
- */
- public static final String GMAIL_MAX_ATTACHMENT_SIZE = "gmail_max_attachment_size_bytes";
-
- /**
- * The timeout in milliseconds that Gmail uses when opening a connection and reading
- * from it. A missing value or a value of -1 instructs Gmail to use the defaults provided
- * by GoogleHttpClient.
- */
- public static final String GMAIL_TIMEOUT_MS = "gmail_timeout_ms";
-
- /**
- * Controls whether Gmail will request an expedited sync when a message is sent. Value must
- * be an integer where non-zero means true. Defaults to 1.
- */
- public static final String GMAIL_SEND_IMMEDIATELY = "gmail_send_immediately";
-
- /**
- * Controls whether gmail buffers server responses. Possible values are "memory", for a
- * memory-based buffer, or "file", for a temp-file-based buffer. All other values
- * (including not set) disable buffering.
- */
- public static final String GMAIL_BUFFER_SERVER_RESPONSE = "gmail_buffer_server_response";
-
- /**
- * The maximum size in bytes allowed for the provider to gzip a protocol buffer uploaded to
- * the server.
- */
- public static final String GMAIL_MAX_GZIP_SIZE = "gmail_max_gzip_size_bytes";
-
- /**
- * Controls whether Gmail will discard uphill operations that repeatedly fail. Value must be
- * an integer where non-zero means true. Defaults to 1. This flag controls Donut devices.
- */
- public static final String GMAIL_DISCARD_ERROR_UPHILL_OP = "gmail_discard_error_uphill_op";
-
- /**
- * Controls whether Gmail will discard uphill operations that repeatedly fail. Value must be
- * an integer where non-zero means true. Defaults to 1. This flag controls Eclair and
- * future devices.
- */
- public static final String GMAIL_DISCARD_ERROR_UPHILL_OP_NEW =
- "gmail_discard_error_uphill_op_new";
-
- /**
- * Controls how many attempts Gmail will try to upload an uphill operations before it
- * abandons the operation. Defaults to 20.
- */
- public static final String GMAIL_NUM_RETRY_UPHILL_OP = "gmail_num_retry_uphill_op";
-
- /**
- * How much time in seconds Gmail will try to upload an uphill operations before it
- * abandons the operation. Defaults to 36400 (one day).
- */
- public static final String GMAIL_WAIT_TIME_RETRY_UPHILL_OP =
- "gmail_wait_time_retry_uphill_op";
-
- /**
- * Controls if the protocol buffer version of the protocol will use a multipart request for
- * attachment uploads. Value must be an integer where non-zero means true. Defaults to 0.
- */
- public static final String GMAIL_USE_MULTIPART_PROTOBUF = "gmail_use_multipart_protobuf";
-
- /**
- * the transcoder URL for mobile devices.
- */
- public static final String TRANSCODER_URL = "mobile_transcoder_url";
-
- /**
- * URL that points to the privacy terms of the Google Talk service.
- */
- public static final String GTALK_TERMS_OF_SERVICE_URL = "gtalk_terms_of_service_url";
-
- /**
- * Hostname of the GTalk server.
- */
- public static final String GTALK_SERVICE_HOSTNAME = "gtalk_hostname";
-
- /**
- * Secure port of the GTalk server.
- */
- public static final String GTALK_SERVICE_SECURE_PORT = "gtalk_secure_port";
-
- /**
- * The server configurable RMQ acking interval
- */
- public static final String GTALK_SERVICE_RMQ_ACK_INTERVAL = "gtalk_rmq_ack_interval";
-
- /**
- * The minimum reconnect delay for short network outages or when the network is suspended
- * due to phone use.
- */
- public static final String GTALK_SERVICE_MIN_RECONNECT_DELAY_SHORT =
- "gtalk_min_reconnect_delay_short";
-
- /**
- * The reconnect variant range for short network outages or when the network is suspended
- * due to phone use. A random number between 0 and this constant is computed and
- * added to {@link #GTALK_SERVICE_MIN_RECONNECT_DELAY_SHORT} to form the initial reconnect
- * delay.
- */
- public static final String GTALK_SERVICE_RECONNECT_VARIANT_SHORT =
- "gtalk_reconnect_variant_short";
-
- /**
- * The minimum reconnect delay for long network outages
- */
- public static final String GTALK_SERVICE_MIN_RECONNECT_DELAY_LONG =
- "gtalk_min_reconnect_delay_long";
-
- /**
- * The reconnect variant range for long network outages. A random number between 0 and this
- * constant is computed and added to {@link #GTALK_SERVICE_MIN_RECONNECT_DELAY_LONG} to
- * form the initial reconnect delay.
- */
- public static final String GTALK_SERVICE_RECONNECT_VARIANT_LONG =
- "gtalk_reconnect_variant_long";
-
- /**
- * The maximum reconnect delay time, in milliseconds.
- */
- public static final String GTALK_SERVICE_MAX_RECONNECT_DELAY =
- "gtalk_max_reconnect_delay";
-
- /**
- * The network downtime that is considered "short" for the above calculations,
- * in milliseconds.
- */
- public static final String GTALK_SERVICE_SHORT_NETWORK_DOWNTIME =
- "gtalk_short_network_downtime";
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The away heartbeat should be used when the user is
- * logged into the GTalk app, but not actively using it.
- */
- public static final String GTALK_SERVICE_AWAY_HEARTBEAT_INTERVAL_MS =
- "gtalk_heartbeat_ping_interval_ms"; // keep the string backward compatible
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The active heartbeat should be used when the user is
- * actively using the GTalk app.
- */
- public static final String GTALK_SERVICE_ACTIVE_HEARTBEAT_INTERVAL_MS =
- "gtalk_active_heartbeat_ping_interval_ms";
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The sync heartbeat should be used when the user isn't
- * logged into the GTalk app, but auto-sync is enabled.
- */
- public static final String GTALK_SERVICE_SYNC_HEARTBEAT_INTERVAL_MS =
- "gtalk_sync_heartbeat_ping_interval_ms";
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The no sync heartbeat should be used when the user isn't
- * logged into the GTalk app, and auto-sync is not enabled.
- */
- public static final String GTALK_SERVICE_NOSYNC_HEARTBEAT_INTERVAL_MS =
- "gtalk_nosync_heartbeat_ping_interval_ms";
-
- /**
- * The maximum heartbeat interval used while on the WIFI network.
- */
- public static final String GTALK_SERVICE_WIFI_MAX_HEARTBEAT_INTERVAL_MS =
- "gtalk_wifi_max_heartbeat_ping_interval_ms";
-
- /**
- * How long we wait to receive a heartbeat ping acknowledgement (or another packet)
- * from the GTalk server, before deeming the connection dead.
- */
- public static final String GTALK_SERVICE_HEARTBEAT_ACK_TIMEOUT_MS =
- "gtalk_heartbeat_ack_timeout_ms";
-
- /**
- * How long after screen is turned off before we consider the user to be idle.
- */
- public static final String GTALK_SERVICE_IDLE_TIMEOUT_MS =
- "gtalk_idle_timeout_ms";
-
- /**
- * By default, GTalkService will always connect to the server regardless of the auto-sync
- * setting. However, if this parameter is true, then GTalkService will only connect
- * if auto-sync is enabled. Using the GTalk app will trigger the connection too.
- */
- public static final String GTALK_SERVICE_CONNECT_ON_AUTO_SYNC =
- "gtalk_connect_on_auto_sync";
-
- /**
- * GTalkService holds a wakelock while broadcasting the intent for data message received.
- * It then automatically release the wakelock after a timeout. This setting controls what
- * the timeout should be.
- */
- public static final String GTALK_DATA_MESSAGE_WAKELOCK_MS =
- "gtalk_data_message_wakelock_ms";
-
- /**
- * The socket read timeout used to control how long ssl handshake wait for reads before
- * timing out. This is needed so the ssl handshake doesn't hang for a long time in some
- * circumstances.
- */
- public static final String GTALK_SSL_HANDSHAKE_TIMEOUT_MS =
- "gtalk_ssl_handshake_timeout_ms";
-
- /**
- * Compress the gtalk stream.
- */
- public static final String GTALK_COMPRESS = "gtalk_compress";
-
- /**
- * This is the timeout for which Google Talk will send the message using bareJID. In a
- * established chat between two XMPP endpoints, Google Talk uses fullJID in the format
- * of user@domain/resource in order to send the message to the specific client. However,
- * if Google Talk hasn't received a message from that client after some time, it would
- * fall back to use the bareJID, which would broadcast the message to all clients for
- * the other user.
- */
- public static final String GTALK_USE_BARE_JID_TIMEOUT_MS = "gtalk_use_barejid_timeout_ms";
-
- /**
- * This is the threshold of retry number when there is an authentication expired failure
- * for Google Talk. In some situation, e.g. when a Google Apps account is disabled chat
- * service, the connection keeps failing. This threshold controls when we should stop
- * the retrying.
- */
- public static final String GTALK_MAX_RETRIES_FOR_AUTH_EXPIRED =
- "gtalk_max_retries_for_auth_expired";
-
- /**
- * a boolean setting indicating whether the GTalkService should use RMQ2 protocol or not.
- */
- public static final String GTALK_USE_RMQ2_PROTOCOL =
- "gtalk_use_rmq2";
-
- /**
- * a boolean setting indicating whether the GTalkService should support both RMQ and
- * RMQ2 protocols. This setting is true for the transitional period when we need to
- * support both protocols.
- */
- public static final String GTALK_SUPPORT_RMQ_AND_RMQ2_PROTOCOLS =
- "gtalk_support_rmq_and_rmq2";
-
- /**
- * a boolean setting controlling whether the rmq2 protocol will include stream ids in
- * the protobufs. This is used for debugging.
- */
- public static final String GTALK_RMQ2_INCLUDE_STREAM_ID =
- "gtalk_rmq2_include_stream_id";
-
- /**
- * when receiving a chat message from the server, the message could be an older message
- * whose "time sent" is x seconds from now. If x is significant enough, we want to flag
- * it so the UI can give it some special treatment when displaying the "time sent" for
- * it. This setting is to control what x is.
- */
- public static final String GTALK_OLD_CHAT_MESSAGE_THRESHOLD_IN_SEC =
- "gtalk_old_chat_msg_threshold_in_sec";
-
- /**
- * a setting to control the max connection history record GTalkService stores.
- */
- public static final String GTALK_MAX_CONNECTION_HISTORY_RECORDS =
- "gtalk_max_conn_history_records";
-
- /**
- * This is gdata url to lookup album and picture info from picasa web. It also controls
- * whether url scraping for picasa is enabled (NULL to disable).
- */
- public static final String GTALK_PICASA_ALBUM_URL =
- "gtalk_picasa_album_url";
-
- /**
- * This is the url to lookup picture info from flickr. It also controls
- * whether url scraping for flickr is enabled (NULL to disable).
- */
- public static final String GTALK_FLICKR_PHOTO_INFO_URL =
- "gtalk_flickr_photo_info_url";
-
- /**
- * This is the url to lookup an actual picture from flickr.
- */
- public static final String GTALK_FLICKR_PHOTO_URL =
- "gtalk_flickr_photo_url";
-
- /**
- * This is the gdata url to lookup info on a youtube video. It also controls
- * whether url scraping for youtube is enabled (NULL to disable).
- */
- public static final String GTALK_YOUTUBE_VIDEO_URL =
- "gtalk_youtube_video_url";
-
- /**
- * Enable/disable GTalk URL scraping for JPG images ("true" to enable).
- */
- public static final String GTALK_URL_SCRAPING_FOR_JPG =
- "gtalk_url_scraping_for_jpg";
-
- /**
- * Chat message lifetime (for pruning old chat messages).
- */
- public static final String GTALK_CHAT_MESSAGE_LIFETIME =
- "gtalk_chat_message_lifetime";
-
- /**
- * OTR message lifetime (for pruning old otr messages).
- */
- public static final String GTALK_OTR_MESSAGE_LIFETIME =
- "gtalk_otr_message_lifetime";
-
- /**
- * Chat expiration time, i.e., time since last message in the chat (for pruning old chats).
- */
- public static final String GTALK_CHAT_EXPIRATION_TIME =
- "gtalk_chat_expiration_time";
-
- /**
- * This is the url for getting the app token for server-to-device push messaging.
- */
- public static final String PUSH_MESSAGING_REGISTRATION_URL =
- "push_messaging_registration_url";
-
- /**
- * Use android://<it> routing infos for Google Sync Server subcriptions.
- */
- public static final String GSYNC_USE_RMQ2_ROUTING_INFO = "gsync_use_rmq2_routing_info";
-
- /**
- * Enable use of ssl session caching.
- * 'db' - save each session in a (per process) database
- * 'file' - save each session in a (per process) file
- * not set or any other value - normal java in-memory caching
- */
- public static final String SSL_SESSION_CACHE = "ssl_session_cache";
-
- /**
- * How many bytes long a message has to be, in order to be gzipped.
- */
- public static final String SYNC_MIN_GZIP_BYTES =
- "sync_min_gzip_bytes";
-
- /**
- * The hash value of the current provisioning settings
- */
- public static final String PROVISIONING_DIGEST = "digest";
-
- /**
- * Provisioning keys to block from server update
- */
- public static final String PROVISIONING_OVERRIDE = "override";
-
- /**
- * "Generic" service name for authentication requests.
- */
- public static final String GOOGLE_LOGIN_GENERIC_AUTH_SERVICE
- = "google_login_generic_auth_service";
-
- /**
- * Frequency in milliseconds at which we should sync the locally installed Vending Machine
- * content with the server.
- */
- public static final String VENDING_SYNC_FREQUENCY_MS = "vending_sync_frequency_ms";
-
- /**
- * Support URL that is opened in a browser when user clicks on 'Help and Info' in Vending
- * Machine.
- */
- public static final String VENDING_SUPPORT_URL = "vending_support_url";
-
- /**
- * Indicates if Vending Machine requires a SIM to be in the phone to allow a purchase.
- *
- * true = SIM is required
- * false = SIM is not required
- */
- public static final String VENDING_REQUIRE_SIM_FOR_PURCHASE =
- "vending_require_sim_for_purchase";
-
- /**
- * Indicates the Vending Machine backup state. It is set if the
- * Vending application has been backed up at least once.
- */
- public static final String VENDING_BACKUP_STATE = "vending_backup_state";
-
- /**
- * The current version id of the Vending Machine terms of service.
- */
- public static final String VENDING_TOS_VERSION = "vending_tos_version";
-
- /**
- * URL that points to the terms of service for Vending Machine.
- */
- public static final String VENDING_TOS_URL = "vending_tos_url";
-
- /**
- * URL to navigate to in browser (not Market) when the terms of service
- * for Vending Machine could not be accessed due to bad network
- * connection.
- */
- public static final String VENDING_TOS_MISSING_URL = "vending_tos_missing_url";
-
- /**
- * Whether to use sierraqa instead of sierra tokens for the purchase flow in
- * Vending Machine.
- *
- * true = use sierraqa
- * false = use sierra (default)
- */
- public static final String VENDING_USE_CHECKOUT_QA_SERVICE =
- "vending_use_checkout_qa_service";
-
- /**
- * Default value to use for all/free/priced filter in Market.
- * Valid values: ALL, FREE, PAID (case insensitive)
- */
- public static final String VENDING_DEFAULT_FILTER = "vending_default_filter";
- /**
- * Ranking type value to use for the first category tab (currently popular)
- */
- public static final String VENDING_TAB_1_RANKING_TYPE = "vending_tab_1_ranking_type";
-
- /**
- * Title string to use for first category tab.
- */
- public static final String VENDING_TAB_1_TITLE = "vending_tab_1_title";
-
- /**
- * Ranking type value to use for the second category tab (currently newest)
- */
- public static final String VENDING_TAB_2_RANKING_TYPE = "vending_tab_2_ranking_type";
-
- /**
- * Title string to use for second category tab.
- */
- public static final String VENDING_TAB_2_TITLE = "vending_tab_2_title";
-
- /**
- * Frequency in milliseconds at which we should request MCS heartbeats
- * from the Vending Machine client.
- */
- public static final String VENDING_HEARTBEAT_FREQUENCY_MS =
- "vending_heartbeat_frequency_ms";
-
- /**
- * Frequency in milliseconds at which we should resend pending download
- * requests to the API Server from the Vending Machine client.
- */
- public static final String VENDING_PENDING_DOWNLOAD_RESEND_FREQUENCY_MS =
- "vending_pd_resend_frequency_ms";
-
- /**
- * Time before an asset in the 'DOWNLOADING' state is considered ready
- * for an install kick on the client.
- */
- public static final String VENDING_DOWNLOADING_KICK_TIMEOUT_MS =
- "vending_downloading_kick_ms";
-
- /**
- * Size of buffer in bytes for Vending to use when reading cache files.
- */
- public static final String VENDING_DISK_INPUT_BUFFER_BYTES =
- "vending_disk_input_buffer_bytes";
-
- /**
- * Size of buffer in bytes for Vending to use when writing cache files.
- */
- public static final String VENDING_DISK_OUTPUT_BUFFER_BYTES =
- "vending_disk_output_buffer_bytes";
-
- /**
- * Frequency in milliseconds at which we should cycle through the promoted applications
- * on the home screen or the categories page.
- */
- public static final String VENDING_PROMO_REFRESH_FREQUENCY_MS =
- "vending_promo_refresh_freq_ms";
-
- /**
- * Frequency in milliseconds when we should refresh the provisioning information from
- * the carrier backend.
- */
- public static final String VENDING_CARRIER_PROVISIONING_REFRESH_FREQUENCY_MS =
- "vending_carrier_ref_freq_ms";
-
- /**
- * Interval in milliseconds after which a failed provisioning request should be retried.
- */
- public static final String VENDING_CARRIER_PROVISIONING_RETRY_MS =
- "vending_carrier_prov_retry_ms";
-
- /**
- * Buffer in milliseconds for carrier credentials to be considered valid.
- */
- public static final String VENDING_CARRIER_CREDENTIALS_BUFFER_MS =
- "vending_carrier_cred_buf_ms";
-
- /**
- * URL that points to the legal terms of service to display in Settings.
- * <p>
- * This should be a https URL. For a pretty user-friendly URL, use
- * {@link #SETTINGS_TOS_PRETTY_URL}.
- */
- public static final String SETTINGS_TOS_URL = "settings_tos_url";
-
- /**
- * URL that points to the legal terms of service to display in Settings.
- * <p>
- * This should be a pretty http URL. For the URL the device will access
- * via Settings, use {@link #SETTINGS_TOS_URL}.
+ * Threshold values for the duration and level of a discharge cycle, under
+ * which we log discharge cycle info.
+ * @hide
*/
- public static final String SETTINGS_TOS_PRETTY_URL = "settings_tos_pretty_url";
+ public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD =
+ "battery_discharge_duration_threshold";
+ /** @hide */
+ public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
/**
- * URL that points to the contributors to display in Settings.
- * <p>
- * This should be a https URL. For a pretty user-friendly URL, use
- * {@link #SETTINGS_CONTRIBUTORS_PRETTY_URL}.
+ * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents
+ * on application crashes and ANRs. If this is disabled, the crash/ANR dialog
+ * will never display the "Report" button.
+ * Type: int ( 0 = disallow, 1 = allow )
+ * @hide
*/
- public static final String SETTINGS_CONTRIBUTORS_URL = "settings_contributors_url";
+ public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
/**
- * URL that points to the contributors to display in Settings.
- * <p>
- * This should be a pretty http URL. For the URL the device will access
- * via Settings, use {@link #SETTINGS_CONTRIBUTORS_URL}.
+ * Nonzero causes Log.wtf() to crash.
+ * @hide
*/
- public static final String SETTINGS_CONTRIBUTORS_PRETTY_URL =
- "settings_contributors_pretty_url";
+ public static final String WTF_IS_FATAL = "wtf_is_fatal";
/**
- * URL that points to the Terms Of Service for the device.
- * <p>
- * This should be a pretty http URL.
+ * Maximum age of entries kept by {@link android.os.IDropBox}.
+ * @hide
*/
- public static final String SETUP_GOOGLE_TOS_URL = "setup_google_tos_url";
-
+ public static final String DROPBOX_AGE_SECONDS =
+ "dropbox_age_seconds";
/**
- * URL that points to the Android privacy policy for the device.
- * <p>
- * This should be a pretty http URL.
+ * Maximum number of entry files which {@link android.os.IDropBox} will keep around.
+ * @hide
*/
- public static final String SETUP_ANDROID_PRIVACY_URL = "setup_android_privacy_url";
-
+ public static final String DROPBOX_MAX_FILES =
+ "dropbox_max_files";
/**
- * URL that points to the Google privacy policy for the device.
- * <p>
- * This should be a pretty http URL.
+ * Maximum amount of disk space used by {@link android.os.IDropBox} no matter what.
+ * @hide
*/
- public static final String SETUP_GOOGLE_PRIVACY_URL = "setup_google_privacy_url";
-
+ public static final String DROPBOX_QUOTA_KB =
+ "dropbox_quota_kb";
/**
- * Request an MSISDN token for various Google services.
+ * Percent of free disk (excluding reserve) which {@link android.os.IDropBox} will use.
+ * @hide
*/
- public static final String USE_MSISDN_TOKEN = "use_msisdn_token";
-
+ public static final String DROPBOX_QUOTA_PERCENT =
+ "dropbox_quota_percent";
/**
- * RSA public key used to encrypt passwords stored in the database.
+ * Percent of total disk which {@link android.os.IDropBox} will never dip into.
+ * @hide
*/
- public static final String GLS_PUBLIC_KEY = "google_login_public_key";
-
+ public static final String DROPBOX_RESERVE_PERCENT =
+ "dropbox_reserve_percent";
/**
- * Only check parental control status if this is set to "true".
+ * Prefix for per-tag dropbox disable/enable settings.
+ * @hide
*/
- public static final String PARENTAL_CONTROL_CHECK_ENABLED =
- "parental_control_check_enabled";
-
+ public static final String DROPBOX_TAG_PREFIX =
+ "dropbox:";
/**
- * The list of applications we need to block if parental control is
- * enabled.
+ * Lines of logcat to include with system crash/ANR/etc. reports,
+ * as a prefix of the dropbox tag of the report type.
+ * For example, "logcat_for_system_server_anr" controls the lines
+ * of logcat captured with system server ANR reports. 0 to disable.
+ * @hide
*/
- public static final String PARENTAL_CONTROL_APPS_LIST =
- "parental_control_apps_list";
+ public static final String ERROR_LOGCAT_PREFIX =
+ "logcat_for_";
- /**
- * Duration in which parental control status is valid.
- */
- public static final String PARENTAL_CONTROL_TIMEOUT_IN_MS =
- "parental_control_timeout_in_ms";
/**
- * When parental control is off, we expect to get this string from the
- * litmus url.
+ * Screen timeout in milliseconds corresponding to the
+ * PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest
+ * possible screen timeout behavior.)
+ * @hide
*/
- public static final String PARENTAL_CONTROL_EXPECTED_RESPONSE =
- "parental_control_expected_response";
+ public static final String SHORT_KEYLIGHT_DELAY_MS =
+ "short_keylight_delay_ms";
/**
- * When the litmus url returns a 302, declare parental control to be on
- * only if the redirect url matches this regular expression.
+ * The interval in minutes after which the amount of free storage left on the
+ * device is logged to the event log
+ * @hide
*/
- public static final String PARENTAL_CONTROL_REDIRECT_REGEX =
- "parental_control_redirect_regex";
+ public static final String SYS_FREE_STORAGE_LOG_INTERVAL =
+ "sys_free_storage_log_interval";
/**
* Threshold for the amount of change in disk free space required to report the amount of
* free space. Used to prevent spamming the logs when the disk free space isn't changing
* frequently.
+ * @hide
*/
public static final String DISK_FREE_CHANGE_REPORTING_THRESHOLD =
"disk_free_change_reporting_threshold";
- /**
- * Prefix for new Google services published by the checkin
- * server.
- */
- public static final String GOOGLE_SERVICES_PREFIX
- = "google_services:";
-
- /**
- * The maximum reconnect delay for short network outages or when the network is suspended
- * due to phone use.
- */
- public static final String SYNC_MAX_RETRY_DELAY_IN_SECONDS =
- "sync_max_retry_delay_in_seconds";
/**
* Minimum percentage of free storage on the device that is used to determine if
* the device is running low on storage.
* Say this value is set to 10, the device is considered running low on storage
* if 90% or more of the device storage is filled up.
+ * @hide
*/
public static final String SYS_STORAGE_THRESHOLD_PERCENTAGE =
"sys_storage_threshold_percentage";
/**
- * The interval in minutes after which the amount of free storage left on the
- * device is logged to the event log
- */
- public static final String SYS_FREE_STORAGE_LOG_INTERVAL =
- "sys_free_storage_log_interval";
-
- /**
- * The interval in milliseconds at which to check the number of SMS sent
- * out without asking for use permit, to limit the un-authorized SMS
- * usage.
- */
- public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
- "sms_outgoing_check_interval_ms";
-
- /**
- * The number of outgoing SMS sent without asking for user permit
- * (of {@link #SMS_OUTGOING_CHECK_INTERVAL_MS}
+ * The interval in milliseconds after which Wi-Fi is considered idle.
+ * When idle, it is possible for the device to be switched from Wi-Fi to
+ * the mobile data network.
+ * @hide
*/
- public static final String SMS_OUTGOING_CEHCK_MAX_COUNT =
- "sms_outgoing_check_max_count";
+ public static final String WIFI_IDLE_MS = "wifi_idle_ms";
/**
* The interval in milliseconds at which to check packet counts on the
* mobile data interface when screen is on, to detect possible data
* connection problems.
+ * @hide
*/
public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
"pdp_watchdog_poll_interval_ms";
* The interval in milliseconds at which to check packet counts on the
* mobile data interface when screen is off, to detect possible data
* connection problems.
+ * @hide
*/
public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
"pdp_watchdog_long_poll_interval_ms";
* The interval in milliseconds at which to check packet counts on the
* mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
* outgoing packets has been reached without incoming packets.
+ * @hide
*/
public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
"pdp_watchdog_error_poll_interval_ms";
* The number of outgoing packets sent without seeing an incoming packet
* that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
* device is logged to the event log
+ * @hide
*/
public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
"pdp_watchdog_trigger_packet_count";
* The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
* after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
* attempting data connection recovery.
+ * @hide
*/
public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
"pdp_watchdog_error_poll_count";
/**
* The number of failed PDP reset attempts before moving to something more
* drastic: re-registering to the network.
+ * @hide
*/
public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
"pdp_watchdog_max_pdp_reset_fail_count";
/**
* Address to ping as a last sanity check before attempting any recovery.
* Unset or set to "0.0.0.0" to skip this check.
+ * @hide
*/
public static final String PDP_WATCHDOG_PING_ADDRESS = "pdp_watchdog_ping_address";
/**
* The "-w deadline" parameter for the ping, ie, the max time in
* seconds to spend pinging.
+ * @hide
*/
public static final String PDP_WATCHDOG_PING_DEADLINE = "pdp_watchdog_ping_deadline";
* 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";
/**
- * The interval in milliseconds after which Wi-Fi is considered idle.
- * When idle, it is possible for the device to be switched from Wi-Fi to
- * the mobile data network.
- */
- public static final String WIFI_IDLE_MS = "wifi_idle_ms";
-
- /**
- * Screen timeout in milliseconds corresponding to the
- * PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest
- * possible screen timeout behavior.)
- */
- public static final String SHORT_KEYLIGHT_DELAY_MS =
- "short_keylight_delay_ms";
-
- /**
- * List of test suites (local disk filename) for the automatic instrumentation test runner.
- * The file format is similar to automated_suites.xml, see AutoTesterService.
- * If this setting is missing or empty, the automatic test runner will not start.
- */
- public static final String AUTOTEST_SUITES_FILE = "autotest_suites_file";
-
- /**
- * Interval between synchronous checkins forced by the automatic test runner.
- * If you set this to a value smaller than CHECKIN_INTERVAL, then the test runner's
- * frequent checkins will prevent asynchronous background checkins from interfering
- * with any performance measurements.
- */
- public static final String AUTOTEST_CHECKIN_SECONDS = "autotest_checkin_seconds";
-
- /**
- * Interval between reboots forced by the automatic test runner.
- */
- public static final String AUTOTEST_REBOOT_SECONDS = "autotest_reboot_seconds";
-
-
- /**
- * Threshold values for the duration and level of a discharge cycle, under
- * which we log discharge cycle info.
+ * The length of time in milli-seconds that automatic small adjustments to
+ * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
+ * @hide
*/
- public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD =
- "battery_discharge_duration_threshold";
- public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
+ public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
/**
- * An email address that anr bugreports should be sent to.
+ * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
+ * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
+ * exceeded.
+ * @hide
*/
- public static final String ANR_BUGREPORT_RECIPIENT = "anr_bugreport_recipient";
+ public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
/**
- * Flag for allowing service provider to use location information to improve products and
- * services.
- * Type: int ( 0 = disallow, 1 = allow )
- * @deprecated
+ * The maximum reconnect delay for short network outages or when the network is suspended
+ * due to phone use.
+ * @hide
*/
- public static final String USE_LOCATION_FOR_SERVICES = "use_location";
+ public static final String SYNC_MAX_RETRY_DELAY_IN_SECONDS =
+ "sync_max_retry_delay_in_seconds";
/**
- * The length of the calendar sync window into the future.
- * This specifies the number of days into the future for the sliding window sync.
- * Setting this to zero will disable sliding sync.
+ * The interval in milliseconds at which to check the number of SMS sent
+ * out without asking for use permit, to limit the un-authorized SMS
+ * usage.
+ * @hide
*/
- public static final String GOOGLE_CALENDAR_SYNC_WINDOW_DAYS =
- "google_calendar_sync_window_days";
+ public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
+ "sms_outgoing_check_interval_ms";
/**
- * How often to update the calendar sync window.
- * The window will be advanced every n days.
+ * The number of outgoing SMS sent without asking for user permit
+ * (of {@link #SMS_OUTGOING_CHECK_INTERVAL_MS}
+ * @hide
*/
- public static final String GOOGLE_CALENDAR_SYNC_WINDOW_UPDATE_DAYS =
- "google_calendar_sync_window_update_days";
+ public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
+ "sms_outgoing_check_max_count";
/**
* The number of promoted sources in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
/**
* The maximum number of suggestions returned by GlobalSearch.
+ * @hide
*/
public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
/**
* The number of suggestions GlobalSearch will ask each non-web search source for.
+ * @hide
*/
public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
/**
* The number of suggestions the GlobalSearch will ask the web search source for.
+ * @hide
*/
public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
"search_web_results_override_limit";
/**
* The number of milliseconds that GlobalSearch will wait for suggestions from
* promoted sources before continuing with all other sources.
+ * @hide
*/
public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
"search_promoted_source_deadline_millis";
/**
* The number of milliseconds before GlobalSearch aborts search suggesiton queries.
+ * @hide
*/
public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
/**
* The maximum number of milliseconds that GlobalSearch shows the previous results
* after receiving a new query.
+ * @hide
*/
public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
/**
* The maximum age of log data used for shortcuts in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
/**
* The maximum age of log data used for source ranking in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
"search_max_source_event_age_millis";
/**
* The minimum number of impressions needed to rank a source in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
"search_min_impressions_for_source_ranking";
/**
* The minimum number of clicks needed to rank a source in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
"search_min_clicks_for_source_ranking";
/**
* The maximum number of shortcuts shown by GlobalSearch.
+ * @hide
*/
public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
/**
* The size of the core thread pool for suggestion queries in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
"search_query_thread_core_pool_size";
/**
* The maximum size of the thread pool for suggestion queries in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
"search_query_thread_max_pool_size";
/**
* The size of the core thread pool for shortcut refreshing in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
"search_shortcut_refresh_core_pool_size";
/**
* The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
+ * @hide
*/
public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
"search_shortcut_refresh_max_pool_size";
/**
* The maximun time that excess threads in the GlobalSeach thread pools will
* wait before terminating.
+ * @hide
*/
public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
"search_thread_keepalive_seconds";
/**
* The maximum number of concurrent suggestion queries to each source.
+ * @hide
*/
public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
"search_per_source_concurrent_query_limit";
/**
- * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents
- * on application crashes and ANRs. If this is disabled, the crash/ANR dialog
- * will never display the "Report" button.
- * Type: int ( 0 = disallow, 1 = allow )
+ * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
+ * @hide
*/
- public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
+ public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
+
+ /**
+ * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
+ * @hide
+ */
+ public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";
/**
- * Maximum size of /proc/last_kmsg content to upload after reboot.
+ * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true)
+ * @hide
*/
- public static final String LAST_KMSG_KB = "last_kmsg_kb";
+ public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt";
/**
- * The length of time in milli-seconds that automatic small adjustments to
- * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
+ * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true)
+ * @hide
*/
- public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
+ public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled";
/**
- * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
- * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
- * exceeded.
+ * If nonzero, ANRs in invisible background processes bring up a dialog.
+ * Otherwise, the process will be silently killed.
+ * @hide
*/
- public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
+ public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
/**
- * @deprecated
+ * The {@link ComponentName} string of the service to be used as the voice recognition
+ * service.
+ *
* @hide
*/
- @Deprecated // Obviated by NameValueCache: just fetch the value directly.
- public static class QueryMap extends ContentQueryMap {
+ public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
- public QueryMap(ContentResolver contentResolver, Cursor cursor, boolean keepUpdated,
- Handler handlerForUpdateNotifications) {
- super(cursor, NAME, keepUpdated, handlerForUpdateNotifications);
- }
+ /**
+ * What happens when the user presses the Power button while in-call
+ * and the screen is on.<br/>
+ * <b>Values:</b><br/>
+ * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
+ * 2 - The Power button hangs up the current call.<br/>
+ *
+ * @hide
+ */
+ public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";
- public QueryMap(ContentResolver contentResolver, boolean keepUpdated,
- Handler handlerForUpdateNotifications) {
- this(contentResolver,
- contentResolver.query(CONTENT_URI, null, null, null, null),
- keepUpdated, handlerForUpdateNotifications);
- }
+ /**
+ * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
+ * @hide
+ */
+ public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;
+
+ /**
+ * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
+ * @hide
+ */
+ public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;
+
+ /**
+ * INCALL_POWER_BUTTON_BEHAVIOR default value.
+ * @hide
+ */
+ public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
+ INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;
+
+ /**
+ * The current night mode that has been selected by the user. Owned
+ * and controlled by UiModeManagerService. Constants are as per
+ * UiModeManager.
+ * @hide
+ */
+ public static final String UI_NIGHT_MODE = "ui_night_mode";
+
+ /**
+ * Let user pick default install location.
+ * @hide
+ */
+ public static final String SET_INSTALL_LOCATION = "set_install_location";
+
+ /**
+ * Default install location value.
+ * 0 = auto, let system decide
+ * 1 = internal
+ * 2 = sdcard
+ * @hide
+ */
+ public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
+
+ /**
+ * The bandwidth throttle polling freqency in seconds
+ * @hide
+ */
+ public static final String THROTTLE_POLLING_SEC = "throttle_polling_sec";
+
+ /**
+ * The bandwidth throttle threshold (long)
+ * @hide
+ */
+ public static final String THROTTLE_THRESHOLD_BYTES = "throttle_threshold_bytes";
+
+ /**
+ * The bandwidth throttle value (kbps)
+ * @hide
+ */
+ public static final String THROTTLE_VALUE_KBITSPS = "throttle_value_kbitsps";
+
+ /**
+ * The bandwidth throttle reset calendar day (1-28)
+ * @hide
+ */
+ public static final String THROTTLE_RESET_DAY = "throttle_reset_day";
+
+ /**
+ * The throttling notifications we should send
+ * @hide
+ */
+ public static final String THROTTLE_NOTIFICATION_TYPE = "throttle_notification_type";
- public String getString(String name) {
- ContentValues cv = getValues(name);
- if (cv == null) return null;
- return cv.getAsString(VALUE);
+ /**
+ * Help URI for data throttling policy
+ * @hide
+ */
+ public static final String THROTTLE_HELP_URI = "throttle_help_uri";
+
+ /**
+ * The length of time in Sec that we allow our notion of NTP time
+ * to be cached before we refresh it
+ * @hide
+ */
+ public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC =
+ "throttle_max_ntp_cache_age_sec";
+
+
+ /**
+ * @hide
+ */
+ public static final String[] SETTINGS_TO_BACKUP = {
+ ADB_ENABLED,
+ ALLOW_MOCK_LOCATION,
+ PARENTAL_CONTROL_ENABLED,
+ PARENTAL_CONTROL_REDIRECT_URL,
+ USB_MASS_STORAGE_ENABLED,
+ ACCESSIBILITY_ENABLED,
+ BACKUP_AUTO_RESTORE,
+ ENABLED_ACCESSIBILITY_SERVICES,
+ TTS_USE_DEFAULTS,
+ TTS_DEFAULT_RATE,
+ TTS_DEFAULT_PITCH,
+ TTS_DEFAULT_SYNTH,
+ TTS_DEFAULT_LANG,
+ TTS_DEFAULT_COUNTRY,
+ TTS_ENABLED_PLUGINS,
+ WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
+ WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
+ WIFI_NUM_ALLOWED_CHANNELS,
+ WIFI_NUM_OPEN_NETWORKS_KEPT,
+ MOUNT_PLAY_NOTIFICATION_SND,
+ MOUNT_UMS_AUTOSTART,
+ MOUNT_UMS_PROMPT,
+ MOUNT_UMS_NOTIFY_ENABLED,
+ UI_NIGHT_MODE
+ };
+
+ /**
+ * Helper method for determining if a location provider is enabled.
+ * @param cr the content resolver to use
+ * @param provider the location provider to query
+ * @return true if the provider is enabled
+ */
+ public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) {
+ String allowedProviders = Settings.Secure.getString(cr, LOCATION_PROVIDERS_ALLOWED);
+ if (allowedProviders != null) {
+ return (allowedProviders.equals(provider) ||
+ allowedProviders.contains("," + provider + ",") ||
+ allowedProviders.startsWith(provider + ",") ||
+ allowedProviders.endsWith("," + provider));
}
+ return false;
}
+ /**
+ * Thread-safe method for enabling or disabling a single location provider.
+ * @param cr the content resolver to use
+ * @param provider the location provider to enable or disable
+ * @param enabled true if the provider should be enabled
+ */
+ public static final void setLocationProviderEnabled(ContentResolver cr,
+ String provider, boolean enabled) {
+ // to ensure thread safety, we write the provider name with a '+' or '-'
+ // and let the SettingsProvider handle it rather than reading and modifying
+ // the list of enabled providers.
+ if (enabled) {
+ provider = "+" + provider;
+ } else {
+ provider = "-" + provider;
+ }
+ putString(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider);
+ }
}
/**
while (intent == null && c.moveToNext()) {
try {
String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT));
- intent = Intent.getIntent(intentURI);
+ intent = Intent.parseUri(intentURI, 0);
} catch (java.net.URISyntaxException e) {
// The stored URL is bad... ignore it.
} catch (IllegalArgumentException e) {
Intent intent;
try {
- intent = Intent.getIntent(intentUri);
+ intent = Intent.parseUri(intentUri, 0);
} catch (URISyntaxException e) {
return "";
}