msm8974-common: Wire up mDNIe features

Change-Id: Ib5d2825bb50c90b6743157bd624e7156c6d5ad01
This commit is contained in:
Paul Keith 2018-02-21 21:53:05 +01:00
parent e05835ea4d
commit a6a77f987c
7 changed files with 103 additions and 0 deletions

View File

@ -58,6 +58,10 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PROPERTY_OVERRIDES += \
persist.timed.enable=true
# Advanced Display
PRODUCT_PACKAGES += \
AdvancedDisplay
# Audio
PRODUCT_PACKAGES += \
android.hardware.audio@2.0-impl \

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012-2014 The CyanogenMod Project
Copyright (C) 2018 The LineageOS 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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="mdnie_scenario_entries" translatable="false">
<item>@string/mdnie_scenario_ui</item>
<item>@string/mdnie_scenario_video</item>
<item>@string/mdnie_scenario_video_warm</item>
<item>@string/mdnie_scenario_video_cold</item>
<item>@string/mdnie_scenario_camera</item>
<item>@string/mdnie_scenario_navigation</item>
<item>@string/mdnie_scenario_gallery</item>
<item>@string/mdnie_scenario_vt</item>
<item>@string/mdnie_scenario_browser</item>
<item>@string/mdnie_scenario_ebook</item>
<item>@string/mdnie_scenario_email</item>
</string-array>
<string-array name="mdnie_scenario_entries_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
</string-array>
<string-array name="mdnie_accessibility_entries" translatable="false">
<item>@string/mdnie_accessibility_normal</item>
<item>@string/mdnie_accessibility_inverse</item>
<item>@string/mdnie_accessibility_color_blind</item>
<item>@string/mdnie_accessibility_screen_curtain</item>
<item>@string/mdnie_accessibility_grayscale</item>
<item>@string/mdnie_accessibility_gray_negative</item>
</string-array>
<string-array name="mdnie_accessibility_entries_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 The CyanogenMod Project
Copyright (C) 2018 The LineageOS 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.
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- MDNIE -->
<string name="mdnie_scenario_sysfs_file" translatable="false">"/sys/class/mdnie/mdnie/scenario"</string>
<string name="mdnie_accessibility_sysfs_file" translatable="false">"/sys/class/mdnie/mdnie/accessibility"</string>
</resources>

View File

@ -1,5 +1,6 @@
type proc_bt_sleep, fs_type;
type sysfs_mdnie, fs_type, sysfs_type;
type sysfs_sec, fs_type, sysfs_type;
type sysfs_wifi_writeable, fs_type, sysfs_type;

View File

@ -35,3 +35,10 @@
/sys/module/dhd/parameters/nvram_path u:object_r:sysfs_wifi_writeable:s0
/sys/devices/platform/bcm[0-9]+_bluetooth/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0
/sys/devices/virtual/sec/sec_key/hall_irq_ctrl u:object_r:sysfs_sec:s0
# mdnie sysfs
/sys/devices/virtual/lcd/panel/panel/auto_brightness u:object_r:sysfs_mdnie:s0
/sys/devices/virtual/mdnie/mdnie/accessibility u:object_r:sysfs_mdnie:s0
/sys/devices/virtual/mdnie/mdnie/mode u:object_r:sysfs_mdnie:s0
/sys/devices/virtual/mdnie/mdnie/outdoor u:object_r:sysfs_mdnie:s0
/sys/devices/virtual/mdnie/mdnie/scenario u:object_r:sysfs_mdnie:s0

View File

@ -0,0 +1 @@
allow system_app sysfs_mdnie:file rw_file_perms;

View File

@ -10,3 +10,4 @@ allow system_server qmuxd_socket:dir w_dir_perms;
allow system_server qmuxd_socket:sock_file { create setattr write };
allow system_server qti_debugfs:file r_file_perms;
allow system_server sensors_device:chr_file r_file_perms;
allow system_server sysfs_mdnie:file rw_file_perms;