am 9b6a0e04: (-s ours) am 1b81aefa: Merge "Run the charger in the healthd domain."

* commit '9b6a0e04ec56d36a935c6f045c24639f33b75b7b':
  Run the charger in the healthd domain.
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 7e4f1f8..97629d5 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -20,11 +20,9 @@
 
 BOARD_HAL_STATIC_LIBRARIES := libdumpstate.deb
 
-# TARGET_RECOVERY_UI_LIB := librecovery_ui_deb
-
 TARGET_RELEASETOOLS_EXTENSIONS := device/asus/deb
 
-TARGET_RECOVERY_FSTAB = device/asus/deb/recovery.fstab
+TARGET_RECOVERY_FSTAB = device/asus/deb/fstab.deb
 
 -include vendor/asus/deb/BoardConfigVendor.mk
 include device/asus/flo/BoardConfigCommon.mk
diff --git a/fstab.deb b/fstab.deb
index a01c9a5..e91ad31 100644
--- a/fstab.deb
+++ b/fstab.deb
@@ -8,6 +8,18 @@
 /dev/block/platform/msm_sdcc.1/by-name/userdata     /data           ext4    noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,errors=panic                           wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
 /dev/block/platform/msm_sdcc.1/by-name/persist      /persist        ext4    nosuid,nodev,barrier=1,data=ordered,nodelalloc                                                      wait
 /dev/block/platform/msm_sdcc.1/by-name/radio        /firmware       vfat    ro,uid=1000,gid=1000,fmask=0337,dmask=0227,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,context=u:object_r:radio_efs_file:s0    wait
+/dev/block/platform/msm_sdcc.1/by-name/radio        /radio          emmc    defaults                                                                                            defaults
 /dev/block/platform/msm_sdcc.1/by-name/boot         /boot           emmc    defaults                                                                                            defaults
 /dev/block/platform/msm_sdcc.1/by-name/recovery     /recovery       emmc    defaults                                                                                            defaults
 /dev/block/platform/msm_sdcc.1/by-name/misc         /misc           emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/sbl1         /sbl1           emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/sbl2         /sbl2           emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/sbl3         /sbl3           emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/tz           /tz             emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/rpm          /rpm            emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/aboot        /aboot          emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/sbl2b        /sbl2b          emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/sbl3b        /sbl3b          emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/tzb          /tzb            emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/rpmb         /rpmb           emmc    defaults                                                                                            defaults
+/dev/block/platform/msm_sdcc.1/by-name/abootb       /abootb         emmc    defaults                                                                                            defaults
diff --git a/init.deb.rc b/init.deb.rc
index cb59bae..cb28fe3 100644
--- a/init.deb.rc
+++ b/init.deb.rc
@@ -117,6 +117,8 @@
     write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
     write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
 
+    #Enable logging of the wake up reasons in the kernel log
+    write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
 
 # NFC: create data/nfc for nv storage
     mkdir /data/nfc 770 nfc nfc
@@ -350,7 +352,6 @@
 service wpa_supplicant /system/bin/wpa_supplicant \
     -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
     -I/system/etc/wifi/wpa_supplicant_overlay.conf \
-    -O/data/misc/wifi/sockets \
     -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
     #   we will start as root and wpa_supplicant will switch to user wifi
     #   after setting up the capabilities required for WEXT
@@ -366,7 +367,7 @@
     -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
     -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
     -I/system/etc/wifi/wpa_supplicant_overlay.conf \
-    -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
+    -puse_p2p_group_interface=1 \
     -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
 #   we will start as root and wpa_supplicant will switch to user wifi
 #   after setting up the capabilities required for WEXT
@@ -411,8 +412,9 @@
     # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
     write /proc/sys/net/ipv4/tcp_adv_win_scale  1
 
-service charger /charger
+service charger /sbin/healthd -c
     class charger
+    critical
     seclabel u:r:healthd:s0
 
 # virtual sdcard daemon running as media_rw (1023)
diff --git a/overlay/frameworks/base/core/res/res/values-be/config.xml b/overlay/frameworks/base/core/res/res/values-be/config.xml
deleted file mode 100644
index c9598c4..0000000
--- a/overlay/frameworks/base/core/res/res/values-be/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-  <string-array name="config_usbHostBlacklist">
-    <item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
-  </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-et/config.xml b/overlay/frameworks/base/core/res/res/values-et/config.xml
deleted file mode 100644
index c9598c4..0000000
--- a/overlay/frameworks/base/core/res/res/values-et/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-  <string-array name="config_usbHostBlacklist">
-    <item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
-  </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-ms/config.xml b/overlay/frameworks/base/core/res/res/values-ms/config.xml
deleted file mode 100644
index c9598c4..0000000
--- a/overlay/frameworks/base/core/res/res/values-ms/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-  <string-array name="config_usbHostBlacklist">
-    <item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
-  </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 2f34d11..ededddb 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -183,6 +183,7 @@
         <item>"mobile_ims,11,0,2,60000,true"</item>
         <item>"mobile_cbs,12,0,2,60000,true"</item>
         <item>"bluetooth,7,7,2,-1,true"</item>
+        <item>"ethernet,9,9,9,-1,true"</item>
     </string-array>
 
     <!-- This device is not "voice capable"; it's data-only. -->
