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

Commit 8722a2fb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Camera: Filter small JPEG sizes based on targetSdkVersion" into sc-dev am: 54a043d3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/14801910

Change-Id: I8a6148ea58c7a87de923a1bb0163a9144f322ab7
parents aac5fca9 54a043d3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -71,9 +71,10 @@ Camera::~Camera()
}

sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName,
        int clientUid, int clientPid)
        int clientUid, int clientPid, int targetSdkVersion)
{
    return CameraBaseT::connect(cameraId, clientPackageName, clientUid, clientPid);
    return CameraBaseT::connect(cameraId, clientPackageName, clientUid,
            clientPid, targetSdkVersion);
}

status_t Camera::reconnect()
+2 −2
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ const sp<::android::hardware::ICameraService> CameraBase<TCam, TCamTraits>::getC
template <typename TCam, typename TCamTraits>
sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId,
                                               const String16& clientPackageName,
                                               int clientUid, int clientPid)
                                               int clientUid, int clientPid, int targetSdkVersion)
{
    ALOGV("%s: connect", __FUNCTION__);
    sp<TCam> c = new TCam(cameraId);
@@ -163,7 +163,7 @@ sp<TCam> CameraBase<TCam, TCamTraits>::connect(int cameraId,
    if (cs != nullptr) {
        TCamConnectService fnConnectService = TCamTraits::fnConnectService;
        ret = (cs.get()->*fnConnectService)(cl, cameraId, clientPackageName, clientUid,
                                               clientPid, /*out*/ &c->mCamera);
                                               clientPid, targetSdkVersion, /*out*/ &c->mCamera);
    }
    if (ret.isOk() && c->mCamera != nullptr) {
        IInterface::asBinder(c->mCamera)->linkToDeath(c);
+8 −4
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@ interface ICameraService
    ICamera connect(ICameraClient client,
            int cameraId,
            String opPackageName,
            int clientUid, int clientPid);
            int clientUid, int clientPid,
            int targetSdkVersion);

    /**
     * Open a camera device through the new camera API
@@ -92,7 +93,8 @@ interface ICameraService
            String cameraId,
            String opPackageName,
            @nullable String featureId,
            int clientUid, int oomScoreOffset);
            int clientUid, int oomScoreOffset,
            int targetSdkVersion);

    /**
     * Add listener for changes to camera device and flashlight state.
@@ -114,13 +116,15 @@ interface ICameraService
      * corresponding camera ids.
      *
      * @param sessions the set of camera id and session configuration pairs to be queried.
      * @param targetSdkVersion the target sdk level of the application calling this function.
      * @return true  - the set of concurrent camera id and stream combinations is supported.
      *         false - the set of concurrent camera id and stream combinations is not supported
      *                 OR the method was called with a set of camera ids not returned by
      *                 getConcurrentCameraIds().
      */
    boolean isConcurrentSessionConfigurationSupported(
            in CameraIdAndSessionConfiguration[] sessions);
            in CameraIdAndSessionConfiguration[] sessions,
            int targetSdkVersion);

    /**
     * Remove listener for changes to camera device and flashlight state.
@@ -131,7 +135,7 @@ interface ICameraService
     * Read the static camera metadata for a camera device.
     * Only supported for device HAL versions >= 3.2
     */
    CameraMetadataNative getCameraCharacteristics(String cameraId);
    CameraMetadataNative getCameraCharacteristics(String cameraId, int targetSdkVersion);

    /**
     * Read in the vendor tag descriptors from the camera module HAL.
+2 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ struct CameraTraits<Camera>
    typedef ::android::hardware::ICameraClient TCamCallbacks;
    typedef ::android::binder::Status(::android::hardware::ICameraService::*TCamConnectService)
        (const sp<::android::hardware::ICameraClient>&,
        int, const String16&, int, int,
        int, const String16&, int, int, int,
        /*out*/
        sp<::android::hardware::ICamera>*);
    static TCamConnectService     fnConnectService;
@@ -81,7 +81,7 @@ public:
    static  sp<Camera>  create(const sp<::android::hardware::ICamera>& camera);
    static  sp<Camera>  connect(int cameraId,
                                const String16& clientPackageName,
                                int clientUid, int clientPid);
                                int clientUid, int clientPid, int targetSdkVersion);

            virtual     ~Camera();

+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public:

    static sp<TCam>      connect(int cameraId,
                                 const String16& clientPackageName,
                                 int clientUid, int clientPid);
                                 int clientUid, int clientPid, int targetSdkVersion);
    virtual void         disconnect();

    void                 setListener(const sp<TCamListener>& listener);
Loading