stagefright: send EOS to encoder for thumbnail extraction
am: d62d30773d

Change-Id: I3d327311145b2b557efff35b3a2527f484e47f89
diff --git a/camera/ndk/include/camera/NdkCameraCaptureSession.h b/camera/ndk/include/camera/NdkCameraCaptureSession.h
index 51cef8c..78e062a 100644
--- a/camera/ndk/include/camera/NdkCameraCaptureSession.h
+++ b/camera/ndk/include/camera/NdkCameraCaptureSession.h
@@ -38,6 +38,7 @@
 #include <android/native_window.h>
 #include "NdkCameraError.h"
 #include "NdkCameraMetadata.h"
+#include "NdkCaptureRequest.h"
 
 #ifndef _NDK_CAMERA_CAPTURE_SESSION_H
 #define _NDK_CAMERA_CAPTURE_SESSION_H
diff --git a/camera/ndk/include/camera/NdkCameraMetadata.h b/camera/ndk/include/camera/NdkCameraMetadata.h
index f2aec98..bdb1587 100644
--- a/camera/ndk/include/camera/NdkCameraMetadata.h
+++ b/camera/ndk/include/camera/NdkCameraMetadata.h
@@ -36,6 +36,7 @@
 #ifndef _NDK_CAMERA_METADATA_H
 #define _NDK_CAMERA_METADATA_H
 
+#include <stdint.h>
 #include <sys/cdefs.h>
 
 #include "NdkCameraError.h"
diff --git a/include/common_time/ICommonClock.h b/include/common_time/ICommonClock.h
deleted file mode 100644
index d7073f1..0000000
--- a/include/common_time/ICommonClock.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef ANDROID_ICOMMONCLOCK_H
-#define ANDROID_ICOMMONCLOCK_H
-
-#include <stdint.h>
-#include <linux/socket.h>
-
-#include <binder/IInterface.h>
-#include <binder/IServiceManager.h>
-
-namespace android {
-
-class ICommonClockListener : public IInterface {
-  public:
-    DECLARE_META_INTERFACE(CommonClockListener);
-
-    virtual void onTimelineChanged(uint64_t timelineID) = 0;
-};
-
-class BnCommonClockListener : public BnInterface<ICommonClockListener> {
-  public:
-    virtual status_t onTransact(uint32_t code, const Parcel& data,
-                                Parcel* reply, uint32_t flags = 0);
-};
-
-class ICommonClock : public IInterface {
-  public:
-    DECLARE_META_INTERFACE(CommonClock);
-
-    // Name of the ICommonClock service registered with the service manager.
-    static const String16 kServiceName;
-
-    // a reserved invalid timeline ID
-    static const uint64_t kInvalidTimelineID;
-
-    // a reserved invalid error estimate
-    static const int32_t kErrorEstimateUnknown;
-
-    enum State {
-        // the device just came up and is trying to discover the master
-        STATE_INITIAL,
-
-        // the device is a client of a master
-        STATE_CLIENT,
-
-        // the device is acting as master
-        STATE_MASTER,
-
-        // the device has lost contact with its master and needs to participate
-        // in the election of a new master
-        STATE_RONIN,
-
-        // the device is waiting for announcement of the newly elected master
-        STATE_WAIT_FOR_ELECTION,
-    };
-
-    virtual status_t isCommonTimeValid(bool* valid, uint32_t* timelineID) = 0;
-    virtual status_t commonTimeToLocalTime(int64_t commonTime,
-                                           int64_t* localTime) = 0;
-    virtual status_t localTimeToCommonTime(int64_t localTime,
-                                           int64_t* commonTime) = 0;
-    virtual status_t getCommonTime(int64_t* commonTime) = 0;
-    virtual status_t getCommonFreq(uint64_t* freq) = 0;
-    virtual status_t getLocalTime(int64_t* localTime) = 0;
-    virtual status_t getLocalFreq(uint64_t* freq) = 0;
-    virtual status_t getEstimatedError(int32_t* estimate) = 0;
-    virtual status_t getTimelineID(uint64_t* id) = 0;
-    virtual status_t getState(State* state) = 0;
-    virtual status_t getMasterAddr(struct sockaddr_storage* addr) = 0;
-
-    virtual status_t registerListener(
-            const sp<ICommonClockListener>& listener) = 0;
-    virtual status_t unregisterListener(
-            const sp<ICommonClockListener>& listener) = 0;
-
-    // Simple helper to make it easier to connect to the CommonClock service.
-    static inline sp<ICommonClock> getInstance() {
-        sp<IBinder> binder = defaultServiceManager()->checkService(
-                ICommonClock::kServiceName);
-        sp<ICommonClock> clk = interface_cast<ICommonClock>(binder);
-        return clk;
-    }
-};
-
-class BnCommonClock : public BnInterface<ICommonClock> {
-  public:
-    virtual status_t onTransact(uint32_t code, const Parcel& data,
-                                Parcel* reply, uint32_t flags = 0);
-};
-
-};  // namespace android
-
-#endif  // ANDROID_ICOMMONCLOCK_H
diff --git a/include/common_time/ICommonTimeConfig.h b/include/common_time/ICommonTimeConfig.h
deleted file mode 100644
index 497b666..0000000
--- a/include/common_time/ICommonTimeConfig.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 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.
- */
-
-#ifndef ANDROID_ICOMMONTIMECONFIG_H
-#define ANDROID_ICOMMONTIMECONFIG_H
-
-#include <stdint.h>
-#include <linux/socket.h>
-
-#include <binder/IInterface.h>
-#include <binder/IServiceManager.h>
-
-namespace android {
-
-class String16;
-
-class ICommonTimeConfig : public IInterface {
-  public:
-    DECLARE_META_INTERFACE(CommonTimeConfig);
-
-    // Name of the ICommonTimeConfig service registered with the service
-    // manager.
-    static const String16 kServiceName;
-
-    virtual status_t getMasterElectionPriority(uint8_t *priority) = 0;
-    virtual status_t setMasterElectionPriority(uint8_t priority) = 0;
-    virtual status_t getMasterElectionEndpoint(struct sockaddr_storage *addr) = 0;
-    virtual status_t setMasterElectionEndpoint(const struct sockaddr_storage *addr) = 0;
-    virtual status_t getMasterElectionGroupId(uint64_t *id) = 0;
-    virtual status_t setMasterElectionGroupId(uint64_t id) = 0;
-    virtual status_t getInterfaceBinding(String16& ifaceName) = 0;
-    virtual status_t setInterfaceBinding(const String16& ifaceName) = 0;
-    virtual status_t getMasterAnnounceInterval(int *interval) = 0;
-    virtual status_t setMasterAnnounceInterval(int interval) = 0;
-    virtual status_t getClientSyncInterval(int *interval) = 0;
-    virtual status_t setClientSyncInterval(int interval) = 0;
-    virtual status_t getPanicThreshold(int *threshold) = 0;
-    virtual status_t setPanicThreshold(int threshold) = 0;
-    virtual status_t getAutoDisable(bool *autoDisable) = 0;
-    virtual status_t setAutoDisable(bool autoDisable) = 0;
-    virtual status_t forceNetworklessMasterMode() = 0;
-
-    // Simple helper to make it easier to connect to the CommonTimeConfig service.
-    static inline sp<ICommonTimeConfig> getInstance() {
-        sp<IBinder> binder = defaultServiceManager()->checkService(
-                ICommonTimeConfig::kServiceName);
-        sp<ICommonTimeConfig> clk = interface_cast<ICommonTimeConfig>(binder);
-        return clk;
-    }
-};
-
-class BnCommonTimeConfig : public BnInterface<ICommonTimeConfig> {
-  public:
-    virtual status_t onTransact(uint32_t code, const Parcel& data,
-                                Parcel* reply, uint32_t flags = 0);
-};
-
-};  // namespace android
-
-#endif  // ANDROID_ICOMMONTIMECONFIG_H
diff --git a/include/common_time/cc_helper.h b/include/common_time/cc_helper.h
deleted file mode 100644
index 8c4d5c0..0000000
--- a/include/common_time/cc_helper.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef __CC_HELPER_H__
-#define __CC_HELPER_H__
-
-#include <stdint.h>
-#include <common_time/ICommonClock.h>
-#include <utils/threads.h>
-
-namespace android {
-
-// CCHelper is a simple wrapper class to help with centralizing access to the
-// Common Clock service and implementing lifetime managment, as well as to
-// implement a simple policy of making a basic attempt to reconnect to the
-// common clock service when things go wrong.
-//
-// On platforms which run the native common_time service in auto-disable mode,
-// the service will go into networkless mode whenever it has no active clients.
-// It tracks active clients using registered CommonClockListeners (the callback
-// interface for onTimelineChanged) since this provides a convienent death
-// handler notification for when the service's clients die unexpectedly.  This
-// means that users of the common time service should really always have a
-// CommonClockListener, unless they know that the time service is not running in
-// auto disabled mode, or that there is at least one other registered listener
-// active in the system.  The CCHelper makes this a little easier by sharing a
-// ref counted ICommonClock interface across all clients and automatically
-// registering and unregistering a listener whenever there are CCHelper
-// instances active in the process.
-class CCHelper {
-  public:
-    CCHelper();
-    ~CCHelper();
-
-    status_t isCommonTimeValid(bool* valid, uint32_t* timelineID);
-    status_t commonTimeToLocalTime(int64_t commonTime, int64_t* localTime);
-    status_t localTimeToCommonTime(int64_t localTime, int64_t* commonTime);
-    status_t getCommonTime(int64_t* commonTime);
-    status_t getCommonFreq(uint64_t* freq);
-    status_t getLocalTime(int64_t* localTime);
-    status_t getLocalFreq(uint64_t* freq);
-
-  private:
-    class CommonClockListener : public BnCommonClockListener {
-      public:
-        void onTimelineChanged(uint64_t timelineID);
-    };
-
-    static bool verifyClock_l();
-
-    static Mutex lock_;
-    static sp<ICommonClock> common_clock_;
-    static sp<ICommonClockListener> common_clock_listener_;
-    static uint32_t ref_count_;
-};
-
-
-}  // namespace android
-#endif  // __CC_HELPER_H__
diff --git a/include/common_time/local_clock.h b/include/common_time/local_clock.h
deleted file mode 100644
index 384c3de..0000000
--- a/include/common_time/local_clock.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-
-#ifndef __LOCAL_CLOCK_H__
-#define __LOCAL_CLOCK_H__
-
-#include <stdint.h>
-
-#include <hardware/local_time_hal.h>
-#include <utils/Errors.h>
-#include <utils/threads.h>
-
-namespace android {
-
-class LocalClock {
-  public:
-    LocalClock();
-
-    bool initCheck();
-
-    int64_t  getLocalTime();
-    uint64_t getLocalFreq();
-    status_t setLocalSlew(int16_t rate);
-    int32_t  getDebugLog(struct local_time_debug_event* records,
-                         int max_records);
-
-  private:
-    static Mutex dev_lock_;
-    static local_time_hw_device_t* dev_;
-};
-
-}  // namespace android
-#endif  // __LOCAL_CLOCK_H__
diff --git a/media/OWNERS b/media/OWNERS
index d49eb8d..1f687a2 100644
--- a/media/OWNERS
+++ b/media/OWNERS
@@ -15,5 +15,6 @@
 rachad@google.com
 rago@google.com
 robertshih@google.com
