summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-08-13 10:56:38 -0700
committerGlenn Kasten <gkasten@google.com>2014-08-13 13:31:04 -0700
commit34cc4db180c20569e62db5860c0b206be65b5117 (patch)
tree8c5e17e84d18b8c1132c2084b6b355828dc14281
parent67241476f3fd5d2ae145d64233193f823aa03a6a (diff)
downloadframeworks_base-34cc4db180c20569e62db5860c0b206be65b5117.zip
frameworks_base-34cc4db180c20569e62db5860c0b206be65b5117.tar.gz
frameworks_base-34cc4db180c20569e62db5860c0b206be65b5117.tar.bz2
Move setting to disable automatic USB routing
This moves the setting from System to Secure per review. Bug: 16381952 Change-Id: I2497ca66b4f346839490c29295528fac70e94494
-rw-r--r--core/java/android/provider/Settings.java20
-rw-r--r--media/java/android/media/AudioService.java4
2 files changed, 12 insertions, 12 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 9a41e20..8886559 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2364,16 +2364,6 @@ public final class Settings {
public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
/**
- * Whether automatic routing of system audio to USB audio peripheral is disabled.
- * The value is boolean (1 or 0), where 1 means automatic routing is disabled,
- * and 0 means automatic routing is enabled.
- *
- * @hide
- */
- public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED =
- "usb_audio_automatic_routing_disabled";
-
- /**
* Whether the audible DTMF tones are played by the dialer when dialing. The value is
* boolean (1 or 0).
*/
@@ -4745,6 +4735,16 @@ public final class Settings {
public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels";
/**
+ * Whether automatic routing of system audio to USB audio peripheral is disabled.
+ * The value is boolean (1 or 0), where 1 means automatic routing is disabled,
+ * and 0 means automatic routing is enabled.
+ *
+ * @hide
+ */
+ public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED =
+ "usb_audio_automatic_routing_disabled";
+
+ /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index c6489a6..6d0bfee 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -4618,8 +4618,8 @@ public class AudioService extends IAudioService.Stub {
// in SettingsObserver. Here we should log that a USB device is connected
// and disconnected with its address (card , device) and force the
// connection or disconnection when the setting changes.
- int isDisabled = Settings.System.getInt(mContentResolver,
- Settings.System.USB_AUDIO_AUTOMATIC_ROUTING_DISABLED, 0);
+ int isDisabled = Settings.Secure.getInt(mContentResolver,
+ Settings.Secure.USB_AUDIO_AUTOMATIC_ROUTING_DISABLED, 0);
if (isDisabled != 0) {
return;
}