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

Commit 78b3ee27 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge "Camera service: Switch to HIDL by default, add prop to disable"

parents bc03dbeb 9cbbc837
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -90,12 +90,6 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \

LOCAL_CFLAGS += -Wall -Wextra -Werror

ifeq ($(ENABLE_TREBLE), true)

  LOCAL_CFLAGS += -DENABLE_TREBLE

endif # ENABLE_TREBLE

LOCAL_MODULE:= libcameraservice

include $(BUILD_SHARED_LIBRARY)
+6 −9
Original line number Diff line number Diff line
@@ -18,12 +18,6 @@
#define ATRACE_TAG ATRACE_TAG_CAMERA
//#define LOG_NDEBUG 0

#ifdef ENABLE_TREBLE
  #define USE_HIDL true
#else
  #define USE_HIDL false
#endif

#include <algorithm>
#include <climits>
#include <stdio.h>
@@ -197,10 +191,13 @@ void CameraService::onFirstRef()
    notifier.noteResetFlashlight();

    status_t res = INVALID_OPERATION;
    if (USE_HIDL) {
        res = enumerateProviders();
    } else {

    bool disableTreble = property_get_bool("camera.disable_treble", false);
    if (disableTreble) {
        ALOGI("Treble disabled - using legacy path");
        res = loadLegacyHalModule();
    } else {
        res = enumerateProviders();
    }
    if (res == OK) {
        mInitialized = true;