@@ -200,6 +201,7 @@
        <item>"1,1"</item>
        <item>"0,1"</item>
        <item>"7,1"</item>
+       <item>"9,1"</item>
     </string-array>
 
     <!-- Vibrator pattern for feedback about a long screen/key press -->
@@ -257,6 +259,8 @@
 
     <!--  Maximum number of supported users -->
     <integer name="config_multiuserMaximumUsers">8</integer>
+    <!-- Whether UI for multi user should be shown -->
+    <bool name="config_enableMultiUserUI">true</bool>
 
     <!-- Indicate whether closing the lid causes the device to go to sleep and opening
          it causes the device to wake up.
diff --git a/overlay/packages/apps/Nfc/res/values/provisioning.xml b/overlay/packages/apps/Nfc/res/values/provisioning.xml
index 1ca59e3..c996eb5 100644
--- a/overlay/packages/apps/Nfc/res/values/provisioning.xml
+++ b/overlay/packages/apps/Nfc/res/values/provisioning.xml
@@ -17,12 +17,10 @@
 <!-- NFC resources that may need to be customized
      for different hardware or product builds. -->
 <resources>
-    <!-- Whether the device can receive NFC data in setup wizard -->
-    <bool name="enable_nfc_provisioning">true</bool>
-
     <!-- The accepted mime-types when NFC is enabled in setup wizard.
          Mime-types must be lower case, wildcards are *not* accepted. -->
     <string-array name="provisioning_mime_types">
         <item>application/vnd.com.google.android.nfcprovision</item>
+        <item>application/com.android.managedprovisioning</item>
     </string-array>
 </resources>
diff --git a/recovery.fstab b/recovery.fstab
deleted file mode 100644
index b72959d..0000000
--- a/recovery.fstab
+++ /dev/null
@@ -1,18 +0,0 @@
-/dev/block/platform/msm_sdcc.1/by-name/boot       /boot       emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/recovery   /recovery   emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/misc       /misc       emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/system     /system     ext4      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/userdata   /data       ext4      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/cache      /cache      ext4      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/radio      /radio      emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/sbl1       /sbl1       emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/sbl2       /sbl2       emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/sbl3       /sbl3       emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/tz         /tz         emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/rpm        /rpm        emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/aboot      /aboot      emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/sbl2b      /sbl2b      emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/sbl3b      /sbl3b      emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/tzb        /tzb        emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/rpmb       /rpmb       emmc      defaults        defaults
-/dev/block/platform/msm_sdcc.1/by-name/abootb     /abootb     emmc      defaults        defaults
diff --git a/recovery/Android.mk b/recovery/Android.mk
deleted file mode 100644
index 53651dc..0000000
--- a/recovery/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := eng
-LOCAL_C_INCLUDES += bootable/recovery
-LOCAL_SRC_FILES := recovery_ui.cpp
-
-# should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk
-LOCAL_MODULE := librecovery_ui_deb
-
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
diff --git a/recovery/recovery_ui.cpp b/recovery/recovery_ui.cpp
deleted file mode 100644
index ba6bab0..0000000
--- a/recovery/recovery_ui.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <linux/input.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-
-#include "common.h"
-#include "device.h"
-#include "screen_ui.h"
-
-const char* HEADERS[] = { "Volume up/down to move highlight;",
-                          "power button to select.",
-                          "",
-                          NULL };
-
-const char* ITEMS[] = { "reboot system now",
-                        "apply update from ADB",
-                        "wipe data/factory reset",
-                        "wipe cache partition",
-                        NULL };
-
-class DebUI : public ScreenRecoveryUI
-{
-public:
-    DebUI() :
-        consecutive_power_keys(0) {
-    }
-
-    virtual KeyAction CheckKey(int key) {
-        if (IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) {
-            return TOGGLE;
-        }
-        if (key == KEY_POWER) {
-            ++consecutive_power_keys;
-            if (consecutive_power_keys >= 7) {
-                return REBOOT;
-            }
-        } else {
-            consecutive_power_keys = 0;
-        }
-        return ENQUEUE;
-    }
-
-private:
-    int consecutive_power_keys;
-};
-
-class DebDevice : public Device
-{
-public:
-    DebDevice() :
-        ui(new DebUI) {
-    }
-
-    RecoveryUI* GetUI() { return ui; }
-
-    int HandleMenuKey(int key_code, int visible) {
-        if (visible) {
-            switch (key_code) {
-            case KEY_DOWN:
-            case KEY_VOLUMEDOWN:
-                return kHighlightDown;
-
-            case KEY_UP:
-            case KEY_VOLUMEUP:
-                return kHighlightUp;
-
-            case KEY_POWER:
-                return kInvokeItem;
-            }
-        }
-
-        return kNoAction;
-    }
-
-    BuiltinAction InvokeMenuItem(int menu_position) {
-        switch (menu_position) {
-        case 0: return REBOOT;
-        case 1: return APPLY_ADB_SIDELOAD;
-        case 2: return WIPE_DATA;
-        case 3: return WIPE_CACHE;
-        default: return NO_ACTION;
-        }
-    }
-
-    const char* const* GetMenuHeaders() { return HEADERS; }
-    const char* const* GetMenuItems() { return ITEMS; }
-
-private:
-    RecoveryUI* ui;
-};
-
-Device* make_device() {
-    return new DebDevice;
-}