+taklee@google.com
 wjia@google.com
 wonsik@google.com
diff --git a/media/audioserver/audioserver.rc b/media/audioserver/audioserver.rc
index 75675a9..1f2e82f 100644
--- a/media/audioserver/audioserver.rc
+++ b/media/audioserver/audioserver.rc
@@ -2,7 +2,8 @@
     class core
     user audioserver
     # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
-    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct
+    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock
+    capabilities BLOCK_SUSPEND
     ioprio rt 4
     writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
     onrestart restart vendor.audio-hal-2-0
diff --git a/media/common_time/Android.mk b/media/common_time/Android.mk
deleted file mode 100644
index aaa0db2..0000000
--- a/media/common_time/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-#
-# libcommon_time_client
-# (binder marshalers for ICommonClock as well as common clock and local clock
-# helper code)
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libcommon_time_client
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := cc_helper.cpp \
-                   local_clock.cpp \
-                   ICommonClock.cpp \
-                   ICommonTimeConfig.cpp \
-                   utils.cpp
-LOCAL_SHARED_LIBRARIES := libbinder \
-                          libhardware \
-                          libutils \
-                          liblog
-
-LOCAL_CFLAGS := -Wall -Werror
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/media/common_time/ICommonClock.cpp b/media/common_time/ICommonClock.cpp
deleted file mode 100644
index f1f1fca..0000000
--- a/media/common_time/ICommonClock.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (C) 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 <sys/socket.h>
-
-#include <common_time/ICommonClock.h>
-#include <binder/Parcel.h>
-
-#include "utils.h"
-
-namespace android {
-
-/***** ICommonClock *****/
-
-enum {
-    IS_COMMON_TIME_VALID = IBinder::FIRST_CALL_TRANSACTION,
-    COMMON_TIME_TO_LOCAL_TIME,
-    LOCAL_TIME_TO_COMMON_TIME,
-    GET_COMMON_TIME,
-    GET_COMMON_FREQ,
-    GET_LOCAL_TIME,
-    GET_LOCAL_FREQ,
-    GET_ESTIMATED_ERROR,
-    GET_TIMELINE_ID,
-    GET_STATE,
-    GET_MASTER_ADDRESS,
-    REGISTER_LISTENER,
-    UNREGISTER_LISTENER,
-};
-
-const String16 ICommonClock::kServiceName("common_time.clock");
-const uint64_t ICommonClock::kInvalidTimelineID = 0;
-const int32_t ICommonClock::kErrorEstimateUnknown = 0x7FFFFFFF;
-
-class BpCommonClock : public BpInterface<ICommonClock>
-{
-  public:
-    explicit BpCommonClock(const sp<IBinder>& impl)
-        : BpInterface<ICommonClock>(impl) {}
-
-    virtual status_t isCommonTimeValid(bool* valid, uint32_t* timelineID) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(IS_COMMON_TIME_VALID,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *valid = reply.readInt32();
-                *timelineID = reply.readInt32();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t commonTimeToLocalTime(int64_t commonTime,
-            int64_t* localTime) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        data.writeInt64(commonTime);
-        status_t status = remote()->transact(COMMON_TIME_TO_LOCAL_TIME,
-                data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *localTime = reply.readInt64();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t localTimeToCommonTime(int64_t localTime,
-            int64_t* commonTime) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        data.writeInt64(localTime);
-        status_t status = remote()->transact(LOCAL_TIME_TO_COMMON_TIME,
-                data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *commonTime = reply.readInt64();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getCommonTime(int64_t* commonTime) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_COMMON_TIME, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *commonTime = reply.readInt64();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getCommonFreq(uint64_t* freq) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_COMMON_FREQ, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *freq = reply.readInt64();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getLocalTime(int64_t* localTime) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_LOCAL_TIME, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *localTime = reply.readInt64();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getLocalFreq(uint64_t* freq) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_LOCAL_FREQ, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *freq = reply.readInt64();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getEstimatedError(int32_t* estimate) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_ESTIMATED_ERROR, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *estimate = reply.readInt32();
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getTimelineID(uint64_t* id) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_TIMELINE_ID, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *id = static_cast<uint64_t>(reply.readInt64());
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getState(State* state) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_STATE, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *state = static_cast<State>(reply.readInt32());
-            }
-        }
-        return status;
-    }
-
-    virtual status_t getMasterAddr(struct sockaddr_storage* addr) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_MASTER_ADDRESS, data, &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK)
-                deserializeSockaddr(&reply, addr);
-        }
-        return status;
-    }
-
-    virtual status_t registerListener(
-            const sp<ICommonClockListener>& listener) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        data.writeStrongBinder(IInterface::asBinder(listener));
-
-        status_t status = remote()->transact(REGISTER_LISTENER, data, &reply);
-
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t unregisterListener(
-            const sp<ICommonClockListener>& listener) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
-        data.writeStrongBinder(IInterface::asBinder(listener));
-        status_t status = remote()->transact(UNREGISTER_LISTENER, data, &reply);
-
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-};
-
-IMPLEMENT_META_INTERFACE(CommonClock, "android.os.ICommonClock");
-
-status_t BnCommonClock::onTransact(uint32_t code,
-                                   const Parcel& data,
-                                   Parcel* reply,
-                                   uint32_t flags) {
-    switch(code) {
-        case IS_COMMON_TIME_VALID: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            bool valid;
-            uint32_t timelineID;
-            status_t status = isCommonTimeValid(&valid, &timelineID);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(valid);
-                reply->writeInt32(timelineID);
-            }
-            return OK;
-        } break;
-
-        case COMMON_TIME_TO_LOCAL_TIME: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            int64_t commonTime = data.readInt64();
-            int64_t localTime;
-            status_t status = commonTimeToLocalTime(commonTime, &localTime);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(localTime);
-            }
-            return OK;
-        } break;
-
-        case LOCAL_TIME_TO_COMMON_TIME: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            int64_t localTime = data.readInt64();
-            int64_t commonTime;
-            status_t status = localTimeToCommonTime(localTime, &commonTime);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(commonTime);
-            }
-            return OK;
-        } break;
-
-        case GET_COMMON_TIME: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            int64_t commonTime;
-            status_t status = getCommonTime(&commonTime);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(commonTime);
-            }
-            return OK;
-        } break;
-
-        case GET_COMMON_FREQ: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            uint64_t freq;
-            status_t status = getCommonFreq(&freq);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(freq);
-            }
-            return OK;
-        } break;
-
-        case GET_LOCAL_TIME: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            int64_t localTime;
-            status_t status = getLocalTime(&localTime);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(localTime);
-            }
-            return OK;
-        } break;
-
-        case GET_LOCAL_FREQ: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            uint64_t freq;
-            status_t status = getLocalFreq(&freq);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(freq);
-            }
-            return OK;
-        } break;
-
-        case GET_ESTIMATED_ERROR: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            int32_t error;
-            status_t status = getEstimatedError(&error);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(error);
-            }
-            return OK;
-        } break;
-
-        case GET_TIMELINE_ID: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            uint64_t id;
-            status_t status = getTimelineID(&id);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(static_cast<int64_t>(id));
-            }
-            return OK;
-        } break;
-
-        case GET_STATE: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            State state;
-            status_t status = getState(&state);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(static_cast<int32_t>(state));
-            }
-            return OK;
-        } break;
-
-        case GET_MASTER_ADDRESS: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            struct sockaddr_storage addr;
-            status_t status = getMasterAddr(&addr);
-
-            if ((status == OK) && !canSerializeSockaddr(&addr)) {
-                status = UNKNOWN_ERROR;
-            }
-
-            reply->writeInt32(status);
-
-            if (status == OK) {
-                serializeSockaddr(reply, &addr);
-            }
-
-            return OK;
-        } break;
-
-        case REGISTER_LISTENER: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            sp<ICommonClockListener> listener =
-                interface_cast<ICommonClockListener>(data.readStrongBinder());
-            status_t status = registerListener(listener);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case UNREGISTER_LISTENER: {
-            CHECK_INTERFACE(ICommonClock, data, reply);
-            sp<ICommonClockListener> listener =
-                interface_cast<ICommonClockListener>(data.readStrongBinder());
-            status_t status = unregisterListener(listener);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-    }
-    return BBinder::onTransact(code, data, reply, flags);
-}
-
-/***** ICommonClockListener *****/
-
-enum {
-    ON_TIMELINE_CHANGED = IBinder::FIRST_CALL_TRANSACTION,
-};
-
-class BpCommonClockListener : public BpInterface<ICommonClockListener>
-{
-  public:
-    explicit BpCommonClockListener(const sp<IBinder>& impl)
-        : BpInterface<ICommonClockListener>(impl) {}
-
-    virtual void onTimelineChanged(uint64_t timelineID) {
-        Parcel data, reply;
-        data.writeInterfaceToken(
-                ICommonClockListener::getInterfaceDescriptor());
-        data.writeInt64(timelineID);
-        remote()->transact(ON_TIMELINE_CHANGED, data, &reply);
-    }
-};
-
-IMPLEMENT_META_INTERFACE(CommonClockListener,
-                         "android.os.ICommonClockListener");
-
-status_t BnCommonClockListener::onTransact(
-        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
-    switch(code) {
-        case ON_TIMELINE_CHANGED: {
-            CHECK_INTERFACE(ICommonClockListener, data, reply);
-            uint32_t timelineID = data.readInt64();
-            onTimelineChanged(timelineID);
-            return NO_ERROR;
-        } break;
-    }
-
-    return BBinder::onTransact(code, data, reply, flags);
-}
-
-}; // namespace android
diff --git a/media/common_time/ICommonTimeConfig.cpp b/media/common_time/ICommonTimeConfig.cpp
deleted file mode 100644
index e587b39..0000000
--- a/media/common_time/ICommonTimeConfig.cpp
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (C) 2011 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 <sys/socket.h>
-
-#include <common_time/ICommonTimeConfig.h>
-#include <binder/Parcel.h>
-
-#include "utils.h"
-
-namespace android {
-
-/***** ICommonTimeConfig *****/
-
-enum {
-    GET_MASTER_ELECTION_PRIORITY = IBinder::FIRST_CALL_TRANSACTION,
-    SET_MASTER_ELECTION_PRIORITY,
-    GET_MASTER_ELECTION_ENDPOINT,
-    SET_MASTER_ELECTION_ENDPOINT,
-    GET_MASTER_ELECTION_GROUP_ID,
-    SET_MASTER_ELECTION_GROUP_ID,
-    GET_INTERFACE_BINDING,
-    SET_INTERFACE_BINDING,
-    GET_MASTER_ANNOUNCE_INTERVAL,
-    SET_MASTER_ANNOUNCE_INTERVAL,
-    GET_CLIENT_SYNC_INTERVAL,
-    SET_CLIENT_SYNC_INTERVAL,
-    GET_PANIC_THRESHOLD,
-    SET_PANIC_THRESHOLD,
-    GET_AUTO_DISABLE,
-    SET_AUTO_DISABLE,
-    FORCE_NETWORKLESS_MASTER_MODE,
-};
-
-const String16 ICommonTimeConfig::kServiceName("common_time.config");
-
-class BpCommonTimeConfig : public BpInterface<ICommonTimeConfig>
-{
-  public:
-    explicit BpCommonTimeConfig(const sp<IBinder>& impl)
-        : BpInterface<ICommonTimeConfig>(impl) {}
-
-    virtual status_t getMasterElectionPriority(uint8_t *priority) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_MASTER_ELECTION_PRIORITY,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *priority = static_cast<uint8_t>(reply.readInt32());
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setMasterElectionPriority(uint8_t priority) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeInt32(static_cast<int32_t>(priority));
-        status_t status = remote()->transact(SET_MASTER_ELECTION_PRIORITY,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getMasterElectionEndpoint(struct sockaddr_storage *addr) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_MASTER_ELECTION_ENDPOINT,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                deserializeSockaddr(&reply, addr);
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setMasterElectionEndpoint(
-            const struct sockaddr_storage *addr) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        if (!canSerializeSockaddr(addr))
-            return BAD_VALUE;
-        if (NULL == addr) {
-            data.writeInt32(0);
-        } else {
-            data.writeInt32(1);
-            serializeSockaddr(&data, addr);
-        }
-        status_t status = remote()->transact(SET_MASTER_ELECTION_ENDPOINT,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getMasterElectionGroupId(uint64_t *id) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_MASTER_ELECTION_GROUP_ID,
-                                             data,
-                                             &reply);
-
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *id = static_cast<uint64_t>(reply.readInt64());
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setMasterElectionGroupId(uint64_t id) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeInt64(id);
-        status_t status = remote()->transact(SET_MASTER_ELECTION_GROUP_ID,
-                                             data,
-                                             &reply);
-
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getInterfaceBinding(String16& ifaceName) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_INTERFACE_BINDING,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                ifaceName = reply.readString16();
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setInterfaceBinding(const String16& ifaceName) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeString16(ifaceName);
-        status_t status = remote()->transact(SET_INTERFACE_BINDING,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getMasterAnnounceInterval(int *interval) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_MASTER_ANNOUNCE_INTERVAL,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *interval = reply.readInt32();
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setMasterAnnounceInterval(int interval) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeInt32(interval);
-        status_t status = remote()->transact(SET_MASTER_ANNOUNCE_INTERVAL,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getClientSyncInterval(int *interval) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_CLIENT_SYNC_INTERVAL,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *interval = reply.readInt32();
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setClientSyncInterval(int interval) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeInt32(interval);
-        status_t status = remote()->transact(SET_CLIENT_SYNC_INTERVAL,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getPanicThreshold(int *threshold) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_PANIC_THRESHOLD,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *threshold = reply.readInt32();
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setPanicThreshold(int threshold) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeInt32(threshold);
-        status_t status = remote()->transact(SET_PANIC_THRESHOLD,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t getAutoDisable(bool *autoDisable) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(GET_AUTO_DISABLE,
-                                             data,
-                                             &reply);
-        if (status == OK) {
-            status = reply.readInt32();
-            if (status == OK) {
-                *autoDisable = (0 != reply.readInt32());
-            }
-        }
-
-        return status;
-    }
-
-    virtual status_t setAutoDisable(bool autoDisable) {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        data.writeInt32(autoDisable ? 1 : 0);
-        status_t status = remote()->transact(SET_AUTO_DISABLE,
-                                             data,
-                                             &reply);
-
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-
-    virtual status_t forceNetworklessMasterMode() {
-        Parcel data, reply;
-        data.writeInterfaceToken(ICommonTimeConfig::getInterfaceDescriptor());
-        status_t status = remote()->transact(FORCE_NETWORKLESS_MASTER_MODE,
-                                             data,
-                                             &reply);
-
-        if (status == OK) {
-            status = reply.readInt32();
-        }
-
-        return status;
-    }
-};
-
-IMPLEMENT_META_INTERFACE(CommonTimeConfig, "android.os.ICommonTimeConfig");
-
-status_t BnCommonTimeConfig::onTransact(uint32_t code,
-                                   const Parcel& data,
-                                   Parcel* reply,
-                                   uint32_t flags) {
-    switch(code) {
-        case GET_MASTER_ELECTION_PRIORITY: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            uint8_t priority;
-            status_t status = getMasterElectionPriority(&priority);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(static_cast<int32_t>(priority));
-            }
-            return OK;
-        } break;
-
-        case SET_MASTER_ELECTION_PRIORITY: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            uint8_t priority = static_cast<uint8_t>(data.readInt32());
-            status_t status = setMasterElectionPriority(priority);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_MASTER_ELECTION_ENDPOINT: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            struct sockaddr_storage addr;
-            status_t status = getMasterElectionEndpoint(&addr);
-
-            if ((status == OK) && !canSerializeSockaddr(&addr)) {
-                status = UNKNOWN_ERROR;
-            }
-
-            reply->writeInt32(status);
-
-            if (status == OK) {
-                serializeSockaddr(reply, &addr);
-            }
-
-            return OK;
-        } break;
-
-        case SET_MASTER_ELECTION_ENDPOINT: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            struct sockaddr_storage addr;
-            int hasAddr = data.readInt32();
-
-            status_t status;
-            if (hasAddr) {
-                deserializeSockaddr(&data, &addr);
-                status = setMasterElectionEndpoint(&addr);
-            } else {
-                status = setMasterElectionEndpoint(&addr);
-            }
-
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_MASTER_ELECTION_GROUP_ID: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            uint64_t id;
-            status_t status = getMasterElectionGroupId(&id);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt64(id);
-            }
-            return OK;
-        } break;
-
-        case SET_MASTER_ELECTION_GROUP_ID: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            uint64_t id = static_cast<uint64_t>(data.readInt64());
-            status_t status = setMasterElectionGroupId(id);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_INTERFACE_BINDING: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            String16 ret;
-            status_t status = getInterfaceBinding(ret);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeString16(ret);
-            }
-            return OK;
-        } break;
-
-        case SET_INTERFACE_BINDING: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            String16 ifaceName;
-            ifaceName = data.readString16();
-            status_t status = setInterfaceBinding(ifaceName);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_MASTER_ANNOUNCE_INTERVAL: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            int interval;
-            status_t status = getMasterAnnounceInterval(&interval);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(interval);
-            }
-            return OK;
-        } break;
-
-        case SET_MASTER_ANNOUNCE_INTERVAL: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            int interval = data.readInt32();
-            status_t status = setMasterAnnounceInterval(interval);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_CLIENT_SYNC_INTERVAL: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            int interval;
-            status_t status = getClientSyncInterval(&interval);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(interval);
-            }
-            return OK;
-        } break;
-
-        case SET_CLIENT_SYNC_INTERVAL: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            int interval = data.readInt32();
-            status_t status = setClientSyncInterval(interval);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_PANIC_THRESHOLD: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            int threshold;
-            status_t status = getPanicThreshold(&threshold);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(threshold);
-            }
-            return OK;
-        } break;
-
-        case SET_PANIC_THRESHOLD: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            int threshold = data.readInt32();
-            status_t status = setPanicThreshold(threshold);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case GET_AUTO_DISABLE: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            bool autoDisable;
-            status_t status = getAutoDisable(&autoDisable);
-            reply->writeInt32(status);
-            if (status == OK) {
-                reply->writeInt32(autoDisable ? 1 : 0);
-            }
-            return OK;
-        } break;
-
-        case SET_AUTO_DISABLE: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            bool autoDisable = (0 != data.readInt32());
-            status_t status = setAutoDisable(autoDisable);
-            reply->writeInt32(status);
-            return OK;
-        } break;
-
-        case FORCE_NETWORKLESS_MASTER_MODE: {
-            CHECK_INTERFACE(ICommonTimeConfig, data, reply);
-            status_t status = forceNetworklessMasterMode();
-            reply->writeInt32(status);
-            return OK;
-        } break;
-    }
-    return BBinder::onTransact(code, data, reply, flags);
-}
-
-}; // namespace android
-
diff --git a/media/common_time/MODULE_LICENSE_APACHE2 b/media/common_time/MODULE_LICENSE_APACHE2
deleted file mode 100644
index e69de29..0000000
--- a/media/common_time/MODULE_LICENSE_APACHE2
+++ /dev/null
diff --git a/media/common_time/NOTICE b/media/common_time/NOTICE
deleted file mode 100644
index c5b1efa..0000000
--- a/media/common_time/NOTICE
+++ /dev/null
@@ -1,190 +0,0 @@
-
-   Copyright (c) 2005-2008, 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.
-
-   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.
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
diff --git a/media/common_time/cc_helper.cpp b/media/common_time/cc_helper.cpp
deleted file mode 100644
index 6a7de74..0000000
--- a/media/common_time/cc_helper.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2011 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 <stdint.h>
-
-#include <common_time/cc_helper.h>
-#include <common_time/ICommonClock.h>
-#include <utils/threads.h>
-
-namespace android {
-
-Mutex CCHelper::lock_;
-sp<ICommonClock> CCHelper::common_clock_;
-sp<ICommonClockListener> CCHelper::common_clock_listener_;
-uint32_t CCHelper::ref_count_ = 0;
-
-bool CCHelper::verifyClock_l() {
-    bool ret = false;
-
-    if (common_clock_ == NULL) {
-        common_clock_ = ICommonClock::getInstance();
-        if (common_clock_ == NULL)
-            goto bailout;
-    }
-
-    if (ref_count_ > 0) {
-        if (common_clock_listener_ == NULL) {
-            common_clock_listener_ = new CommonClockListener();
-            if (common_clock_listener_ == NULL)
-                goto bailout;
-
-            if (OK != common_clock_->registerListener(common_clock_listener_))
-                goto bailout;
-        }
-    }
-
-    ret = true;
-
-bailout:
-    if (!ret) {
-        common_clock_listener_ = NULL;
-        common_clock_ = NULL;
-    }
-    return ret;
-}
-
-CCHelper::CCHelper() {
-    Mutex::Autolock lock(&lock_);
-    ref_count_++;
-    verifyClock_l();
-}
-
-CCHelper::~CCHelper() {
-    Mutex::Autolock lock(&lock_);
-
-    assert(ref_count_ > 0);
-    ref_count_--;
-
-    // If we were the last CCHelper instance in the system, and we had
-    // previously register a listener, unregister it now so that the common time
-    // service has the chance to go into auto-disabled mode.
-    if (!ref_count_ &&
-       (common_clock_ != NULL) &&
-       (common_clock_listener_ != NULL)) {
-        common_clock_->unregisterListener(common_clock_listener_);
-        common_clock_listener_ = NULL;
-    }
-}
-
-void CCHelper::CommonClockListener::onTimelineChanged(uint64_t /*timelineID*/) {
-    // do nothing; listener is only really used as a token so the server can
-    // find out when clients die.
-}
-
-// Helper methods which attempts to make calls to the common time binder
-// service.  If the first attempt fails with DEAD_OBJECT, the helpers will
-// attempt to make a connection to the service again (assuming that the process
-// hosting the service had crashed and the client proxy we are holding is dead)
-// If the second attempt fails, or no connection can be made, the we let the
-// error propagate up the stack and let the caller deal with the situation as
-// best they can.
-#define CCHELPER_METHOD(decl, call)                 \
-    status_t CCHelper::decl {                       \
-        Mutex::Autolock lock(&lock_);               \
-                                                    \
-        if (!verifyClock_l())                       \
-            return DEAD_OBJECT;                     \
-                                                    \
-        status_t status = common_clock_->call;      \
-        if (DEAD_OBJECT == status) {                \
-            if (!verifyClock_l())                   \
-                return DEAD_OBJECT;                 \
-            status = common_clock_->call;           \
-        }                                           \
-                                                    \
-        return status;                              \
-    }
-
-#define VERIFY_CLOCK()
-
-CCHELPER_METHOD(isCommonTimeValid(bool* valid, uint32_t* timelineID),
-                isCommonTimeValid(valid, timelineID))
-CCHELPER_METHOD(commonTimeToLocalTime(int64_t commonTime, int64_t* localTime),
-                commonTimeToLocalTime(commonTime, localTime))
-CCHELPER_METHOD(localTimeToCommonTime(int64_t localTime, int64_t* commonTime),
-                localTimeToCommonTime(localTime, commonTime))
-CCHELPER_METHOD(getCommonTime(int64_t* commonTime),
-                getCommonTime(commonTime))
-CCHELPER_METHOD(getCommonFreq(uint64_t* freq),
-                getCommonFreq(freq))
-CCHELPER_METHOD(getLocalTime(int64_t* localTime),
-                getLocalTime(localTime))
-CCHELPER_METHOD(getLocalFreq(uint64_t* freq),
-                getLocalFreq(freq))
-
-}  // namespace android
diff --git a/media/common_time/local_clock.cpp b/media/common_time/local_clock.cpp
deleted file mode 100644
index a7c61fc..0000000
--- a/media/common_time/local_clock.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#define LOG_TAG "common_time"
-#include <utils/Log.h>
-
-#include <assert.h>
-#include <stdint.h>
-
-#include <common_time/local_clock.h>
-#include <hardware/hardware.h>
-#include <hardware/local_time_hal.h>
-#include <utils/Errors.h>
-#include <utils/threads.h>
-
-namespace android {
-
-Mutex LocalClock::dev_lock_;
-local_time_hw_device_t* LocalClock::dev_ = NULL;
-
-LocalClock::LocalClock() {
-    int res;
-    const hw_module_t* mod;
-
-    AutoMutex lock(&dev_lock_);
-
-    if (dev_ != NULL)
-        return;
-
-    res = hw_get_module_by_class(LOCAL_TIME_HARDWARE_MODULE_ID, NULL, &mod);
-    if (res) {
-        ALOGE("Failed to open local time HAL module (res = %d)", res);
-    } else {
-        res = local_time_hw_device_open(mod, &dev_);
-        if (res) {
-            ALOGE("Failed to open local time HAL device (res = %d)", res);
-            dev_ = NULL;
-        }
-    }
-}
-
-bool LocalClock::initCheck() {
-    return (NULL != dev_);
-}
-
-int64_t LocalClock::getLocalTime() {
-    assert(NULL != dev_);
-    assert(NULL != dev_->get_local_time);
-
-    return dev_->get_local_time(dev_);
-}
-
-uint64_t LocalClock::getLocalFreq() {
-    assert(NULL != dev_);
-    assert(NULL != dev_->get_local_freq);
-
-    return dev_->get_local_freq(dev_);
-}
-
-status_t LocalClock::setLocalSlew(int16_t rate) {
-    assert(NULL != dev_);
-
-    if (!dev_->set_local_slew)
-        return INVALID_OPERATION;
-
-    return static_cast<status_t>(dev_->set_local_slew(dev_, rate));
-}
-
-int32_t LocalClock::getDebugLog(struct local_time_debug_event* records,
-                                int max_records) {
-    assert(NULL != dev_);
-
-    if (!dev_->get_debug_log)
-        return INVALID_OPERATION;
-
-    return dev_->get_debug_log(dev_, records, max_records);
-}
-
-}  // namespace android
diff --git a/media/common_time/utils.cpp b/media/common_time/utils.cpp
deleted file mode 100644
index 91cf2fd..0000000
--- a/media/common_time/utils.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 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 <arpa/inet.h>
-#include <linux/socket.h>
-
-#include <binder/Parcel.h>
-
-namespace android {
-
-bool canSerializeSockaddr(const struct sockaddr_storage* addr) {
-    switch (addr->ss_family) {
-        case AF_INET:
-        case AF_INET6:
-            return true;
-        default:
-            return false;
-    }
-}
-
-void serializeSockaddr(Parcel* p, const struct sockaddr_storage* addr) {
-    switch (addr->ss_family) {
-        case AF_INET: {
-            const struct sockaddr_in* s =
-                reinterpret_cast<const struct sockaddr_in*>(addr);
-            p->writeInt32(AF_INET);
-            p->writeInt32(ntohl(s->sin_addr.s_addr));
-            p->writeInt32(static_cast<int32_t>(ntohs(s->sin_port)));
-        } break;
-
-        case AF_INET6: {
-            const struct sockaddr_in6* s =
-                reinterpret_cast<const struct sockaddr_in6*>(addr);
-            const int32_t* a =
-                reinterpret_cast<const int32_t*>(s->sin6_addr.s6_addr);
-            p->writeInt32(AF_INET6);
-            p->writeInt32(ntohl(a[0]));
-            p->writeInt32(ntohl(a[1]));
-            p->writeInt32(ntohl(a[2]));
-            p->writeInt32(ntohl(a[3]));
-            p->writeInt32(static_cast<int32_t>(ntohs(s->sin6_port)));
-            p->writeInt32(ntohl(s->sin6_flowinfo));
-            p->writeInt32(ntohl(s->sin6_scope_id));
-        } break;
-    }
-}
-
-void deserializeSockaddr(const Parcel* p, struct sockaddr_storage* addr) {
-    memset(addr, 0, sizeof(*addr));
-
-    addr->ss_family = p->readInt32();
-    switch(addr->ss_family) {
-        case AF_INET: {
-            struct sockaddr_in* s =
-                reinterpret_cast<struct sockaddr_in*>(addr);
-            s->sin_addr.s_addr = htonl(p->readInt32());
-            s->sin_port = htons(static_cast<uint16_t>(p->readInt32()));
-        } break;
-
-        case AF_INET6: {
-            struct sockaddr_in6* s =
-                reinterpret_cast<struct sockaddr_in6*>(addr);
-            int32_t* a = reinterpret_cast<int32_t*>(s->sin6_addr.s6_addr);
-
-            a[0] = htonl(p->readInt32());
-            a[1] = htonl(p->readInt32());
-            a[2] = htonl(p->readInt32());
-            a[3] = htonl(p->readInt32());
-            s->sin6_port = htons(static_cast<uint16_t>(p->readInt32()));
-            s->sin6_flowinfo = htonl(p->readInt32());
-            s->sin6_scope_id = htonl(p->readInt32());
-        } break;
-    }
-}
-
-}  // namespace android
diff --git a/media/common_time/utils.h b/media/common_time/utils.h
deleted file mode 100644
index ce79d0d..0000000
--- a/media/common_time/utils.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 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.
- */
-
-#ifndef ANDROID_LIBCOMMONCLOCK_UTILS_H
-#define ANDROID_LIBCOMMONCLOCK_UTILS_H
-
-#include <linux/socket.h>
-
-#include <binder/Parcel.h>
-#include <utils/Errors.h>
-
-namespace android {
-
-extern bool canSerializeSockaddr(const struct sockaddr_storage* addr);
-extern void serializeSockaddr(Parcel* p, const struct sockaddr_storage* addr);
-extern status_t deserializeSockaddr(const Parcel* p,
-                                    struct sockaddr_storage* addr);
-
-};  // namespace android
-
-#endif  // ANDROID_LIBCOMMONCLOCK_UTILS_H
diff --git a/media/libmedia/Android.bp b/media/libmedia/Android.bp
index 1a1d6b3..1b3a1be 100644
--- a/media/libmedia/Android.bp
+++ b/media/libmedia/Android.bp
@@ -41,6 +41,7 @@
     vndk: {
         enabled: true,
     },
