diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2019-05-10 19:33:58 +0200 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2019-05-10 22:15:52 +0200 |
commit | 08ea0bdd18cf066aae40859a01e7b21a0f36ef87 (patch) | |
tree | e694ebb8595538b68f8b08f3a3617a779d2fd082 /configpanel/res | |
parent | 1ec6d6b8ee8d6a3ab7a785f7b9023f0e1c1746f3 (diff) |
msm8996-common: Import configpanel
Squash of the following:
commit b5d41936b2519b2404b44bc3ce5bd51555732e30
Author: Bruno Martins <bgcngm@gmail.com>
Date: Tue Jan 15 00:36:22 2019 +0000
msm8996-common: ConfigPanel: Abandon LineageHardwareManager usage
Change-Id: I5f0d01222eecbde14887b0298811bdceab65db57
commit 4338acf9a848acbac4a60432e891747d23ba2977
Author: Anton Hansson <hansson@google.com>
Date: Wed Feb 21 14:11:44 2018 +0000
msm8996-common: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: Ic906adbd670c4dbfe2cdf0b71cdbeaf9ac08a27e
commit 4c96c168c686c13f1d20a304c9242f2f01b8a103
Author: Giuseppe Barillari <joe2k01dev@gmail.com>
Date: Sun May 27 21:25:24 2018 +0200
msm8996-common: configpanel: Define LOCAL_PRIVILEGED_MODULE only once
Change-Id: I256dd33a1bc69b8295ddcc15db9ccd29167c96dc
Signed-off-by: Giuseppe Barillari <joe2k01dev@gmail.com>
commit 393fa378f8ebda5d20798e9cec6d86968251c0de
Author: Bruno Martins <bgcngm@gmail.com>
Date: Thu May 24 15:33:19 2018 +0100
msm8996-common: ConfigPanel: Define non-indexable keys
* This ensures that keys related with unsupported features
are hidden from search results.
Change-Id: I2220ff21aee5d8015bea4073073492f4560e3703
commit 0f67e39f803c0c13cca85901760f8f467e18ceed
Author: Giuseppe Barillari <joe2k01dev@gmail.com>
Date: Sat Feb 24 20:39:11 2018 +0100
msm8996-common: ConfigPanel: Handle cyttsp reversed keys proc entry
* This adds support for button swap feature on Mi Note 2
Change-Id: I82bfa3ed6ed64891cba84d16c07748930cee6272
Signed-off-by: Giuseppe Barillari <joe2k01dev@gmail.com>
commit d56cfb06245a9af9f87143e50ec9bf563ad7b468
Author: Asher Simonds <dayanhammer@gmail.com>
Date: Wed Feb 14 00:20:29 2018 +0200
msm8996-common: ConfigPanel: Add adaptive icon
Change-Id: I8009c1dd93cc9c6c6d66db550a79a8781a4254b0
commit 1ca4c23c97cf88277e814f2a510892e08313f090
Author: Bruno Martins <bgcngm@gmail.com>
Date: Tue Feb 13 23:18:08 2018 +0000
msm8996-common: ConfigPanel: Bump SDK version
Change-Id: I57d60c73228f47a5267a9536ed058f6053e6ed13
commit 29f2e9cf3b43f7fcb0d4a64179b6f20661ea5491
Author: Bruno Martins <bgcngm@gmail.com>
Date: Thu Oct 5 23:33:44 2017 +0100
msm8996-common: ConfigPanel: Restore back button to the action bar
* This restores the relevant code that was removed in commit c243b72bf0e5bd460167b7bb7d2f4286a5e4eea8
Change-Id: I69afd5f8ef4c59f215a201bd76acc3b2015c0a73
commit c130e2f56860a7ab2d0472694c61f8248c2aab2e
Author: Bruno Martins <bgcngm@gmail.com>
Date: Thu Oct 5 23:15:51 2017 +0100
msm8996-common: ConfigPanel: Build with AAPT2
Change-Id: I0713c2ffd35c768ca863dc36778dbfe0892240f5
commit cf4e4a9554618d2b6b56a1584f78bd03c01c3b36
Author: Bruno Martins <bgcngm@gmail.com>
Date: Thu Oct 5 23:08:09 2017 +0100
msm8996-common: ConfigPanel: Re-integrate into Settings
* Apply the default Oreo theme and inherit the layouts from Google
for the Settings app, in order to keep UI consistency.
* Get rid of SettingsDrawerActivity as it no longer fits in.
* Add required appcompat and preference support libraries.
* Integrate into our custom Button settings category by defining the
expected action.
Change-Id: Ic2e9768552751a59e49ec00576b202e8223268e7
commit 5be570c80cb12fca9255a094b52e75b79f5a8bb9
Author: Paul Keith <javelinanddart@gmail.com>
Date: Thu Nov 23 22:14:40 2017 +0100
msm8996-common: ConfigPanel: Update KeyHandler for API change
Change-Id: I047e903572d09109b49b554acd5eeecc503d37d1
commit 11a871461baf9a51a7cbdecd47a4f3bea4a47660
Author: Bruno Martins <bgcngm@gmail.com>
Date: Thu Oct 5 00:33:30 2017 +0100
msm8996-common: ConfigPanel: Apply LineageOS rebrand
Change-Id: I33178e6bc605014033c498ad20c1224e8f4f007d
commit d1eaf445b0f0351f57a81ece523429c8bf85d1b9
Author: Bruno Martins <bgcngm@gmail.com>
Date: Mon May 1 16:05:43 2017 +0100
msm8996-common: ConfigPanel: Hide features if unsupported
* This is required for now as capricorn has a different
fingerprint driver
Change-Id: I9c2de516358fd9f1c747682f9232752cfae08c6c
commit 15bb2b153afa11492c72ff41f5b0f03a89e4d54a
Author: Bruno Martins <bgcngm@gmail.com>
Date: Mon Apr 3 23:33:47 2017 +0100
msm8996-common: ConfigPanel: Check if PocketMode is installed
* Because users like to play tricks
Change-Id: I84c8d5032ef3df5ab2889e957d9a5b6fc270c091
commit 48924c20d0bd54461b4854be9feebcc8584befd6
Author: Bruno Martins <bgcngm@gmail.com>
Date: Wed Mar 29 23:22:37 2017 +0100
msm8996-common: Allow control over PocketMode service
* Once the service is running, proximity sensor is constantly active
when the display is turned off, resulting into a residual increase
in battery consumption. Add a toggle so that users can decide whether
they accept that and prefer to prevent accidental wake-ups triggered
by the fingerprint sensor.
* Keep the receiver that listens for the screen status registered only
if the fingerprint wake-up feature is enabled at the same time as
the accidental wake-up prevention feature.
* Set PocketMode as a required module of ConfigPanel, to make sure
it is only shipped on devices building the latter.
Change-Id: I5941f445d0bd77be1efa9ffcde2d9854e6446c3d
commit c243b72bf0e5bd460167b7bb7d2f4286a5e4eea8
Author: LuK1337 <priv.luk@gmail.com>
Date: Wed Mar 29 18:09:37 2017 +0100
msm8996-common: ConfigPanel: Refactor
* Integrate more nicely with Settings
* Remove unnecessary permissions and unused resources
* Reorganize constants and helper methods
Change-Id: Id49e3aff5a243201cff5177de78cca26d932a055
commit b74788a08a571421d266e85d9fd384307fa6a86e
Author: Bruno Martins <bgcngm@gmail.com>
Date: Wed Mar 29 09:39:09 2017 +0000
msm8996-common: ConfigPanel: Use cmsdk FileUtils wherever it suits
* Use it in all cases where it suits and ensure that files
are writable before actually writing to them
Change-Id: If5c8da1cb80ecf24611b16f961343044939730af
commit 556a10de6c59ec8d9574e7c192324d8d8797e635
Author: Bruno Martins <bgcngm@gmail.com>
Date: Sat Mar 25 11:08:28 2017 +0000
msm8996-common: Integrate KeyHandler into ConfigPanel
* KeyHandler is device-specific (gemini only), but can't really work
without ConfigPanel, so merge into a single package
* On the other hand, move the overlays out of the common tree to allow other
devices to build ConfigPanel without being forced to use the KeyHandler
Change-Id: I0236ceca21ae47657d43868a4217e3db4699346e
commit 56e7f66124457e4df5878708815b164e0d006e26
Author: Bruno Martins <bgcngm@gmail.com>
Date: Thu Jan 5 15:49:09 2017 +0000
gemini: ConfigPanel: Commonize strings translations
* Translations moved to the new project
android_packages_resources_devicesettings
Change-Id: Ic840f76dac5c77d1bd680853ef77d57576d0953f
commit ceaa154c2f38ba3cdbc73c93acc089025f127059
Author: Bruno Martins <bgcngm@gmail.com>
Date: Wed Dec 14 10:47:49 2016 +0000
gemini: Support fingerprint as home button
* Take advantage of the fact that Xiaomi's fingerprint HAL
now sends KEY_KPENTER (keycode 96) and interpret it as
KEYCODE_HOME (keycode 102) - a home key event
* The ability to wake up device using home button can also be enabled
again because the fingerprint HAL sends key 96 only when
device is turned on and unlocked
Change-Id: I29782b73a62724e5b706d6edf366d180893f2ce9
commit 0c7f6b822b25da07b8707238e3e42295a7a5ac5d
Author: Bruno Martins <bgcngm@gmail.com>
Date: Sat Jan 7 21:14:20 2017 +0000
gemini: ConfigPanel: Remove unused code
Change-Id: I14a48c4ab1b138bfba93d0508764b748f5dc9009
commit 0b3629400152a73744ff097f64c5776fa49d8f80
Author: Louis Popi <theh2o64@gmail.com>
Date: Thu Dec 15 19:46:37 2016 +0100
gemini: Add fingerprint wakeup option
* This allows the users to chose whether fingerprint
wakes up the device
Change-Id: I6baa53d22293b741aade7a752ff90a0e5a8daaac
commit d5e6991feffc97b8a30cd9e305da62ac474a680f
Author: Willi Ye <williye97@gmail.com>
Date: Thu Dec 8 21:33:43 2016 +0100
gemini: ConfigPanel: Update colors to match SystemUI
Change-Id: Ia919e8e7d15ffd51573c43d143884ed6e7ce91f4
commit ec7fbbf61b586087f4bfae653be4092bd3febb31
Author: Steve Kondik <steve@cyngn.com>
Date: Wed Oct 5 01:19:59 2016 -0700
gemini: ConfigPanel: Fix bootup behavior
* Set the app as direct boot aware so we're able to receive
the magic broadcast from CMHardwareManager. Otherwise,
the boot-time initialization never runs.
Change-Id: I0018dd5265ace37e79b775ff62e4f0686f30fd40
commit 1e41ce03cb81af2e8b16bf0fb36de89372f53723
Author: Louis Popi <theh2o64@gmail.com>
Date: Thu Oct 20 19:38:27 2016 +0200
gemini: Add ConfigPanel for button swap
* Based on Oppo's implementation
Change-Id: Ia66fd3fed7cc1687862ab1d35578b525a422f0bb
* Full history at https://github.com/LineageOS/android_device_xiaomi_msm8996-common/tree/lineage-16.0/configpanel
Change-Id: If941135420bc10d93c0ad49e2fa7fe0cab82f1ad
Diffstat (limited to 'configpanel/res')
-rw-r--r-- | configpanel/res/drawable/ic_settings_additional_buttons.xml | 27 | ||||
-rw-r--r-- | configpanel/res/mipmap-anydpi/ic_launcher.xml | 20 | ||||
-rw-r--r-- | configpanel/res/mipmap-hdpi/ic_background.png | bin | 0 -> 2030 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-hdpi/ic_foreground.png | bin | 0 -> 10481 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-mdpi/ic_background.png | bin | 0 -> 1364 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-mdpi/ic_foreground.png | bin | 0 -> 5246 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-xhdpi/ic_background.png | bin | 0 -> 2545 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-xhdpi/ic_foreground.png | bin | 0 -> 17082 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-xxhdpi/ic_background.png | bin | 0 -> 3809 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-xxhdpi/ic_foreground.png | bin | 0 -> 34369 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-xxxhdpi/ic_background.png | bin | 0 -> 5218 bytes | |||
-rw-r--r-- | configpanel/res/mipmap-xxxhdpi/ic_foreground.png | bin | 0 -> 57166 bytes | |||
-rw-r--r-- | configpanel/res/values/styles.xml | 50 | ||||
-rw-r--r-- | configpanel/res/xml/button_panel.xml | 47 |
14 files changed, 144 insertions, 0 deletions
diff --git a/configpanel/res/drawable/ic_settings_additional_buttons.xml b/configpanel/res/drawable/ic_settings_additional_buttons.xml new file mode 100644 index 0000000..044fc23 --- /dev/null +++ b/configpanel/res/drawable/ic_settings_additional_buttons.xml @@ -0,0 +1,27 @@ +<?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 new file mode 100644 index 0000000..d8649ba --- /dev/null +++ b/configpanel/res/mipmap-anydpi/ic_launcher.xml @@ -0,0 +1,20 @@ +<?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 Binary files differnew file mode 100644 index 0000000..f01deeb --- /dev/null +++ b/configpanel/res/mipmap-hdpi/ic_background.png diff --git a/configpanel/res/mipmap-hdpi/ic_foreground.png b/configpanel/res/mipmap-hdpi/ic_foreground.png Binary files differnew file mode 100644 index 0000000..97158bc --- /dev/null +++ b/configpanel/res/mipmap-hdpi/ic_foreground.png diff --git a/configpanel/res/mipmap-mdpi/ic_background.png b/configpanel/res/mipmap-mdpi/ic_background.png Binary files differnew file mode 100644 index 0000000..58bcf52 --- /dev/null +++ b/configpanel/res/mipmap-mdpi/ic_background.png diff --git a/configpanel/res/mipmap-mdpi/ic_foreground.png b/configpanel/res/mipmap-mdpi/ic_foreground.png Binary files differnew file mode 100644 index 0000000..7b9bc07 --- /dev/null +++ b/configpanel/res/mipmap-mdpi/ic_foreground.png diff --git a/configpanel/res/mipmap-xhdpi/ic_background.png b/configpanel/res/mipmap-xhdpi/ic_background.png Binary files differnew file mode 100644 index 0000000..681a199 --- /dev/null +++ b/configpanel/res/mipmap-xhdpi/ic_background.png diff --git a/configpanel/res/mipmap-xhdpi/ic_foreground.png b/configpanel/res/mipmap-xhdpi/ic_foreground.png Binary files differnew file mode 100644 index 0000000..c079116 --- /dev/null +++ b/configpanel/res/mipmap-xhdpi/ic_foreground.png diff --git a/configpanel/res/mipmap-xxhdpi/ic_background.png b/configpanel/res/mipmap-xxhdpi/ic_background.png Binary files differnew file mode 100644 index 0000000..1e707e8 --- /dev/null +++ b/configpanel/res/mipmap-xxhdpi/ic_background.png diff --git a/configpanel/res/mipmap-xxhdpi/ic_foreground.png b/configpanel/res/mipmap-xxhdpi/ic_foreground.png Binary files differnew file mode 100644 index 0000000..ecc70af --- /dev/null +++ b/configpanel/res/mipmap-xxhdpi/ic_foreground.png diff --git a/configpanel/res/mipmap-xxxhdpi/ic_background.png b/configpanel/res/mipmap-xxxhdpi/ic_background.png Binary files differnew file mode 100644 index 0000000..b6e860b --- /dev/null +++ b/configpanel/res/mipmap-xxxhdpi/ic_background.png diff --git a/configpanel/res/mipmap-xxxhdpi/ic_foreground.png b/configpanel/res/mipmap-xxxhdpi/ic_foreground.png Binary files differnew file mode 100644 index 0000000..3133594 --- /dev/null +++ b/configpanel/res/mipmap-xxxhdpi/ic_foreground.png diff --git a/configpanel/res/values/styles.xml b/configpanel/res/values/styles.xml new file mode 100644 index 0000000..8dbdd4f --- /dev/null +++ b/configpanel/res/values/styles.xml @@ -0,0 +1,50 @@ +<?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 new file mode 100644 index 0000000..43f4902 --- /dev/null +++ b/configpanel/res/xml/button_panel.xml @@ -0,0 +1,47 @@ +<?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" /> + + <PreferenceCategory + android:key="fp_key" + android:title="@string/fingerprint_title" > + + <SwitchPreference + android:key="fp_home" + android:title="@string/fingerprint_as_home_title" + android:summary="@string/fingerprint_as_home_summary" /> + + <SwitchPreference + android:key="fp_wakeup" + android:title="@string/fingerprint_wakeup_title" + android:summary="@string/fingerprint_wakeup_summary" /> + + <SwitchPreference + android:key="fp_pocketmode" + android:title="@string/fingerprint_pocketmode_title" + android:summary="@string/fingerprint_pocketmode_summary" + android:dependency="fp_wakeup" /> + + </PreferenceCategory> + +</PreferenceScreen> |