Skip to content

Commit

Permalink
hammerhead: Enable HAL1 hacks
Browse files Browse the repository at this point in the history
Fixes flickering and green screen while recording video in camera apps

Change-Id: Ia6a008476e8a5ed116490bf83262a3c8229004b8
  • Loading branch information
myfluxi authored and razorloves committed Dec 6, 2016
1 parent 18f5847 commit 33b19f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ TARGET_TOUCHBOOST_FREQUENCY:= 1200

USE_DEVICE_SPECIFIC_QCOM_PROPRIETARY:= true
USE_DEVICE_SPECIFIC_CAMERA:= true
TARGET_HAS_LEGACY_CAMERA_HAL1 := true

TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS:= true

ifeq ($(USE_SVELTE_KERNEL),true)
Expand Down
4 changes: 3 additions & 1 deletion device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ PRODUCT_PROPERTY_OVERRIDES += \

# Camera configuration
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
camera.disable_zsl_mode=1
camera.disable_zsl_mode=1 \
media.stagefright.legacyencoder=true \
media.stagefright.less-secure=true

# Input resampling configuration
PRODUCT_PROPERTY_OVERRIDES += \
Expand Down
5 changes: 5 additions & 0 deletions sepolicy/mediaserver.te
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ unix_socket_send(mediaserver, mpdecision, mpdecision)
# Permit mediaserver to create sockets with no specific SELinux class.
# TODO: Investigate the specific type of socket.
allow mediaserver self:socket create_socket_perms;

allow mediaserver camera_device:chr_file rw_file_perms;
allow mediaserver audio_device:chr_file rw_file_perms;

allow mediaserver system_file:file execmod;

0 comments on commit 33b19f2

Please sign in to comment.