+    double_loadable: true,
 
     srcs: [
         "aidl/android/IGraphicBufferSource.aidl",
diff --git a/media/libmedia/exports.lds b/media/libmedia/exports.lds
index b09fbce..904a7f7 100644
--- a/media/libmedia/exports.lds
+++ b/media/libmedia/exports.lds
@@ -3,5 +3,5 @@
         *;
     local:
         _ZN7android13MidiIoWrapper*;
-        _ZTVN7android13MidiIoWrapperE;
+        _ZTVN7android13MidiIoWrapperE*;
 };
diff --git a/media/libmediaplayer2/nuplayer2/Android.bp b/media/libmediaplayer2/nuplayer2/Android.bp
index c40b361..1634f35 100644
--- a/media/libmediaplayer2/nuplayer2/Android.bp
+++ b/media/libmediaplayer2/nuplayer2/Android.bp
@@ -58,8 +58,6 @@
 
     name: "libstagefright_nuplayer2",
 
-    tags: ["eng"],
-
     sanitize: {
         cfi: true,
         diag: {
diff --git a/media/libmediaplayerservice/nuplayer/Android.bp b/media/libmediaplayerservice/nuplayer/Android.bp
index 645bb7a..a4da564 100644
--- a/media/libmediaplayerservice/nuplayer/Android.bp
+++ b/media/libmediaplayerservice/nuplayer/Android.bp
@@ -54,8 +54,6 @@
 
     name: "libstagefright_nuplayer",
 
-    tags: ["eng"],
-
     sanitize: {
         cfi: true,
         diag: {
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
index 3a28bbd..57a0198 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
@@ -358,8 +358,12 @@
 
         // AudioSink has rendered some frames.
         int64_t nowUs = ALooper::GetNowUs();
-        int64_t nowMediaUs = mAudioSink->getPlayedOutDurationUs(nowUs)
-                + mAudioFirstAnchorTimeMediaUs;
+        int64_t playedOutDurationUs = mAudioSink->getPlayedOutDurationUs(nowUs);
+        if (playedOutDurationUs == 0) {
+            *mediaUs = mAudioFirstAnchorTimeMediaUs;
+            return OK;
+        }
+        int64_t nowMediaUs = playedOutDurationUs + mAudioFirstAnchorTimeMediaUs;
         mMediaClock->updateAnchor(nowMediaUs, nowUs, -1);
     }
 
diff --git a/media/libmediaplayerservice/tests/Android.bp b/media/libmediaplayerservice/tests/Android.bp
index e936bdd..e86b68a 100644
--- a/media/libmediaplayerservice/tests/Android.bp
+++ b/media/libmediaplayerservice/tests/Android.bp
@@ -2,8 +2,6 @@
 
     name: "DrmSessionManager_test",
 
-    tags: ["tests"],
-
     srcs: ["DrmSessionManager_test.cpp"],
 
     shared_libs: [
diff --git a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp
index 8d5d071..75ca846 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp
@@ -107,6 +107,7 @@
 #else
         if ((size_t)nLayers > SIZE_MAX / sizeof(Vol *)) {
             status = PV_FALSE;
+            oscl_free(video);
             goto fail;
         }
 
@@ -115,7 +116,8 @@
         if (video->vol == NULL) status = PV_FALSE;
         video->memoryUsage += nLayers * sizeof(Vol *);
 
-
+        /* be sure not to leak any previous state */
+        PVCleanUpVideoDecoder(decCtrl);
         /* we need to setup this pointer for the application to */
         /*    pass it around.                                   */
         decCtrl->videoDecoderData = (void *) video;
diff --git a/media/libstagefright/exports.lds b/media/libstagefright/exports.lds
index 59dfc49..aabc233 100644
--- a/media/libstagefright/exports.lds
+++ b/media/libstagefright/exports.lds
@@ -9,51 +9,51 @@
         _ZN7android16SoftwareRenderer*;
         ABGRToARGB;
         ABGRToI420;
-        ABGRToUVRow_Any_NEON;
+        ABGRToUVRow_Any_NEON*;
         ABGRToUVRow_C;
-        ABGRToUVRow_NEON;
-        ABGRToYRow_Any_NEON;
+        ABGRToUVRow_NEON*;
+        ABGRToYRow_Any_NEON*;
         ABGRToYRow_C;
-        ABGRToYRow_NEON;
+        ABGRToYRow_NEON*;
         Android420ToI420;
         ARGB1555ToARGB;
-        ARGB1555ToARGBRow_Any_NEON;
+        ARGB1555ToARGBRow_Any_NEON*;
         ARGB1555ToARGBRow_C;
-        ARGB1555ToARGBRow_NEON;
+        ARGB1555ToARGBRow_NEON*;
         ARGB1555ToI420;
-        ARGB1555ToUVRow_Any_NEON;
+        ARGB1555ToUVRow_Any_NEON*;
         ARGB1555ToUVRow_C;
-        ARGB1555ToUVRow_NEON;
-        ARGB1555ToYRow_Any_NEON;
+        ARGB1555ToUVRow_NEON*;
+        ARGB1555ToYRow_Any_NEON*;
         ARGB1555ToYRow_C;
-        ARGB1555ToYRow_NEON;
+        ARGB1555ToYRow_NEON*;
         ARGB4444ToARGB;
-        ARGB4444ToARGBRow_Any_NEON;
+        ARGB4444ToARGBRow_Any_NEON*;
         ARGB4444ToARGBRow_C;
-        ARGB4444ToARGBRow_NEON;
+        ARGB4444ToARGBRow_NEON*;
         ARGB4444ToI420;
-        ARGB4444ToUVRow_Any_NEON;
+        ARGB4444ToUVRow_Any_NEON*;
         ARGB4444ToUVRow_C;
-        ARGB4444ToUVRow_NEON;
-        ARGB4444ToYRow_Any_NEON;
+        ARGB4444ToUVRow_NEON*;
+        ARGB4444ToYRow_Any_NEON*;
         ARGB4444ToYRow_C;
-        ARGB4444ToYRow_NEON;
+        ARGB4444ToYRow_NEON*;
         ARGBAdd;
-        ARGBAddRow_Any_NEON;
+        ARGBAddRow_Any_NEON*;
         ARGBAddRow_C;
-        ARGBAddRow_NEON;
+        ARGBAddRow_NEON*;
         ARGBAffineRow_C;
         ARGBAttenuate;
-        ARGBAttenuateRow_Any_NEON;
+        ARGBAttenuateRow_Any_NEON*;
         ARGBAttenuateRow_C;
-        ARGBAttenuateRow_NEON;
+        ARGBAttenuateRow_NEON*;
         ARGBBlend;
         ARGBBlendRow_C;
-        ARGBBlendRow_NEON;
+        ARGBBlendRow_NEON*;
         ARGBBlur;
         ARGBColorMatrix;
         ARGBColorMatrixRow_C;
-        ARGBColorMatrixRow_NEON;
+        ARGBColorMatrixRow_NEON*;
         ARGBColorTable;
         ARGBColorTableRow_C;
         ARGBComputeCumulativeSum;
@@ -63,97 +63,97 @@
         ARGBCopyYToAlpha;
         ARGBCopyYToAlphaRow_C;
         ARGBExtractAlpha;
-        ARGBExtractAlphaRow_Any_NEON;
+        ARGBExtractAlphaRow_Any_NEON*;
         ARGBExtractAlphaRow_C;
-        ARGBExtractAlphaRow_NEON;
+        ARGBExtractAlphaRow_NEON*;
         ARGBGray;
         ARGBGrayRow_C;
-        ARGBGrayRow_NEON;
+        ARGBGrayRow_NEON*;
         ARGBGrayTo;
         ARGBInterpolate;
         ARGBLumaColorTable;
         ARGBLumaColorTableRow_C;
         ARGBMirror;
-        ARGBMirrorRow_Any_NEON;
+        ARGBMirrorRow_Any_NEON*;
         ARGBMirrorRow_C;
-        ARGBMirrorRow_NEON;
+        ARGBMirrorRow_NEON*;
         ARGBMultiply;
-        ARGBMultiplyRow_Any_NEON;
+        ARGBMultiplyRow_Any_NEON*;
         ARGBMultiplyRow_C;
-        ARGBMultiplyRow_NEON;
+        ARGBMultiplyRow_NEON*;
         ARGBPolynomial;
         ARGBPolynomialRow_C;
         ARGBQuantize;
         ARGBQuantizeRow_C;
-        ARGBQuantizeRow_NEON;
+        ARGBQuantizeRow_NEON*;
         ARGBRect;
         ARGBSepia;
         ARGBSepiaRow_C;
-        ARGBSepiaRow_NEON;
-        ARGBSetRow_Any_NEON;
+        ARGBSepiaRow_NEON*;
+        ARGBSetRow_Any_NEON*;
         ARGBSetRow_C;
-        ARGBSetRow_NEON;
+        ARGBSetRow_NEON*;
         ARGBShade;
         ARGBShadeRow_C;
-        ARGBShadeRow_NEON;
+        ARGBShadeRow_NEON*;
         ARGBShuffle;
-        ARGBShuffleRow_Any_NEON;
+        ARGBShuffleRow_Any_NEON*;
         ARGBShuffleRow_C;
-        ARGBShuffleRow_NEON;
+        ARGBShuffleRow_NEON*;
         ARGBSobel;
         ARGBSobelToPlane;
         ARGBSobelXY;
         ARGBSubtract;
-        ARGBSubtractRow_Any_NEON;
+        ARGBSubtractRow_Any_NEON*;
         ARGBSubtractRow_C;
-        ARGBSubtractRow_NEON;
+        ARGBSubtractRow_NEON*;
         ARGBToABGR;
-        ARGBToARGB1555Row_Any_NEON;
+        ARGBToARGB1555Row_Any_NEON*;
         ARGBToARGB1555Row_C;
-        ARGBToARGB1555Row_NEON;
-        ARGBToARGB4444Row_Any_NEON;
+        ARGBToARGB1555Row_NEON*;
+        ARGBToARGB4444Row_Any_NEON*;
         ARGBToARGB4444Row_C;
-        ARGBToARGB4444Row_NEON;
+        ARGBToARGB4444Row_NEON*;
         ARGBToBGRA;
         ARGBToI420;
-        ARGBToRAWRow_Any_NEON;
+        ARGBToRAWRow_Any_NEON*;
         ARGBToRAWRow_C;
-        ARGBToRAWRow_NEON;
-        ARGBToRGB24Row_Any_NEON;
+        ARGBToRAWRow_NEON*;
+        ARGBToRGB24Row_Any_NEON*;
         ARGBToRGB24Row_C;
-        ARGBToRGB24Row_NEON;
-        ARGBToRGB565DitherRow_Any_NEON;
+        ARGBToRGB24Row_NEON*;
+        ARGBToRGB565DitherRow_Any_NEON*;
         ARGBToRGB565DitherRow_C;
-        ARGBToRGB565DitherRow_NEON;
-        ARGBToRGB565Row_Any_NEON;
+        ARGBToRGB565DitherRow_NEON*;
+        ARGBToRGB565Row_Any_NEON*;
         ARGBToRGB565Row_C;
-        ARGBToRGB565Row_NEON;
-        ARGBToUV444Row_Any_NEON;
+        ARGBToRGB565Row_NEON*;
+        ARGBToUV444Row_Any_NEON*;
         ARGBToUV444Row_C;
-        ARGBToUV444Row_NEON;
-        ARGBToUVJRow_Any_NEON;
+        ARGBToUV444Row_NEON*;
+        ARGBToUVJRow_Any_NEON*;
         ARGBToUVJRow_C;
-        ARGBToUVJRow_NEON;
-        ARGBToUVRow_Any_NEON;
+        ARGBToUVJRow_NEON*;
+        ARGBToUVRow_Any_NEON*;
         ARGBToUVRow_C;
-        ARGBToUVRow_NEON;
-        ARGBToYJRow_Any_NEON;
+        ARGBToUVRow_NEON*;
+        ARGBToYJRow_Any_NEON*;
         ARGBToYJRow_C;
-        ARGBToYJRow_NEON;
-        ARGBToYRow_Any_NEON;
+        ARGBToYJRow_NEON*;
+        ARGBToYRow_Any_NEON*;
         ARGBToYRow_C;
-        ARGBToYRow_NEON;
+        ARGBToYRow_NEON*;
         ARGBUnattenuate;
         ARGBUnattenuateRow_C;
-        ArmCpuCaps;
+        ArmCpuCaps*;
         BGRAToARGB;
         BGRAToI420;
-        BGRAToUVRow_Any_NEON;
+        BGRAToUVRow_Any_NEON*;
         BGRAToUVRow_C;
-        BGRAToUVRow_NEON;
-        BGRAToYRow_Any_NEON;
+        BGRAToUVRow_NEON*;
+        BGRAToYRow_Any_NEON*;
         BGRAToYRow_C;
-        BGRAToYRow_NEON;
+        BGRAToYRow_NEON*;
         BlendPlane;
         BlendPlaneRow_C;
         CanonicalFourCC;
@@ -162,11 +162,11 @@
         CopyPlane;
         CopyPlane_16;
         CopyRow_16_C;
-        CopyRow_Any_NEON;
+        CopyRow_Any_NEON*;
         CopyRow_C;
-        CopyRow_NEON;
-        CpuId;
-        cpu_info_;
+        CopyRow_NEON*;
+        CpuId*;
+        cpu_info_*;
         CumulativeSumToAverageRow_C;
         FixedDiv1_C;
         FixedDiv_C;
@@ -176,18 +176,18 @@
         H420ToARGB;
         H422ToABGR;
         H422ToARGB;
-        HalfFloat1Row_Any_NEON;
-        HalfFloat1Row_NEON;
+        HalfFloat1Row_Any_NEON*;
+        HalfFloat1Row_NEON*;
         HalfFloatPlane;
-        HalfFloatRow_Any_NEON;
+        HalfFloatRow_Any_NEON*;
         HalfFloatRow_C;
-        HalfFloatRow_NEON;
+        HalfFloatRow_NEON*;
         I400Copy;
         I400Mirror;
         I400ToARGB;
-        I400ToARGBRow_Any_NEON;
+        I400ToARGBRow_Any_NEON*;
         I400ToARGBRow_C;
-        I400ToARGBRow_NEON;
+        I400ToARGBRow_NEON*;
         I400ToI400;
         I400ToI420;
         I420AlphaToABGR;
@@ -216,59 +216,59 @@
         I420ToRGBA;
         I420ToUYVY;
         I420ToYUY2;
-        I422AlphaToARGBRow_Any_NEON;
+        I422AlphaToARGBRow_Any_NEON*;
         I422AlphaToARGBRow_C;
-        I422AlphaToARGBRow_NEON;
+        I422AlphaToARGBRow_NEON*;
         I422Copy;
         I422ToABGR;
         I422ToARGB;
-        I422ToARGB1555Row_Any_NEON;
+        I422ToARGB1555Row_Any_NEON*;
         I422ToARGB1555Row_C;
-        I422ToARGB1555Row_NEON;
-        I422ToARGB4444Row_Any_NEON;
+        I422ToARGB1555Row_NEON*;
+        I422ToARGB4444Row_Any_NEON*;
         I422ToARGB4444Row_C;
-        I422ToARGB4444Row_NEON;
-        I422ToARGBRow_Any_NEON;
+        I422ToARGB4444Row_NEON*;
+        I422ToARGBRow_Any_NEON*;
         I422ToARGBRow_C;
-        I422ToARGBRow_NEON;
+        I422ToARGBRow_NEON*;
         I422ToBGRA;
         I422ToI420;
-        I422ToRGB24Row_Any_NEON;
+        I422ToRGB24Row_Any_NEON*;
         I422ToRGB24Row_C;
-        I422ToRGB24Row_NEON;
+        I422ToRGB24Row_NEON*;
         I422ToRGB565;
-        I422ToRGB565Row_Any_NEON;
+        I422ToRGB565Row_Any_NEON*;
         I422ToRGB565Row_C;
-        I422ToRGB565Row_NEON;
+        I422ToRGB565Row_NEON*;
         I422ToRGBA;
-        I422ToRGBARow_Any_NEON;
+        I422ToRGBARow_Any_NEON*;
         I422ToRGBARow_C;
-        I422ToRGBARow_NEON;
+        I422ToRGBARow_NEON*;
         I422ToUYVY;
-        I422ToUYVYRow_Any_NEON;
+        I422ToUYVYRow_Any_NEON*;
         I422ToUYVYRow_C;
-        I422ToUYVYRow_NEON;
+        I422ToUYVYRow_NEON*;
         I422ToYUY2;
-        I422ToYUY2Row_Any_NEON;
+        I422ToYUY2Row_Any_NEON*;
         I422ToYUY2Row_C;
-        I422ToYUY2Row_NEON;
+        I422ToYUY2Row_NEON*;
         I444Copy;
         I444ToABGR;
         I444ToARGB;
-        I444ToARGBRow_Any_NEON;
+        I444ToARGBRow_Any_NEON*;
         I444ToARGBRow_C;
-        I444ToARGBRow_NEON;
+        I444ToARGBRow_NEON*;
         I444ToI420;
-        InitCpuFlags;
+        InitCpuFlags*;
         InterpolatePlane;
         InterpolateRow_16_C;
-        InterpolateRow_Any_NEON;
+        InterpolateRow_Any_NEON*;
         InterpolateRow_C;
-        InterpolateRow_NEON;
+        InterpolateRow_NEON*;
         J400ToARGB;
-        J400ToARGBRow_Any_NEON;
+        J400ToARGBRow_Any_NEON*;
         J400ToARGBRow_C;
-        J400ToARGBRow_NEON;
+        J400ToARGBRow_NEON*;
         J420ToABGR;
         J420ToARGB;
         J422ToABGR;
@@ -282,107 +282,107 @@
         kYvuJPEGConstants;
         M420ToARGB;
         M420ToI420;
-        MaskCpuFlags;
+        MaskCpuFlags*;
         MergeUVPlane;
-        MergeUVRow_Any_NEON;
+        MergeUVRow_Any_NEON*;
         MergeUVRow_C;
-        MergeUVRow_NEON;
-        MipsCpuCaps;
+        MergeUVRow_NEON*;
+        MipsCpuCaps*;
         MirrorPlane;
-        MirrorRow_Any_NEON;
+        MirrorRow_Any_NEON*;
         MirrorRow_C;
-        MirrorRow_NEON;
+        MirrorRow_NEON*;
         MirrorUVRow_C;
-        MirrorUVRow_NEON;
-        NV12ToARGBRow_Any_NEON;
+        MirrorUVRow_NEON*;
+        NV12ToARGBRow_Any_NEON*;
         NV12ToARGBRow_C;
-        NV12ToARGBRow_NEON;
+        NV12ToARGBRow_NEON*;
         NV12ToI420;
         NV12ToRGB565;
-        NV12ToRGB565Row_Any_NEON;
+        NV12ToRGB565Row_Any_NEON*;
         NV12ToRGB565Row_C;
-        NV12ToRGB565Row_NEON;
+        NV12ToRGB565Row_NEON*;
         NV21ToARGB;
-        NV21ToARGBRow_Any_NEON;
+        NV21ToARGBRow_Any_NEON*;
         NV21ToARGBRow_C;
-        NV21ToARGBRow_NEON;
+        NV21ToARGBRow_NEON*;
         NV21ToI420;
         RAWToARGB;
-        RAWToARGBRow_Any_NEON;
+        RAWToARGBRow_Any_NEON*;
         RAWToARGBRow_C;
-        RAWToARGBRow_NEON;
+        RAWToARGBRow_NEON*;
         RAWToI420;
         RAWToRGB24;
-        RAWToRGB24Row_Any_NEON;
+        RAWToRGB24Row_Any_NEON*;
         RAWToRGB24Row_C;
-        RAWToRGB24Row_NEON;
-        RAWToUVRow_Any_NEON;
+        RAWToRGB24Row_NEON*;
+        RAWToUVRow_Any_NEON*;
         RAWToUVRow_C;
-        RAWToUVRow_NEON;
-        RAWToYRow_Any_NEON;
+        RAWToUVRow_NEON*;
+        RAWToYRow_Any_NEON*;
         RAWToYRow_C;
-        RAWToYRow_NEON;
+        RAWToYRow_NEON*;
         RGB24ToARGB;
-        RGB24ToARGBRow_Any_NEON;
+        RGB24ToARGBRow_Any_NEON*;
         RGB24ToARGBRow_C;
-        RGB24ToARGBRow_NEON;
+        RGB24ToARGBRow_NEON*;
         RGB24ToI420;
-        RGB24ToUVRow_Any_NEON;
+        RGB24ToUVRow_Any_NEON*;
         RGB24ToUVRow_C;
-        RGB24ToUVRow_NEON;
-        RGB24ToYRow_Any_NEON;
+        RGB24ToUVRow_NEON*;
+        RGB24ToYRow_Any_NEON*;
         RGB24ToYRow_C;
-        RGB24ToYRow_NEON;
+        RGB24ToYRow_NEON*;
         RGB565ToARGB;
-        RGB565ToARGBRow_Any_NEON;
+        RGB565ToARGBRow_Any_NEON*;
         RGB565ToARGBRow_C;
-        RGB565ToARGBRow_NEON;
+        RGB565ToARGBRow_NEON*;
         RGB565ToI420;
-        RGB565ToUVRow_Any_NEON;
+        RGB565ToUVRow_Any_NEON*;
         RGB565ToUVRow_C;
-        RGB565ToUVRow_NEON;
-        RGB565ToYRow_Any_NEON;
+        RGB565ToUVRow_NEON*;
+        RGB565ToYRow_Any_NEON*;
         RGB565ToYRow_C;
-        RGB565ToYRow_NEON;
+        RGB565ToYRow_NEON*;
         RGBAToARGB;
         RGBAToI420;
-        RGBAToUVRow_Any_NEON;
+        RGBAToUVRow_Any_NEON*;
         RGBAToUVRow_C;
-        RGBAToUVRow_NEON;
-        RGBAToYRow_Any_NEON;
+        RGBAToUVRow_NEON*;
+        RGBAToYRow_Any_NEON*;
         RGBAToYRow_C;
-        RGBAToYRow_NEON;
+        RGBAToYRow_NEON*;
         RGBColorMatrix;
         RGBColorTable;
         RGBColorTableRow_C;
         Scale;
         ScaleAddRow_16_C;
         ScaleAddRow_C;
-        ScaleAddRows_NEON;
+        ScaleAddRows_NEON*;
         ScaleARGBCols64_C;
-        ScaleARGBCols_Any_NEON;
+        ScaleARGBCols_Any_NEON*;
         ScaleARGBCols_C;
-        ScaleARGBCols_NEON;
+        ScaleARGBCols_NEON*;
         ScaleARGBColsUp2_C;
         ScaleARGBFilterCols64_C;
-        ScaleARGBFilterCols_Any_NEON;
+        ScaleARGBFilterCols_Any_NEON*;
         ScaleARGBFilterCols_C;
-        ScaleARGBFilterCols_NEON;
-        ScaleARGBRowDown2_Any_NEON;
-        ScaleARGBRowDown2Box_Any_NEON;
+        ScaleARGBFilterCols_NEON*;
+        ScaleARGBRowDown2_Any_NEON*;
+        ScaleARGBRowDown2Box_Any_NEON*;
         ScaleARGBRowDown2Box_C;
-        ScaleARGBRowDown2Box_NEON;
+        ScaleARGBRowDown2Box_NEON*;
         ScaleARGBRowDown2_C;
-        ScaleARGBRowDown2Linear_Any_NEON;
+        ScaleARGBRowDown2Linear_Any_NEON*;
         ScaleARGBRowDown2Linear_C;
-        ScaleARGBRowDown2Linear_NEON;
-        ScaleARGBRowDown2_NEON;
-        ScaleARGBRowDownEven_Any_NEON;
-        ScaleARGBRowDownEvenBox_Any_NEON;
+        ScaleARGBRowDown2Linear_NEON*;
+        ScaleARGBRowDown2_NEON*;
+        ScaleARGBRowDownEven_Any_NEON*;
+        ScaleARGBRowDownEvenBox_Any_NEON*;
         ScaleARGBRowDownEvenBox_C;
-        ScaleARGBRowDownEvenBox_NEON;
+        ScaleARGBRowDownEvenBox_NEON*;
         ScaleARGBRowDownEven_C;
-        ScaleARGBRowDownEven_NEON;
+        ScaleARGBRowDownEven_NEON*;
         ScaleCols_16_C;
         ScaleCols_C;
         ScaleColsUp2_16_C;
@@ -390,11 +390,11 @@
         ScaleFilterCols_16_C;
         ScaleFilterCols64_16_C;
         ScaleFilterCols64_C;
-        ScaleFilterCols_Any_NEON;
+        ScaleFilterCols_Any_NEON*;
         ScaleFilterCols_C;
-        ScaleFilterCols_NEON;
+        ScaleFilterCols_NEON*;
         ScaleFilterReduce;
-        ScaleFilterRows_NEON;
+        ScaleFilterRows_NEON*;
         ScaleOffset;
         ScalePlane;
         ScalePlane_16;
@@ -405,104 +405,104 @@
         ScalePlaneVertical;
         ScalePlaneVertical_16;
         ScaleRowDown2_16_C;
-        ScaleRowDown2_Any_NEON;
+        ScaleRowDown2_Any_NEON*;
         ScaleRowDown2Box_16_C;
-        ScaleRowDown2Box_Any_NEON;
+        ScaleRowDown2Box_Any_NEON*;
         ScaleRowDown2Box_C;
-        ScaleRowDown2Box_NEON;
+        ScaleRowDown2Box_NEON*;
         ScaleRowDown2Box_Odd_C;
-        ScaleRowDown2Box_Odd_NEON;
+        ScaleRowDown2Box_Odd_NEON*;
         ScaleRowDown2_C;
         ScaleRowDown2Linear_16_C;
-        ScaleRowDown2Linear_Any_NEON;
+        ScaleRowDown2Linear_Any_NEON*;
         ScaleRowDown2Linear_C;
-        ScaleRowDown2Linear_NEON;
-        ScaleRowDown2_NEON;
+        ScaleRowDown2Linear_NEON*;
+        ScaleRowDown2_NEON*;
         ScaleRowDown34_0_Box_16_C;
-        ScaleRowDown34_0_Box_Any_NEON;
+        ScaleRowDown34_0_Box_Any_NEON*;
         ScaleRowDown34_0_Box_C;
-        ScaleRowDown34_0_Box_NEON;
+        ScaleRowDown34_0_Box_NEON*;
         ScaleRowDown34_16_C;
         ScaleRowDown34_1_Box_16_C;
-        ScaleRowDown34_1_Box_Any_NEON;
+        ScaleRowDown34_1_Box_Any_NEON*;
         ScaleRowDown34_1_Box_C;
-        ScaleRowDown34_1_Box_NEON;
-        ScaleRowDown34_Any_NEON;
+        ScaleRowDown34_1_Box_NEON*;
+        ScaleRowDown34_Any_NEON*;
         ScaleRowDown34_C;
-        ScaleRowDown34_NEON;
+        ScaleRowDown34_NEON*;
         ScaleRowDown38_16_C;
         ScaleRowDown38_2_Box_16_C;
-        ScaleRowDown38_2_Box_Any_NEON;
+        ScaleRowDown38_2_Box_Any_NEON*;
         ScaleRowDown38_2_Box_C;
-        ScaleRowDown38_2_Box_NEON;
+        ScaleRowDown38_2_Box_NEON*;
         ScaleRowDown38_3_Box_16_C;
-        ScaleRowDown38_3_Box_Any_NEON;
+        ScaleRowDown38_3_Box_Any_NEON*;
         ScaleRowDown38_3_Box_C;
-        ScaleRowDown38_3_Box_NEON;
-        ScaleRowDown38_Any_NEON;
+        ScaleRowDown38_3_Box_NEON*;
+        ScaleRowDown38_Any_NEON*;
         ScaleRowDown38_C;
-        ScaleRowDown38_NEON;
+        ScaleRowDown38_NEON*;
         ScaleRowDown4_16_C;
-        ScaleRowDown4_Any_NEON;
+        ScaleRowDown4_Any_NEON*;
         ScaleRowDown4Box_16_C;
-        ScaleRowDown4Box_Any_NEON;
+        ScaleRowDown4Box_Any_NEON*;
         ScaleRowDown4Box_C;
-        ScaleRowDown4Box_NEON;
+        ScaleRowDown4Box_NEON*;
         ScaleRowDown4_C;
-        ScaleRowDown4_NEON;
+        ScaleRowDown4_NEON*;
         ScaleSlope;
         SetPlane;
-        SetRow_Any_NEON;
+        SetRow_Any_NEON*;
         SetRow_C;
-        SetRow_NEON;
-        SobelRow_Any_NEON;
+        SetRow_NEON*;
+        SobelRow_Any_NEON*;
         SobelRow_C;
-        SobelRow_NEON;
-        SobelToPlaneRow_Any_NEON;
+        SobelRow_NEON*;
+        SobelToPlaneRow_Any_NEON*;
         SobelToPlaneRow_C;
-        SobelToPlaneRow_NEON;
+        SobelToPlaneRow_NEON*;
         SobelXRow_C;
-        SobelXRow_NEON;
-        SobelXYRow_Any_NEON;
+        SobelXRow_NEON*;
+        SobelXYRow_Any_NEON*;
         SobelXYRow_C;
-        SobelXYRow_NEON;
+        SobelXYRow_NEON*;
         SobelYRow_C;
-        SobelYRow_NEON;
+        SobelYRow_NEON*;
         SplitUVPlane;
-        SplitUVRow_Any_NEON;
+        SplitUVRow_Any_NEON*;
         SplitUVRow_C;
-        SplitUVRow_NEON;
+        SplitUVRow_NEON*;
         UYVYToARGB;
-        UYVYToARGBRow_Any_NEON;
+        UYVYToARGBRow_Any_NEON*;
         UYVYToARGBRow_C;
-        UYVYToARGBRow_NEON;
+        UYVYToARGBRow_NEON*;
         UYVYToI420;
         UYVYToI422;
         UYVYToNV12;
-        UYVYToUV422Row_Any_NEON;
+        UYVYToUV422Row_Any_NEON*;
         UYVYToUV422Row_C;
-        UYVYToUV422Row_NEON;
-        UYVYToUVRow_Any_NEON;
+        UYVYToUV422Row_NEON*;
+        UYVYToUVRow_Any_NEON*;
         UYVYToUVRow_C;
-        UYVYToUVRow_NEON;
-        UYVYToYRow_Any_NEON;
+        UYVYToUVRow_NEON*;
+        UYVYToYRow_Any_NEON*;
         UYVYToYRow_C;
-        UYVYToYRow_NEON;
+        UYVYToYRow_NEON*;
         YUY2ToARGB;
-        YUY2ToARGBRow_Any_NEON;
+        YUY2ToARGBRow_Any_NEON*;
         YUY2ToARGBRow_C;
-        YUY2ToARGBRow_NEON;
+        YUY2ToARGBRow_NEON*;
         YUY2ToI420;
         YUY2ToI422;
         YUY2ToNV12;
-        YUY2ToUV422Row_Any_NEON;
+        YUY2ToUV422Row_Any_NEON*;
         YUY2ToUV422Row_C;
-        YUY2ToUV422Row_NEON;
-        YUY2ToUVRow_Any_NEON;
+        YUY2ToUV422Row_NEON*;
+        YUY2ToUVRow_Any_NEON*;
         YUY2ToUVRow_C;
-        YUY2ToUVRow_NEON;
+        YUY2ToUVRow_NEON*;
         YUY2ToY;
-        YUY2ToYRow_Any_NEON;
+        YUY2ToYRow_Any_NEON*;
         YUY2ToYRow_C;
-        YUY2ToYRow_NEON;
+        YUY2ToYRow_NEON*;
 };
diff --git a/media/libstagefright/foundation/AString.cpp b/media/libstagefright/foundation/AString.cpp
index 04fac19..c6ef75f 100644
--- a/media/libstagefright/foundation/AString.cpp
+++ b/media/libstagefright/foundation/AString.cpp
@@ -31,7 +31,7 @@
 namespace android {
 
 // static
-const char *AString::kEmptyString = "";
+constexpr const char *AString::kEmptyString;
 
 AString::AString()
     : mData((char *)kEmptyString),
diff --git a/media/libstagefright/foundation/Android.bp b/media/libstagefright/foundation/Android.bp
index f663542..6b384c0 100644
--- a/media/libstagefright/foundation/Android.bp
+++ b/media/libstagefright/foundation/Android.bp
@@ -10,6 +10,7 @@
     vndk: {
         enabled: true,
     },
+    double_loadable: true,
     include_dirs: [
         "frameworks/av/include",
         "frameworks/native/include",
diff --git a/media/libstagefright/foundation/include/media/stagefright/foundation/AString.h b/media/libstagefright/foundation/include/media/stagefright/foundation/AString.h
index ff086b3..0f6299c 100644
--- a/media/libstagefright/foundation/include/media/stagefright/foundation/AString.h
+++ b/media/libstagefright/foundation/include/media/stagefright/foundation/AString.h
@@ -93,7 +93,7 @@
     status_t writeToParcel(Parcel *parcel) const;
 
 private:
-    static const char *kEmptyString;
+    constexpr static const char *kEmptyString = "";
 
     char *mData;
     size_t mSize;
diff --git a/media/ndk/include/media/NdkMediaCodec.h b/media/ndk/include/media/NdkMediaCodec.h
index f4a51d0..c49582d 100644
--- a/media/ndk/include/media/NdkMediaCodec.h
+++ b/media/ndk/include/media/NdkMediaCodec.h
@@ -14,6 +14,15 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaCodec.h
+ */
+
 /*
  * This file defines an NDK API.
  * Do not remove methods.
@@ -489,3 +498,5 @@
 __END_DECLS
 
 #endif //_NDK_MEDIA_CODEC_H
+
+/** @} */
diff --git a/media/ndk/include/media/NdkMediaCrypto.h b/media/ndk/include/media/NdkMediaCrypto.h
index d31dbdc..6f2926e 100644
--- a/media/ndk/include/media/NdkMediaCrypto.h
+++ b/media/ndk/include/media/NdkMediaCrypto.h
@@ -14,6 +14,14 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaCrypto.h
+ */
 
 /*
  * This file defines an NDK API.
@@ -54,3 +62,5 @@
 __END_DECLS
 
 #endif // _NDK_MEDIA_CRYPTO_H
+
+/** @} */
diff --git a/media/ndk/include/media/NdkMediaDrm.h b/media/ndk/include/media/NdkMediaDrm.h
index 9e9f4c3..d45dc20 100644
--- a/media/ndk/include/media/NdkMediaDrm.h
+++ b/media/ndk/include/media/NdkMediaDrm.h
@@ -14,6 +14,15 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaDrm.h
+ */
+
 /*
  * This file defines an NDK API.
  * Do not remove methods.
@@ -451,3 +460,5 @@
 __END_DECLS
 
 #endif //_NDK_MEDIA_DRM_H
+
+/** @} */
diff --git a/media/ndk/include/media/NdkMediaError.h b/media/ndk/include/media/NdkMediaError.h
index 13aacc9..75f4605 100644
--- a/media/ndk/include/media/NdkMediaError.h
+++ b/media/ndk/include/media/NdkMediaError.h
@@ -14,6 +14,14 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaError.h
+ */
 
 /*
  * This file defines an NDK API.
@@ -79,3 +87,5 @@
 __END_DECLS
 
 #endif // _NDK_MEDIA_ERROR_H
+
+/** @} */
diff --git a/media/ndk/include/media/NdkMediaExtractor.h b/media/ndk/include/media/NdkMediaExtractor.h
index f7b9cfd..3452cc9 100644
--- a/media/ndk/include/media/NdkMediaExtractor.h
+++ b/media/ndk/include/media/NdkMediaExtractor.h
@@ -14,6 +14,14 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaExtractor.h
+ */
 
 /*
  * This file defines an NDK API.
@@ -221,3 +229,5 @@
 __END_DECLS
 
 #endif // _NDK_MEDIA_EXTRACTOR_H
+
+/** @} */
diff --git a/media/ndk/include/media/NdkMediaFormat.h b/media/ndk/include/media/NdkMediaFormat.h
index 687054e..f510dff 100644
--- a/media/ndk/include/media/NdkMediaFormat.h
+++ b/media/ndk/include/media/NdkMediaFormat.h
@@ -14,6 +14,15 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaFormat.h
+ */
+
 /*
  * This file defines an NDK API.
  * Do not remove methods.
@@ -164,3 +173,5 @@
 __END_DECLS
 
 #endif // _NDK_MEDIA_FORMAT_H
+
+/** @} */
diff --git a/media/ndk/include/media/NdkMediaMuxer.h b/media/ndk/include/media/NdkMediaMuxer.h
index 1ecd1ca..dc9e0ac 100644
--- a/media/ndk/include/media/NdkMediaMuxer.h
+++ b/media/ndk/include/media/NdkMediaMuxer.h
@@ -14,6 +14,14 @@
  * limitations under the License.
  */
 
+/**
+ * @addtogroup Media
+ * @{
+ */
+
+/**
+ * @file NdkMediaMuxer.h
+ */
 
 /*
  * This file defines an NDK API.
@@ -118,3 +126,5 @@
 __END_DECLS
 
 #endif // _NDK_MEDIA_MUXER_H
+
+/** @} */
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 4b767b5..a546c8f 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -1323,6 +1323,11 @@
         setStrategyMute(STRATEGY_SONIFICATION, true, outputDesc);
     }
 
+    if (stream == AUDIO_STREAM_ENFORCED_AUDIBLE &&
+            mEngine->getForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM) == AUDIO_POLICY_FORCE_SYSTEM_ENFORCED) {
+        setStrategyMute(STRATEGY_SONIFICATION, true, outputDesc);
+    }
+
     return NO_ERROR;
 }
 
diff --git a/services/mediacodec/Android.mk b/services/mediacodec/Android.mk
index 8631c39..db5f0ff 100644
--- a/services/mediacodec/Android.mk
+++ b/services/mediacodec/Android.mk
@@ -27,9 +27,8 @@
 include $(CLEAR_VARS)
 # seccomp is not required for coverage build.
 ifneq ($(NATIVE_COVERAGE),true)
-LOCAL_REQUIRED_MODULES := crash_dump.policy
-LOCAL_REQUIRED_MODULES_arm := mediacodec.policy
-LOCAL_REQUIRED_MODULES_x86 := mediacodec.policy
+LOCAL_REQUIRED_MODULES_arm := crash_dump.policy mediacodec.policy
+LOCAL_REQUIRED_MODULES_x86 := crash_dump.policy mediacodec.policy
 endif
 LOCAL_SRC_FILES := main_codecservice.cpp
 LOCAL_SHARED_LIBRARIES := \
diff --git a/services/mediaextractor/Android.mk b/services/mediaextractor/Android.mk
index 7c6527f..37d6cc9 100644
--- a/services/mediaextractor/Android.mk
+++ b/services/mediaextractor/Android.mk
@@ -15,10 +15,9 @@
 # service executable
 include $(CLEAR_VARS)
 # seccomp filters are defined for the following architectures:
-LOCAL_REQUIRED_MODULES := crash_dump.policy
-LOCAL_REQUIRED_MODULES_arm := mediaextractor.policy
-LOCAL_REQUIRED_MODULES_arm64 := mediaextractor.policy
-LOCAL_REQUIRED_MODULES_x86 := mediaextractor.policy
+LOCAL_REQUIRED_MODULES_arm := crash_dump.policy mediaextractor.policy
+LOCAL_REQUIRED_MODULES_arm64 := crash_dump.policy mediaextractor.policy
+LOCAL_REQUIRED_MODULES_x86 := crash_dump.policy mediaextractor.policy
 
 # extractor libraries
 LOCAL_REQUIRED_MODULES += \