Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge

Change-Id: I8e6b252cb0d4b89351a9fbf83ac46fe94c11e886
diff --git a/init.tilapia.rc b/init.tilapia.rc
index 4ce63d2..b9e8119 100644
--- a/init.tilapia.rc
+++ b/init.tilapia.rc
@@ -66,6 +66,12 @@
     chown bluetooth net_bt_stack /data/misc/bluetooth
     setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
 
+    # bluetooth LPM
+    chmod 0220 /proc/bluetooth/sleep/lpm
+    chmod 0220 /proc/bluetooth/sleep/btwrite
+    chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
+    chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
+
 # NFC
     setprop ro.nfc.port "I2C"
     chmod 0660 /dev/pn544
@@ -253,9 +259,6 @@
 on property:ril.ipv6.rmnet1.enable=0
     write /proc/sys/net/ipv6/conf/rmnet1/disable_ipv6 1
 
-on property:ro.debuggable=1
-    write /proc/sys/kernel/dmesg_restrict 0
-
 # Write BT BD_ADDR
 service btmacreader /system/bin/btmacreader
     class main
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 23fcc0f..11a9c5a 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -88,10 +88,6 @@
     The default represents a dual-mode smartphone -->
     <string translatable="false" name="config_wifi_p2p_device_type">1-0050F204-1</string>
 
-    <string-array name="config_overlay_locationProviderPackageNames" translatable="false">
-        <item>com.google.android.location</item>
-    </string-array>
-
     <!-- List of file paths for USB host busses to exclude from USB host support.
          For example, if the first USB bus on the device is used to communicate
          with the modem or some other restricted hardware, add "/dev/bus/usb/001/"
@@ -229,9 +225,17 @@
     <!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
     <bool name="config_unplugTurnsOnScreen">true</bool>
 
+    <!-- Boolean indicating if current platform need do one-time bluetooth address
+         re-validation -->
+    <bool name="config_bluetooth_address_validation">true</bool>
+
     <!-- The attenuation in dB applied to the lock/unlock sounds. -->
     <integer name="config_lockSoundVolumeDb">0</integer>
     
     <!--  Maximum number of supported users -->
     <integer name="config_multiuserMaximumUsers">8</integer>
+
+    <!-- reference volume index for music stream to limit headphone volume and display warning -->
+    <integer name="config_safe_media_volume_index">6</integer>
+
 </resources>
diff --git a/overlay/packages/apps/Settings/res/values/bools.xml b/overlay/packages/apps/Settings/res/values/bools.xml
index a9049d7..2538661 100644
--- a/overlay/packages/apps/Settings/res/values/bools.xml
+++ b/overlay/packages/apps/Settings/res/values/bools.xml
@@ -17,4 +17,8 @@
 <resources>
     <!-- No powercontrol widget for tablets -->
     <bool name="has_powercontrol_widget">true</bool>
+
+    <!-- Show dock settings when docked -->
+    <bool name="has_dock_settings">true</bool>
+
 </resources>