Skip to content

Commit

Permalink
Merge pull request #31 from sailfishos/droid70
Browse files Browse the repository at this point in the history
Android 7.0 support, and 32bit build param
  • Loading branch information
abranson committed Mar 2, 2018
2 parents 6b47a80 + cea6a40 commit 6bace35
Show file tree
Hide file tree
Showing 6 changed files with 401 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Android.mk
Expand Up @@ -58,7 +58,7 @@ LOCAL_SHARED_LIBRARIES := libc \
LOCAL_CPPFLAGS=-DANDROID_MAJOR=$(ANDROID_MAJOR) -DANDROID_MINOR=$(ANDROID_MINOR) -DANDROID_MICRO=$(ANDROID_MICRO) $(FORCE_HAL_PARAM)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libdroidmedia
ifeq ($(strip $(BOARD_QTI_CAMERA_32BIT_ONLY)), true)
ifeq ($(strip $(DROIDMEDIA_32)), true)
LOCAL_MODULE_TARGET_ARCH := arm
endif

Expand Down Expand Up @@ -87,7 +87,7 @@ LOCAL_SHARED_LIBRARIES := libcameraservice \
LOCAL_MODULE_TAGS := optional
LOCAL_CPPFLAGS=-DANDROID_MAJOR=$(ANDROID_MAJOR) -DANDROID_MINOR=$(ANDROID_MINOR) -DANDROID_MICRO=$(ANDROID_MICRO)
LOCAL_MODULE := minimediaservice
ifeq ($(strip $(BOARD_QTI_CAMERA_32BIT_ONLY)), true)
ifeq ($(strip $(DROIDMEDIA_32)), true)
LOCAL_MODULE_TARGET_ARCH := arm
endif
include $(BUILD_EXECUTABLE)
Expand All @@ -109,7 +109,7 @@ ifneq ($(shell cat frameworks/native/services/surfaceflinger/SurfaceFlinger.h |g
LOCAL_CPPFLAGS += -DUSE_SERVICES_VENDOR_EXTENSION
endif
LOCAL_MODULE := minisfservice
ifeq ($(strip $(BOARD_QTI_CAMERA_32BIT_ONLY)), true)
ifeq ($(strip $(DROIDMEDIA_32)), true)
LOCAL_MODULE_TARGET_ARCH := arm
endif
include $(BUILD_EXECUTABLE)
2 changes: 1 addition & 1 deletion allocator.cpp
Expand Up @@ -35,7 +35,7 @@ DroidMediaAllocator::~DroidMediaAllocator()
android::sp<android::GraphicBuffer>
DroidMediaAllocator::createGraphicBuffer(uint32_t w, uint32_t h,
android::PixelFormat format, uint32_t usage,
#if ANDROID_MAJOR >= 7
#if ANDROID_MAJOR >= 7 && ANDROID_MINOR >= 1
std::string requestorName,
#endif
android::status_t* error)
Expand Down
2 changes: 1 addition & 1 deletion allocator.h
Expand Up @@ -29,7 +29,7 @@ class DroidMediaAllocator : public android::BnGraphicBufferAlloc

android::sp<android::GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
android::PixelFormat format, uint32_t usage,
#if ANDROID_MAJOR >= 7
#if ANDROID_MAJOR >= 7 && ANDROID_MINOR >= 1
std::string requestorName,
#endif
android::status_t* error);
Expand Down
4 changes: 4 additions & 0 deletions minisf.cpp
Expand Up @@ -56,6 +56,10 @@
#include "services/services_6_0_0.h"
#endif

#if ANDROID_MAJOR == 7 && ANDROID_MINOR == 0
#include "services/services_7_0_0.h"
#endif

#if ANDROID_MAJOR == 7 && ANDROID_MINOR == 1
#include "services/services_7_1_0.h"
#endif
Expand Down
7 changes: 4 additions & 3 deletions rpm/droidmedia.spec
Expand Up @@ -45,16 +45,17 @@ tar -zxf %SOURCE0
mv droidmedia* droidmedia
popd

cat /dev/null > external/droidmedia/env.mk

%if %{?force_hal:1}%{!?force_hal:0}
echo Forcing Camera HAL connect version %{force_hal}
echo FORCE_HAL := %{force_hal} > external/droidmedia/env.mk
%else
cat /dev/null > external/droidmedia/env.mk
%endif

%build

if (grep -qi '^BOARD_QTI_CAMERA_32BIT_ONLY := true' device/*/*/*.mk); then
if (grep -qi '^BOARD_QTI_CAMERA_32BIT_ONLY := true' device/*/*/*.mk) || %{?droidmedia_32bit:1}%{!?droidmedia_32bit:0}; then
echo DROIDMEDIA_32 := true > external/droidmedia/env.mk
droid-make %{?_smp_mflags} libdroidmedia_32 minimediaservice minisfservice
else
droid-make %{?_smp_mflags} libdroidmedia minimediaservice minisfservice
Expand Down

0 comments on commit 6bace35

Please sign in to comment.