Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5eb3b85 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4832339 from 63a0662d to pi-release

Change-Id: I42d4beebb2f6a3cb8495f026ac108af2cfb8a877
parents cad7e38a 63a0662d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ public:
     * successful only when validation is successful.
     */
    static constexpr char const * const xmlFiles[] = {
            "odm/etc/media_profiles_V1_0.xml",
            "vendor/etc/media_profiles_V1_0.xml",
            "system/etc/media_profiles.xml"
            };
+599 −840

File changed.

Preview size limit exceeded, changes collapsed.

+40 −55
Original line number Diff line number Diff line
@@ -35,32 +35,26 @@

#define MAX_MEM_ALLOCS 100

extern "C" IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_module_obj,
                        WORD32 i_cmd, WORD32 i_idx, pVOID pv_value);
extern "C" IA_ERRORCODE ia_drc_dec_api(pVOID p_ia_module_obj,
                        WORD32 i_cmd, WORD32 i_idx, pVOID pv_value);
extern "C"  IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj,
                                       pWORD32 pi_samp_freq,
                                       pWORD32 pi_num_chan,
                                       pWORD32 pi_pcm_wd_sz,
extern "C" IA_ERRORCODE ixheaacd_dec_api(pVOID p_ia_module_obj, WORD32 i_cmd, WORD32 i_idx,
                                         pVOID pv_value);
extern "C" IA_ERRORCODE ia_drc_dec_api(pVOID p_ia_module_obj, WORD32 i_cmd, WORD32 i_idx,
                                       pVOID pv_value);
extern "C" IA_ERRORCODE ixheaacd_get_config_param(pVOID p_ia_process_api_obj, pWORD32 pi_samp_freq,
                                                  pWORD32 pi_num_chan, pWORD32 pi_pcm_wd_sz,
                                                  pWORD32 pi_channel_mask);

namespace android {

struct SoftXAAC : public SimpleSoftOMXComponent {
    SoftXAAC(const char *name,
            const OMX_CALLBACKTYPE *callbacks,
            OMX_PTR appData,
    SoftXAAC(const char* name, const OMX_CALLBACKTYPE* callbacks, OMX_PTR appData,
             OMX_COMPONENTTYPE** component);

   protected:
    virtual ~SoftXAAC();

    virtual OMX_ERRORTYPE internalGetParameter(
            OMX_INDEXTYPE index, OMX_PTR params);
    virtual OMX_ERRORTYPE internalGetParameter(OMX_INDEXTYPE index, OMX_PTR params);

    virtual OMX_ERRORTYPE internalSetParameter(
            OMX_INDEXTYPE index, const OMX_PTR params);
    virtual OMX_ERRORTYPE internalSetParameter(OMX_INDEXTYPE index, const OMX_PTR params);

    virtual void onQueueFilled(OMX_U32 portIndex);
    virtual void onPortFlushCompleted(OMX_U32 portIndex);
@@ -83,11 +77,7 @@ private:
    int64_t mCurrentTimestamp;
    uint32_t mBufSize;

    enum {
        NONE,
        AWAITING_DISABLED,
        AWAITING_ENABLED
    } mOutputPortSettingsChange;
    enum { NONE, AWAITING_DISABLED, AWAITING_ENABLED } mOutputPortSettingsChange;

    void initPorts();
    status_t initDecoder();
@@ -98,19 +88,16 @@ private:

    int configXAACDecoder(uint8_t* inBuffer, uint32_t inBufferLength);
    int configMPEGDDrc();
    int decodeXAACStream(uint8_t* inBuffer,
                         uint32_t inBufferLength,
                         int32_t *bytesConsumed,
    int decodeXAACStream(uint8_t* inBuffer, uint32_t inBufferLength, int32_t* bytesConsumed,
                         int32_t* outBytes);

    int configflushDecode();
    IA_ERRORCODE getXAACStreamInfo();
    IA_ERRORCODE setXAACDRCInfo(int32_t drcCut,
                                int32_t drcBoost,
                                int32_t drcRefLevel,
    IA_ERRORCODE setXAACDRCInfo(int32_t drcCut, int32_t drcBoost, int32_t drcRefLevel,
                                int32_t drcHeavyCompression
#ifdef ENABLE_MPEG_D_DRC
                                ,int32_t drEffectType
                                ,
                                int32_t drEffectType
#endif
    );

@@ -134,12 +121,10 @@ private:
    int32_t mMpegDDRCPresent;
    int32_t mDRCFlag;


    void* mMemoryArray[MAX_MEM_ALLOCS];
    int32_t mMallocCount;

    DISALLOW_EVIL_CONSTRUCTORS(SoftXAAC);

};

}  // namespace android
+25 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/String16.h>
#include <utils/SystemClock.h>
#include <utils/Trace.h>
#include <private/android_filesystem_config.h>
#include <system/camera_vendor_tags.h>
@@ -2433,6 +2434,8 @@ bool CameraService::UidPolicy::isUidActive(uid_t uid, String16 callingPackage) {
    return isUidActiveLocked(uid, callingPackage);
}

static const int kPollUidActiveTimeoutMillis = 50;

bool CameraService::UidPolicy::isUidActiveLocked(uid_t uid, String16 callingPackage) {
    // Non-app UIDs are considered always active
    // If activity manager is unreachable, assume everything is active
@@ -2452,7 +2455,28 @@ bool CameraService::UidPolicy::isUidActiveLocked(uid_t uid, String16 callingPack
        ActivityManager am;
        // Okay to access with a lock held as UID changes are dispatched without
        // a lock and we are a higher level component.
        int64_t startTimeMillis = 0;
        do {
            // TODO: Fix this b/109950150!
            // Okay this is a hack. There is a race between the UID turning active and
            // activity being resumed. The proper fix is very risky, so we temporary add
            // some polling which should happen pretty rarely anyway as the race is hard
            // to hit.
            active = am.isUidActive(uid, callingPackage);
            if (active) {
                break;
            }
            if (startTimeMillis <= 0) {
                startTimeMillis = uptimeMillis();
            }
            int64_t ellapsedTimeMillis = uptimeMillis() - startTimeMillis;
            int64_t remainingTimeMillis = kPollUidActiveTimeoutMillis - ellapsedTimeMillis;
            if (remainingTimeMillis <= 0) {
                break;
            }
            usleep(remainingTimeMillis * 1000);
        } while (true);

        if (active) {
            // Now that we found out the UID is actually active, cache that
            mActiveUids.insert(uid);