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

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

Snap for 4698807 from e8c3ff27 to pi-release

Change-Id: I802d53aef7c16a9b36e67074670f5f45027699f3
parents b412bd84 e8c3ff27
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@

#include <camera/NdkCameraManager.h>

#include <android-base/parseint.h>
#include <android/hardware/ICameraService.h>
#include <android/hardware/BnCameraServiceListener.h>
#include <camera/CameraMetadata.h>
@@ -140,8 +141,29 @@ class CameraManagerGlobal final : public RefBase {
    static bool validStatus(int32_t status);
    static bool isStatusAvailable(int32_t status);

    // The sort logic must match the logic in
    // libcameraservice/common/CameraProviderManager.cpp::getAPI1CompatibleCameraDeviceIds
    struct CameraIdComparator {
        bool operator()(const String8& a, const String8& b) const {
            uint32_t aUint = 0, bUint = 0;
            bool aIsUint = base::ParseUint(a.c_str(), &aUint);
            bool bIsUint = base::ParseUint(b.c_str(), &bUint);

            // Uint device IDs first
            if (aIsUint && bIsUint) {
                return aUint < bUint;
            } else if (aIsUint) {
                return true;
            } else if (bIsUint) {
                return false;
            }
            // Simple string compare if both id are not uint
            return a < b;
        }
    };

    // Map camera_id -> status
    std::map<String8, int32_t> mDeviceStatusMap;
    std::map<String8, int32_t, CameraIdComparator> mDeviceStatusMap;

    // For the singleton instance
    static Mutex sLock;
+4 −2
Original line number Diff line number Diff line
@@ -1913,8 +1913,8 @@ typedef enum acamera_metadata_tag {
     * the thumbnail data will also be rotated.</p>
     * <p>Note that this orientation is relative to the orientation of the camera sensor, given
     * by ACAMERA_SENSOR_ORIENTATION.</p>
     * <p>To translate from the device orientation given by the Android sensor APIs, the following
     * sample code may be used:</p>
     * <p>To translate from the device orientation given by the Android sensor APIs for camera
     * sensors which are not EXTERNAL, the following sample code may be used:</p>
     * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
     *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
     *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
@@ -1933,6 +1933,8 @@ typedef enum acamera_metadata_tag {
     *     return jpegOrientation;
     * }
     * </code></pre>
     * <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
     * also be set to EXTERNAL. The above code is not relevant in such case.</p>
     *
     * @see ACAMERA_SENSOR_ORIENTATION
     */
+5 −7
Original line number Diff line number Diff line
@@ -341,10 +341,10 @@ status_t BnCrypto::onTransact(
                return OK;
            }

            CryptoPlugin::SubSample *subSamples =
                    new CryptoPlugin::SubSample[numSubSamples];
            std::unique_ptr<CryptoPlugin::SubSample[]> subSamples =
                    std::make_unique<CryptoPlugin::SubSample[]>(numSubSamples);

            data.read(subSamples,
            data.read(subSamples.get(),
                    sizeof(CryptoPlugin::SubSample) * numSubSamples);

            DestinationBuffer destination;
@@ -402,7 +402,7 @@ status_t BnCrypto::onTransact(
                result = -EINVAL;
            } else {
                result = decrypt(key, iv, mode, pattern, source, offset,
                        subSamples, numSubSamples, destination, &errorDetailMsg);
                        subSamples.get(), numSubSamples, destination, &errorDetailMsg);
            }

            reply->writeInt32(result);
@@ -421,9 +421,7 @@ status_t BnCrypto::onTransact(
                }
            }

            delete[] subSamples;
            subSamples = NULL;

            subSamples.reset();
            return OK;
        }

+7 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ libraries {
  loudness_enhancer {
    path /vendor/lib/soundfx/libldnhncr.so
  }
  dynamics_processing {
    path /vendor/lib/soundfx/libdynproc.so
  }
}

# Default pre-processing library. Add to audio_effect.conf "libraries" section if
@@ -129,6 +132,10 @@ effects {
    library loudness_enhancer
    uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c
  }
  dynamics_processing {
    library dynamics_processing
    uuid e0e6539b-1781-7261-676f-6d7573696340
  }
}

# Default pre-processing effects. Add to audio_effect.conf "effects" section if
+38 −0
Original line number Diff line number Diff line
# Copyright (C) 2018 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.

LOCAL_PATH:= $(call my-dir)

# DynamicsProcessing library
include $(CLEAR_VARS)

LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES:= \
    EffectDynamicsProcessing.cpp \
    dsp/DPBase.cpp

LOCAL_CFLAGS+= -O2 -fvisibility=hidden
LOCAL_CFLAGS += -Wall -Werror

LOCAL_SHARED_LIBRARIES := \
    libcutils \
    liblog \

LOCAL_MODULE_RELATIVE_PATH := soundfx
LOCAL_MODULE:= libdynproc

LOCAL_HEADER_LIBRARIES := \
    libaudioeffects

include $(BUILD_SHARED_LIBRARY)
Loading