merge in jb-release history after reset to master
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index 8e9edd9..16bedb5 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -53,7 +53,7 @@
#define AID_KEYSTORE 1017 /* keystore subsystem */
#define AID_USB 1018 /* USB devices */
#define AID_DRM 1019 /* DRM server */
-#define AID_AVAILABLE 1020 /* available for use */
+#define AID_MDNSR 1020 /* MulticastDNSResponder (service discovery) */
#define AID_GPS 1021 /* GPS daemon */
#define AID_UNUSED1 1022 /* deprecated, DO NOT USE */
#define AID_MEDIA_RW 1023 /* internal media storage write access */
@@ -111,7 +111,7 @@
{ "install", AID_INSTALL, },
{ "media", AID_MEDIA, },
{ "drm", AID_DRM, },
- { "available", AID_AVAILABLE, },
+ { "mdnsr", AID_MDNSR, },
{ "nfc", AID_NFC, },
{ "drmrpc", AID_DRMRPC, },
{ "shell", AID_SHELL, },
diff --git a/include/system/window.h b/include/system/window.h
index 3595514..8daa44b 100644
--- a/include/system/window.h
+++ b/include/system/window.h
@@ -278,6 +278,10 @@
NATIVE_WINDOW_SCALING_MODE_FREEZE = 0,
/* the buffer is scaled in both dimensions to match the window size */
NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW = 1,
+ /* the buffer is scaled uniformly such that the smaller dimension
+ * of the buffer matches the window size (cropping in the process)
+ */
+ NATIVE_WINDOW_SCALING_MODE_SCALE_CROP = 2,
};
/* values returned by the NATIVE_WINDOW_CONCRETE_TYPE query */
diff --git a/include/sysutils/NetlinkEvent.h b/include/sysutils/NetlinkEvent.h
index 25a56f7..3494a9c 100644
--- a/include/sysutils/NetlinkEvent.h
+++ b/include/sysutils/NetlinkEvent.h
@@ -34,6 +34,8 @@
const static int NlActionChange;
const static int NlActionLinkDown;
const static int NlActionLinkUp;
+ const static int NlActionIfaceActive;
+ const static int NlActionIfaceIdle;
NetlinkEvent();
virtual ~NetlinkEvent();
diff --git a/libsysutils/src/NetlinkEvent.cpp b/libsysutils/src/NetlinkEvent.cpp
index 4beebb7..6439711 100644
--- a/libsysutils/src/NetlinkEvent.cpp
+++ b/libsysutils/src/NetlinkEvent.cpp
@@ -25,6 +25,7 @@
#include <sys/socket.h>
#include <linux/if.h>
#include <linux/netfilter/nfnetlink.h>
+#include <linux/netfilter/xt_IDLETIMER.h>
#include <linux/netfilter_ipv4/ipt_ULOG.h>
/* From kernel's net/netfilter/xt_quota2.c */
const int QLOG_NL_EVENT = 112;
@@ -38,6 +39,8 @@
const int NetlinkEvent::NlActionChange = 3;
const int NetlinkEvent::NlActionLinkUp = 4;
const int NetlinkEvent::NlActionLinkDown = 5;
+const int NetlinkEvent::NlActionIfaceActive = 6;
+const int NetlinkEvent::NlActionIfaceIdle = 7;
NetlinkEvent::NetlinkEvent() {
mAction = NlActionUnknown;
@@ -70,7 +73,8 @@
}
/*
- * Parse an binary message from a NETLINK_ROUTE netlink socket.
+ * Parse an binary message from a NETLINK_ROUTE netlink socket
+ * and IDLETIMER netlink socket.
*/
bool NetlinkEvent::parseBinaryNetlinkMessage(char *buffer, int size) {
size_t sz = size;
@@ -127,6 +131,14 @@
mSubsystem = strdup("qlog");
mAction = NlActionChange;
+ } else if (nh->nlmsg_type == NL_EVENT_TYPE_ACTIVE
+ || nh->nlmsg_type == NL_EVENT_TYPE_INACTIVE) {
+ char *ifacename;
+ ifacename = (char *)NLMSG_DATA(nh);
+ asprintf(&mParams[0], "INTERFACE=%s", ifacename);
+ mSubsystem = strdup("idletimer");
+ mAction = (nh->nlmsg_type == NL_EVENT_TYPE_ACTIVE) ?
+ NlActionIfaceActive : NlActionIfaceIdle;
} else {
SLOGD("Unexpected netlink message. type=0x%x\n", nh->nlmsg_type);
}
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 7eda6bc..90739c0 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -416,6 +416,7 @@
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
+ socket mdns stream 0660 root system
service debuggerd /system/bin/debuggerd
class main
@@ -513,3 +514,12 @@
service sshd /system/bin/start-ssh
class main
disabled
+
+service mdnsd /system/bin/mdnsd
+ class main
+ user mdnsr
+ group inet net_raw
+ socket mdnsd stream 0660 mdnsr inet
+ disabled
+ oneshot
+