aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AndroidProducts.mk2
-rw-r--r--aicp.dependencies7
-rw-r--r--aicp_sagit.mk (renamed from lineage_sagit.mk)10
-rw-r--r--configpanel/Android.mk32
-rw-r--r--configpanel/AndroidManifest.xml64
-rw-r--r--configpanel/proguard.flags3
-rw-r--r--configpanel/res/drawable/ic_settings_additional_buttons.xml27
-rw-r--r--configpanel/res/mipmap-anydpi/ic_launcher.xml20
-rw-r--r--configpanel/res/mipmap-hdpi/ic_background.pngbin2030 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-hdpi/ic_foreground.pngbin10481 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-mdpi/ic_background.pngbin1364 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-mdpi/ic_foreground.pngbin5246 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-xhdpi/ic_background.pngbin2545 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-xhdpi/ic_foreground.pngbin17082 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-xxhdpi/ic_background.pngbin3809 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-xxhdpi/ic_foreground.pngbin34369 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-xxxhdpi/ic_background.pngbin5218 -> 0 bytes
-rw-r--r--configpanel/res/mipmap-xxxhdpi/ic_foreground.pngbin57166 -> 0 bytes
-rw-r--r--configpanel/res/values/styles.xml50
-rw-r--r--configpanel/res/xml/button_panel.xml25
-rw-r--r--configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java31
-rw-r--r--configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java86
-rw-r--r--configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java82
-rw-r--r--configpanel/src/org/lineageos/settings/device/Constants.java40
-rw-r--r--configpanel/src/org/lineageos/settings/device/Startup.java62
-rw-r--r--configpanel/src/org/lineageos/settings/device/SwitchPreferenceBackend.java43
-rw-r--r--configpanel/src/org/lineageos/settings/device/SwitchPreferenceFilesBackend.java71
-rw-r--r--device.mk11
-rw-r--r--lineage.dependencies6
-rw-r--r--manifest.xml9
-rw-r--r--overlay-lineage/frameworks/base/core/res/res/values/lineage_config.xml20
-rw-r--r--overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml62
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml53
-rw-r--r--overlay/packages/apps/Settings/res/values/config.xml (renamed from overlay-lineage/packages/apps/Settings/res/values/config.xml)0
-rw-r--r--sepolicy/file_contexts3
-rw-r--r--sepolicy/hal_lineage_touch_default.te2
-rw-r--r--sepolicy/system_app.te3
-rw-r--r--touch/Android.bp32
-rw-r--r--touch/KeyDisabler.cpp64
-rw-r--r--touch/KeyDisabler.h46
-rw-r--r--touch/service.cpp62
-rw-r--r--touch/vendor.lineage.touch@1.0-service.sagit.rc8
42 files changed, 69 insertions, 967 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index f7f5630..282e703 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -15,4 +15,4 @@
#
PRODUCT_MAKEFILES := \
- $(LOCAL_DIR)/lineage_sagit.mk
+ $(LOCAL_DIR)/aicp_sagit.mk
diff --git a/aicp.dependencies b/aicp.dependencies
new file mode 100644
index 0000000..2250767
--- /dev/null
+++ b/aicp.dependencies
@@ -0,0 +1,7 @@
+[
+ {
+ "repository": "AICP/device_xiaomi_msm8998-common",
+ "target_path": "device/xiaomi/msm8998-common",
+ "branch": "p9.0"
+ }
+] \ No newline at end of file
diff --git a/lineage_sagit.mk b/aicp_sagit.mk
index a5f38bb..a046ac8 100644
--- a/lineage_sagit.mk
+++ b/aicp_sagit.mk
@@ -21,10 +21,10 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from sagit device
$(call inherit-product, device/xiaomi/sagit/device.mk)
-# Inherit some common Lineage stuff.
-$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
+# Inherit some common AICP stuff.
+$(call inherit-product, vendor/aicp/config/common_full_phone.mk)
-PRODUCT_NAME := lineage_sagit
+PRODUCT_NAME := aicp_sagit
PRODUCT_DEVICE := sagit
PRODUCT_BRAND := Xiaomi
PRODUCT_MODEL := MI 6
@@ -36,3 +36,7 @@ PRODUCT_BUILD_PROP_OVERRIDES += \
PRIVATE_BUILD_DESC="sagit-user 8.0.0 OPR1.170623.027 V9.2.3.0.OCAMIEK release-keys"
BUILD_FINGERPRINT := Xiaomi/sagit/sagit:8.0.0/OPR1.170623.027/V9.2.3.0.OCAMIEK:user/release-keys
+
+# AICP Device Maintainers
+PRODUCT_BUILD_PROP_OVERRIDES += \
+ DEVICE_MAINTAINERS="Miccia" \ No newline at end of file
diff --git a/configpanel/Android.mk b/configpanel/Android.mk
deleted file mode 100644
index 0bb699a..0000000
--- a/configpanel/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_PACKAGE_NAME := ConfigPanel
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- android-support-v4 \
- android-support-v7-appcompat \
- android-support-v7-preference \
- android-support-v7-recyclerview \
- android-support-v13 \
- android-support-v14-preference \
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- org.lineageos.platform.internal
-
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/res \
- $(TOP)/packages/resources/devicesettings/res
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_PACKAGE)
diff --git a/configpanel/AndroidManifest.xml b/configpanel/AndroidManifest.xml
deleted file mode 100644
index bf3741f..0000000
--- a/configpanel/AndroidManifest.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2016 The CyanogenMod Project
- Copyright (C) 2017-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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.lineageos.settings.device"
- android:versionCode="6"
- android:versionName="2.5"
- android:sharedUserId="android.uid.system">
-
- <uses-permission android:name="lineageos.permission.HARDWARE_ABSTRACTION_ACCESS" />
-
- <uses-sdk
- android:minSdkVersion="27" />
-
- <application
- android:icon="@mipmap/ic_launcher"
- android:label="@string/device_settings_app_name"
- android:theme="@style/Theme.Main"
- android:defaultToDeviceProtectedStorage="true"
- android:directBootAware="true">
-
- <provider
- android:name=".ConfigPanelSearchIndexablesProvider"
- android:authorities="org.lineageos.settings.device"
- android:multiprocess="false"
- android:grantUriPermissions="true"
- android:permission="android.permission.READ_SEARCH_INDEXABLES"
- android:exported="true">
- <intent-filter>
- <action android:name="android.content.action.SEARCH_INDEXABLES_PROVIDER" />
- </intent-filter>
- </provider>
-
- <activity
- android:name=".ButtonSettingsActivity"
- android:label="@string/button_panel_title">
- <intent-filter>
- <action android:name="org.lineageos.settings.device.ADDITIONAL_BUTTONS_SETTINGS" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
-
- <receiver android:name=".Startup" >
- <intent-filter>
- <action android:name="lineageos.intent.action.INITIALIZE_LINEAGE_HARDWARE" />
- </intent-filter>
- </receiver>
- </application>
-
-</manifest>
diff --git a/configpanel/proguard.flags b/configpanel/proguard.flags
deleted file mode 100644
index 43b57d9..0000000
--- a/configpanel/proguard.flags
+++ /dev/null
@@ -1,3 +0,0 @@
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet);
-}
diff --git a/configpanel/res/drawable/ic_settings_additional_buttons.xml b/configpanel/res/drawable/ic_settings_additional_buttons.xml
deleted file mode 100644
index 044fc23..0000000
--- a/configpanel/res/drawable/ic_settings_additional_buttons.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (c) 2016 The CyanogenMod 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.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
-
- <path
- android:fillColor="@android:color/white"
- android:pathData="M17,1L7,1C5.9,1,5,1.9,5,3v2h2v4H5v12c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z
-M11,21H7v-2h4V21z M17,21 h-4v-2h4V21z" />
-</vector>
diff --git a/configpanel/res/mipmap-anydpi/ic_launcher.xml b/configpanel/res/mipmap-anydpi/ic_launcher.xml
deleted file mode 100644
index d8649ba..0000000
--- a/configpanel/res/mipmap-anydpi/ic_launcher.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="@mipmap/ic_background"/>
- <foreground android:drawable="@mipmap/ic_foreground"/>
-</adaptive-icon>
-
diff --git a/configpanel/res/mipmap-hdpi/ic_background.png b/configpanel/res/mipmap-hdpi/ic_background.png
deleted file mode 100644
index f01deeb..0000000
--- a/configpanel/res/mipmap-hdpi/ic_background.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-hdpi/ic_foreground.png b/configpanel/res/mipmap-hdpi/ic_foreground.png
deleted file mode 100644
index 97158bc..0000000
--- a/configpanel/res/mipmap-hdpi/ic_foreground.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-mdpi/ic_background.png b/configpanel/res/mipmap-mdpi/ic_background.png
deleted file mode 100644
index 58bcf52..0000000
--- a/configpanel/res/mipmap-mdpi/ic_background.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-mdpi/ic_foreground.png b/configpanel/res/mipmap-mdpi/ic_foreground.png
deleted file mode 100644
index 7b9bc07..0000000
--- a/configpanel/res/mipmap-mdpi/ic_foreground.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-xhdpi/ic_background.png b/configpanel/res/mipmap-xhdpi/ic_background.png
deleted file mode 100644
index 681a199..0000000
--- a/configpanel/res/mipmap-xhdpi/ic_background.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-xhdpi/ic_foreground.png b/configpanel/res/mipmap-xhdpi/ic_foreground.png
deleted file mode 100644
index c079116..0000000
--- a/configpanel/res/mipmap-xhdpi/ic_foreground.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-xxhdpi/ic_background.png b/configpanel/res/mipmap-xxhdpi/ic_background.png
deleted file mode 100644
index 1e707e8..0000000
--- a/configpanel/res/mipmap-xxhdpi/ic_background.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-xxhdpi/ic_foreground.png b/configpanel/res/mipmap-xxhdpi/ic_foreground.png
deleted file mode 100644
index ecc70af..0000000
--- a/configpanel/res/mipmap-xxhdpi/ic_foreground.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-xxxhdpi/ic_background.png b/configpanel/res/mipmap-xxxhdpi/ic_background.png
deleted file mode 100644
index b6e860b..0000000
--- a/configpanel/res/mipmap-xxxhdpi/ic_background.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/mipmap-xxxhdpi/ic_foreground.png b/configpanel/res/mipmap-xxxhdpi/ic_foreground.png
deleted file mode 100644
index 3133594..0000000
--- a/configpanel/res/mipmap-xxxhdpi/ic_foreground.png
+++ /dev/null
Binary files differ
diff --git a/configpanel/res/values/styles.xml b/configpanel/res/values/styles.xml
deleted file mode 100644
index 8dbdd4f..0000000
--- a/configpanel/res/values/styles.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2014-2016 The CyanogenMod Project
- (C) 2017 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">
- <style name="Theme.Main" parent="@android:style/Theme.DeviceDefault.Settings">
- <item name="preferenceCategoryStyle">@style/Theme.Main.PreferenceCategoryStyle</item>
- <item name="preferenceFragmentStyle">@style/Theme.Main.PreferenceFragmentStyle</item>
- <item name="preferenceStyle">@style/Theme.Main.PreferenceStyle</item>
- <item name="preferenceTheme">@style/Theme.Main.PreferenceTheme</item>
- <item name="switchPreferenceStyle">@style/Theme.Main.SwitchPreferenceStyle</item>
- </style>
-
- <style name="Theme.Main.PreferenceCategoryStyle" parent="@*android:style/Preference.DeviceDefault.Category">
- <item name="allowDividerAbove">true</item>
- <item name="allowDividerBelow">true</item>
- <item name="android:layout">@layout/preference_category_material_settings</item>
- </style>
-
- <style name="Theme.Main.PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
- <item name="allowDividerAfterLastItem">false</item>
- </style>
-
- <style name="Theme.Main.PreferenceStyle" parent="@*android:style/Preference.DeviceDefault">
- <item name="allowDividerAbove">false</item>
- <item name="allowDividerBelow">true</item>
- <item name="singleLineTitle">false</item>
- <item name="android:layout">@layout/preference_material_settings</item>
- </style>
-
- <style name="Theme.Main.PreferenceTheme">
- </style>
-
- <style name="Theme.Main.SwitchPreferenceStyle" parent="@style/Theme.Main.PreferenceStyle">
- <item name="widgetLayout">@*android:layout/preference_widget_switch</item>
- </style>
-</resources>
diff --git a/configpanel/res/xml/button_panel.xml b/configpanel/res/xml/button_panel.xml
deleted file mode 100644
index 7950ee2..0000000
--- a/configpanel/res/xml/button_panel.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2016 The CyanogenMod Project
- (C) 2017 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.
--->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-
- <SwitchPreference
- android:key="button_swap"
- android:title="@string/button_swap_title"
- android:summary="@string/button_swap_summary" />
-
-</PreferenceScreen>
diff --git a/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java b/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java
deleted file mode 100644
index 737dbd5..0000000
--- a/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * (C) 2017 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.
- */
-
-package org.lineageos.settings.device;
-
-import android.os.Bundle;
-import android.preference.PreferenceActivity;
-
-public class ButtonSettingsActivity extends PreferenceActivity {
-
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- getFragmentManager().beginTransaction().replace(android.R.id.content,
- new ButtonSettingsFragment()).commit();
- }
-}
diff --git a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java
deleted file mode 100644
index 493aac9..0000000
--- a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * (C) 2017 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.
- */
-
-package org.lineageos.settings.device;
-
-import android.app.ActionBar;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.support.v14.preference.PreferenceFragment;
-import android.support.v14.preference.SwitchPreference;
-import android.support.v7.preference.ListPreference;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.Preference.OnPreferenceChangeListener;
-import android.support.v7.preference.PreferenceCategory;
-import android.support.v7.preference.PreferenceManager;
-import android.text.TextUtils;
-import android.view.MenuItem;
-
-import org.lineageos.internal.util.FileUtils;
-import org.lineageos.internal.util.PackageManagerUtils;
-
-public class ButtonSettingsFragment extends PreferenceFragment
- implements OnPreferenceChangeListener {
-
- @Override
- public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
- addPreferencesFromResource(R.xml.button_panel);
- final ActionBar actionBar = getActivity().getActionBar();
- actionBar.setDisplayHomeAsUpEnabled(true);
- }
-
- @Override
- public boolean onPreferenceChange(Preference pref, Object newValue) {
- SwitchPreferenceBackend backend = Constants.sBackendsMap.get(pref.getKey());
- Boolean value = (Boolean) newValue;
-
- backend.setValue(value);
-
- return true;
- }
-
- @Override
- public void addPreferencesFromResource(int preferencesResId) {
- super.addPreferencesFromResource(preferencesResId);
-
- // Initialize node preferences
- for (String key : Constants.sBackendsMap.keySet()) {
- SwitchPreference pref = (SwitchPreference) findPreference(key);
- if (pref == null) {
- continue;
- }
-
- pref.setOnPreferenceChangeListener(this);
-
- SwitchPreferenceBackend backend = Constants.sBackendsMap.get(key);
- if (!backend.isValid()) {
- pref.setEnabled(false);
- } else {
- pref.setChecked(backend.getValue());
- }
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == android.R.id.home) {
- getActivity().onBackPressed();
- return true;
- }
- return false;
- }
-}
diff --git a/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java b/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java
deleted file mode 100644
index b91d8b1..0000000
--- a/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * (C) 2017 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.
- */
-
-package org.lineageos.settings.device;
-
-import android.database.Cursor;
-import android.database.MatrixCursor;
-import android.provider.SearchIndexableResource;
-import android.provider.SearchIndexablesProvider;
-
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_CLASS_NAME;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_ICON_RESID;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_ACTION;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID;
-import static android.provider.SearchIndexablesContract.INDEXABLES_RAW_COLUMNS;
-import static android.provider.SearchIndexablesContract.INDEXABLES_XML_RES_COLUMNS;
-import static android.provider.SearchIndexablesContract.NON_INDEXABLES_KEYS_COLUMNS;
-
-public class ConfigPanelSearchIndexablesProvider extends SearchIndexablesProvider {
- private static final String TAG = "ConfigPanelSearchIndexablesProvider";
-
- public static final int SEARCH_IDX_BUTTON_PANEL = 0;
-
- private static SearchIndexableResource[] INDEXABLE_RES = new SearchIndexableResource[]{
- new SearchIndexableResource(1, R.xml.button_panel,
- ButtonSettingsActivity.class.getName(),
- R.drawable.ic_settings_additional_buttons),
- };
-
- @Override
- public boolean onCreate() {
- return true;
- }
-
- @Override
- public Cursor queryXmlResources(String[] projection) {
- MatrixCursor cursor = new MatrixCursor(INDEXABLES_XML_RES_COLUMNS);
- cursor.addRow(generateResourceRef(INDEXABLE_RES[SEARCH_IDX_BUTTON_PANEL]));
- return cursor;
- }
-
- private static Object[] generateResourceRef(SearchIndexableResource sir) {
- Object[] ref = new Object[7];
- ref[COLUMN_INDEX_XML_RES_RANK] = sir.rank;
- ref[COLUMN_INDEX_XML_RES_RESID] = sir.xmlResId;
- ref[COLUMN_INDEX_XML_RES_CLASS_NAME] = null;
- ref[COLUMN_INDEX_XML_RES_ICON_RESID] = sir.iconResId;
- ref[COLUMN_INDEX_XML_RES_INTENT_ACTION] = "com.android.settings.action.EXTRA_SETTINGS";
- ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE] = "org.lineageos.settings.device";
- ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS] = sir.className;
- return ref;
- }
-
- @Override
- public Cursor queryRawData(String[] projection) {
- MatrixCursor cursor = new MatrixCursor(INDEXABLES_RAW_COLUMNS);
- return cursor;
- }
-
- @Override
- public Cursor queryNonIndexableKeys(String[] projection) {
- MatrixCursor cursor = new MatrixCursor(NON_INDEXABLES_KEYS_COLUMNS);
- return cursor;
- }
-}
diff --git a/configpanel/src/org/lineageos/settings/device/Constants.java b/configpanel/src/org/lineageos/settings/device/Constants.java
deleted file mode 100644
index fd77073..0000000
--- a/configpanel/src/org/lineageos/settings/device/Constants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * (C) 2017-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.
- */
-
-package org.lineageos.settings.device;
-
-import org.lineageos.internal.util.FileUtils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class Constants {
-
- // Preference keys
- public static final String BUTTON_SWAP_KEY = "button_swap";
-
- // Nodes
- public static final String BUTTON_SWAP_PATH = "/proc/touchpanel/reversed_keys_enable";
-
- // Holds <preference_key> -> <proc_node> mapping
- public static final Map<String, SwitchPreferenceBackend> sBackendsMap = new HashMap<>();
-
- static {
- sBackendsMap.put(BUTTON_SWAP_KEY,
- new SwitchPreferenceFilesBackend(BUTTON_SWAP_PATH, false));
- }
-}
diff --git a/configpanel/src/org/lineageos/settings/device/Startup.java b/configpanel/src/org/lineageos/settings/device/Startup.java
deleted file mode 100644
index d3af1de..0000000
--- a/configpanel/src/org/lineageos/settings/device/Startup.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * (C) 2017-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.
- */
-
-package org.lineageos.settings.device;
-
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.SharedPreferences;
-import android.support.v7.preference.PreferenceManager;
-import android.util.Log;
-
-import org.lineageos.internal.util.FileUtils;
-
-public class Startup extends BroadcastReceiver {
-
- private static final String TAG = Startup.class.getSimpleName();
-
- @Override
- public void onReceive(Context context, Intent intent) {
- final String action = intent.getAction();
- if (lineageos.content.Intent.ACTION_INITIALIZE_LINEAGE_HARDWARE.equals(action)) {
- enableComponent(context, ButtonSettingsActivity.class.getName());
-
- // Restore saved preference values
- SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
- for (String key : Constants.sBackendsMap.keySet()) {
- SwitchPreferenceBackend backend = Constants.sBackendsMap.get(key);
- Boolean value = preferences.getBoolean(key, backend.getDefaultValue());
-
- backend.setValue(value);
- }
- }
- }
-
- private void enableComponent(Context context, String component) {
- ComponentName name = new ComponentName(context, component);
- PackageManager pm = context.getPackageManager();
- if (pm.getComponentEnabledSetting(name)
- == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) {
- pm.setComponentEnabledSetting(name,
- PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
- PackageManager.DONT_KILL_APP);
- }
- }
-}
diff --git a/configpanel/src/org/lineageos/settings/device/SwitchPreferenceBackend.java b/configpanel/src/org/lineageos/settings/device/SwitchPreferenceBackend.java
deleted file mode 100644
index 3100f4a..0000000
--- a/configpanel/src/org/lineageos/settings/device/SwitchPreferenceBackend.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.
- */
-
-package org.lineageos.settings.device;
-
-public abstract class SwitchPreferenceBackend {
- protected Boolean mDefaultValue;
- protected Boolean mValue;
-
- public SwitchPreferenceBackend(Boolean defaultValue) {
- mDefaultValue = defaultValue;
- mValue = defaultValue;
- }
-
- public Boolean getValue() {
- return mValue;
- }
-
- public Boolean getDefaultValue() {
- return mDefaultValue;
- }
-
- public void setDefaultValue() {
- setValue(mDefaultValue);
- }
-
- public abstract void setValue(Boolean value);
-
- public abstract Boolean isValid();
-}
diff --git a/configpanel/src/org/lineageos/settings/device/SwitchPreferenceFilesBackend.java b/configpanel/src/org/lineageos/settings/device/SwitchPreferenceFilesBackend.java
deleted file mode 100644
index f701bbc..0000000
--- a/configpanel/src/org/lineageos/settings/device/SwitchPreferenceFilesBackend.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
- */
-
-package org.lineageos.settings.device;
-
-import org.lineageos.internal.util.FileUtils;
-
-public class SwitchPreferenceFilesBackend extends SwitchPreferenceBackend {
-
- private String[] mPaths;
- private Boolean mValid;
-
- public SwitchPreferenceFilesBackend(String[] paths, Boolean defaultValue) {
- super(defaultValue);
- mPaths = paths;
- updateValidity();
- }
-
- public SwitchPreferenceFilesBackend(String path, Boolean defaultValue) {
- this(new String[]{path}, defaultValue);
- }
-
- @Override
- public void setValue(Boolean value) {
- for (String path : mPaths) {
- if (!FileUtils.isFileWritable(path)) {
- continue;
- }
-
- FileUtils.writeLine(path, value ? "1" : "0");
- }
-
- mValue = value;
- }
-
- @Override
- public Boolean isValid() {
- return mValid;
- }
-
- private void updateValidity() {
- Boolean valid = false;
-
- /*
- * Only one path might be available on a specific device,
- * but we need to try multiple to handle multiple kernel drivers.
- * Cache the validity to avoid slow fragment rendering times.
- */
- for (String path : mPaths) {
- if (FileUtils.isFileReadable(path) && FileUtils.isFileWritable(path)) {
- valid = true;
- break;
- }
- }
-
- mValid = valid;
- }
-}
diff --git a/device.mk b/device.mk
index 9699fa1..8a85bb1 100644
--- a/device.mk
+++ b/device.mk
@@ -19,8 +19,7 @@ PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# Overlay
DEVICE_PACKAGE_OVERLAYS += \
- $(LOCAL_PATH)/overlay \
- $(LOCAL_PATH)/overlay-lineage
+ $(LOCAL_PATH)/overlay
# Inherit from msm8998-common
$(call inherit-product, device/xiaomi/msm8998-common/msm8998.mk)
@@ -34,10 +33,6 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
$(LOCAL_PATH)/configs/audio/mixer_paths_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tasha.xml
-# ConfigPanel
-PRODUCT_PACKAGES += \
- ConfigPanel
-
# Input
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayout/synaptics_dsx.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/synaptics_dsx.kl \
@@ -49,10 +44,6 @@ PRODUCT_PACKAGES += \
android.hardware.ir@1.0-impl \
android.hardware.ir@1.0-service
-# Lineage hardware
-PRODUCT_PACKAGES += \
- vendor.lineage.touch@1.0-service.sagit
-
# Properties
include $(LOCAL_PATH)/vendor_prop.mk
diff --git a/lineage.dependencies b/lineage.dependencies
deleted file mode 100644
index ad1f2fd..0000000
--- a/lineage.dependencies
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- {
- "repository": "android_device_xiaomi_msm8998-common",
- "target_path": "device/xiaomi/msm8998-common"
- }
-]
diff --git a/manifest.xml b/manifest.xml
index 5b1b4c4..68323d8 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -8,13 +8,4 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl">
- <name>vendor.lineage.touch</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IKeyDisabler</name>
- <instance>default</instance>
- </interface>
- </hal>
</manifest>
diff --git a/overlay-lineage/frameworks/base/core/res/res/values/lineage_config.xml b/overlay-lineage/frameworks/base/core/res/res/values/lineage_config.xml
deleted file mode 100644
index a4ad150..0000000
--- a/overlay-lineage/frameworks/base/core/res/res/values/lineage_config.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2017 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">
- <!-- Button backlight -->
- <bool name="config_deviceHasVariableButtonBrightness">true</bool>
-</resources>
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
deleted file mode 100644
index e4ba2c9..0000000
--- a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015-2016 The CyanogenMod Project
- 2017 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>
- <!-- Display mode remapping table.
- If the mode names returned by the backend do not match
- the predefined and translated strings in the Settings
- app, they can be remapped here. The format is
- "oldname:newname", one per entry. -->
- <string-array name="config_displayModeMappings" translatable="false">
- <item>00default:standard</item>
- <item>01warm:reading</item>
- <item>02cool:dynamic</item>
- <item>37sRGB-native:srgb</item>
- </string-array>
-
- <!-- Default value for proximity check on screen wake
- NOTE ! - Enable for devices that have a fast response proximity sensor (ideally < 300ms)-->
- <bool name="config_proximityCheckOnWake">true</bool>
- <integer name="config_proximityCheckTimeout">200</integer>
- <bool name="config_proximityCheckOnWakeEnabledByDefault">true</bool>
-
- <!-- Hardware keys present on the device, stored as a bit field.
- This integer should equal the sum of the corresponding value for each
- of the following keys present:
- 1 - Home
- 2 - Back
- 4 - Menu
- 8 - Assistant (search)
- 16 - App switch
- 32 - Camera
- 64 - Volume rocker
- For example, a device with Home, Back and Menu keys would set this
- config to 7. -->
- <integer name="config_deviceHardwareKeys">83</integer>
-
- <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
- This integer should equal the sum of the corresponding value for each
- of the following keys present:
- 1 - Home
- 2 - Back
- 4 - Menu
- 8 - Assistant (search)
- 16 - App switch
- 32 - Camera
- 64 - Volume rocker
- For example, a device with Home, Back and Menu keys would set this
- config to 7. -->
- <integer name="config_deviceHardwareWakeKeys">64</integer>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 7dd0e88..1a8b695 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -92,4 +92,57 @@
Otherwise, the device may fail to wake out of suspend reliably.
The default is false. -->
<bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
+
+ <!-- Display mode remapping table.
+ If the mode names returned by the backend do not match
+ the predefined and translated strings in the Settings
+ app, they can be remapped here. The format is
+ "oldname:newname", one per entry. -->
+ <string-array name="config_displayModeMappings" translatable="false">
+ <item>00default:standard</item>
+ <item>01warm:reading</item>
+ <item>02cool:dynamic</item>
+ <item>37sRGB-native:srgb</item>
+ </string-array>
+
+ <!-- Default value for proximity check on screen wake
+ NOTE ! - Enable for devices that have a fast response proximity sensor (ideally < 300ms)-->
+ <bool name="config_proximityCheckOnWake">true</bool>
+ <integer name="config_proximityCheckTimeout">200</integer>
+ <bool name="config_proximityCheckOnWakeEnabledByDefault">true</bool>
+
+ <!-- Hardware keys present on the device, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following keys present:
+ 1 - Home
+ 2 - Back
+ 4 - Menu
+ 8 - Assistant (search)
+ 16 - App switch
+ 32 - Camera
+ 64 - Volume rocker
+ For example, a device with Home, Back and Menu keys would set this
+ config to 7. -->
+ <integer name="config_deviceHardwareKeys">83</integer>
+
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following keys present:
+ 1 - Home
+ 2 - Back
+ 4 - Menu
+ 8 - Assistant (search)
+ 16 - App switch
+ 32 - Camera
+ 64 - Volume rocker
+ For example, a device with Home, Back and Menu keys would set this
+ config to 7. -->
+ <integer name="config_deviceHardwareWakeKeys">64</integer>
+
+ <!-- Smart Pixels -->
+ <bool name="config_enableSmartPixels">true</bool>
+
+ <!-- Button backlight -->
+ <bool name="config_button_brightness_support">true</bool>
+ <integer name="config_button_brightness_default">128</integer>
</resources>
diff --git a/overlay-lineage/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml
index 9b87822..9b87822 100644
--- a/overlay-lineage/packages/apps/Settings/res/values/config.xml
+++ b/overlay/packages/apps/Settings/res/values/config.xml
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index ffc5630..9fa42a2 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -1,5 +1,2 @@
# IR
/dev/peel_ir u:object_r:ir_device:s0
-
-# Lineage hardware
-/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.sagit u:object_r:hal_lineage_touch_default_exec:s0
diff --git a/sepolicy/hal_lineage_touch_default.te b/sepolicy/hal_lineage_touch_default.te
deleted file mode 100644
index 0e3ce77..0000000
--- a/sepolicy/hal_lineage_touch_default.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow hal_lineage_touch_default sysfs_sectouch:dir search;
-allow hal_lineage_touch_default sysfs_sectouch:file rw_file_perms;
diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te
deleted file mode 100644
index 83d2861..0000000
--- a/sepolicy/system_app.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# Allow ConfigPanel to work
-allow system_app sysfs_sectouch:dir search;
-allow system_app sysfs_sectouch:file rw_file_perms;
diff --git a/touch/Android.bp b/touch/Android.bp
deleted file mode 100644
index 8f0d6ad..0000000
--- a/touch/Android.bp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2019 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.
-
-cc_binary {
- name: "vendor.lineage.touch@1.0-service.sagit",
- init_rc: ["vendor.lineage.touch@1.0-service.sagit.rc"],
- defaults: ["hidl_defaults"],
- relative_install_path: "hw",
- vendor: true,
- srcs: [
- "KeyDisabler.cpp",
- "service.cpp"
- ],
- shared_libs: [
- "libbase",
- "libhidlbase",
- "libhidltransport",
- "libutils",
- "vendor.lineage.touch@1.0",
- ],
-}
diff --git a/touch/KeyDisabler.cpp b/touch/KeyDisabler.cpp
deleted file mode 100644
index 8755706..0000000
--- a/touch/KeyDisabler.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include <android-base/file.h>
-#include <android-base/logging.h>
-#include <android-base/strings.h>
-
-#include "KeyDisabler.h"
-
-namespace vendor {
-namespace lineage {
-namespace touch {
-namespace V1_0 {
-namespace implementation {
-
-constexpr const char kControlPath[] = "/proc/touchpanel/capacitive_keys_enable";
-
-KeyDisabler::KeyDisabler() {
- mHasKeyDisabler = !access(kControlPath, F_OK);
-}
-
-// Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow.
-Return<bool> KeyDisabler::isEnabled() {
- std::string buf;
-
- if (!mHasKeyDisabler) return false;
-
- if (!android::base::ReadFileToString(kControlPath, &buf)) {
- LOG(ERROR) << "Failed to read " << kControlPath;
- return false;
- }
-
- return std::stoi(android::base::Trim(buf)) == 0;
-}
-
-Return<bool> KeyDisabler::setEnabled(bool enabled) {
- if (!mHasKeyDisabler) return false;
-
- if (!android::base::WriteStringToFile((enabled ? "0" : "1"), kControlPath)) {
- LOG(ERROR) << "Failed to write " << kControlPath;
- return false;
- }
-
- return true;
-}
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace touch
-} // namespace lineage
-} // namespace vendor
diff --git a/touch/KeyDisabler.h b/touch/KeyDisabler.h
deleted file mode 100644
index a4cb7c0..0000000
--- a/touch/KeyDisabler.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#ifndef VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H
-#define VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H
-
-#include <vendor/lineage/touch/1.0/IKeyDisabler.h>
-
-namespace vendor {
-namespace lineage {
-namespace touch {
-namespace V1_0 {
-namespace implementation {
-
-using ::android::hardware::Return;
-
-class KeyDisabler : public IKeyDisabler {
- public:
- KeyDisabler();
- // Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow.
- Return<bool> isEnabled() override;
- Return<bool> setEnabled(bool enabled) override;
- private:
- bool mHasKeyDisabler;
-};
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace touch
-} // namespace lineage
-} // namespace vendor
-
-#endif // VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H
diff --git a/touch/service.cpp b/touch/service.cpp
deleted file mode 100644
index e793530..0000000
--- a/touch/service.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#define LOG_TAG "vendor.lineage.touch@1.0-service.sagit"
-
-#include <android-base/logging.h>
-#include <hidl/HidlTransportSupport.h>
-
-#include "KeyDisabler.h"
-
-using android::OK;
-using android::sp;
-using android::status_t;
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-
-using ::vendor::lineage::touch::V1_0::IKeyDisabler;
-using ::vendor::lineage::touch::V1_0::implementation::KeyDisabler;
-
-int main() {
- sp<IKeyDisabler> keyDisabler;
- status_t status;
-
- LOG(INFO) << "Touch HAL service is starting.";
-
- keyDisabler = new KeyDisabler();
- if (keyDisabler == nullptr) {
- LOG(ERROR) << "Can not create an instance of Touch HAL KeyDisabler Iface, exiting.";
- goto shutdown;
- }
-
- configureRpcThreadpool(1, true /*callerWillJoin*/);
-
- status = keyDisabler->registerAsService();
- if (status != OK) {
- LOG(ERROR) << "Could not register service for Touch HAL KeyDisabler Iface ("
- << status << ")";
- goto shutdown;
- }
-
- LOG(INFO) << "Touch HAL service is ready.";
- joinRpcThreadpool();
- // Should not pass this line
-
-shutdown:
- // In normal operation, we don't expect the thread pool to shutdown
- LOG(ERROR) << "Touch HAL service is shutting down.";
- return 1;
-}
diff --git a/touch/vendor.lineage.touch@1.0-service.sagit.rc b/touch/vendor.lineage.touch@1.0-service.sagit.rc
deleted file mode 100644
index 2eba273..0000000
--- a/touch/vendor.lineage.touch@1.0-service.sagit.rc
+++ /dev/null
@@ -1,8 +0,0 @@
-on boot
- chown system system /proc/touchpanel/capacitive_keys_enable
- chmod 0660 /proc/touchpanel/capacitive_keys_enable
-
-service vendor.touch-hal-1-0 /vendor/bin/hw/vendor.lineage.touch@1.0-service.sagit
- class hal
- user system
- group system