diff options
Diffstat (limited to 'configpanel')
17 files changed, 9 insertions, 88 deletions
diff --git a/configpanel/Android.mk b/configpanel/Android.mk index 61fcf01..cde40f6 100644 --- a/configpanel/Android.mk +++ b/configpanel/Android.mk @@ -13,7 +13,8 @@ LOCAL_USE_AAPT2 := true LOCAL_STATIC_ANDROID_LIBRARIES := \ androidx.core_core \ - androidx.preference_preference + androidx.preference_preference \ + org.lineageos.settings.resources LOCAL_STATIC_JAVA_LIBRARIES := \ org.lineageos.platform.internal diff --git a/configpanel/AndroidManifest.xml b/configpanel/AndroidManifest.xml index 22c1e33..b7c7905 100644 --- a/configpanel/AndroidManifest.xml +++ b/configpanel/AndroidManifest.xml @@ -27,9 +27,7 @@ <uses-permission android:name="lineageos.permission.HARDWARE_ABSTRACTION_ACCESS" /> <application - android:icon="@mipmap/ic_launcher" android:label="@string/device_settings_app_name" - android:theme="@style/Theme.Main" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true"> @@ -47,6 +45,7 @@ <activity android:name=".ButtonSettingsActivity" + android:theme="@style/Theme.SubSettingsBase" android:label="@string/button_panel_title" android:exported="false" > <intent-filter> 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 Binary files differdeleted file mode 100644 index f01deeb..0000000 --- a/configpanel/res/mipmap-hdpi/ic_background.png +++ /dev/null diff --git a/configpanel/res/mipmap-hdpi/ic_foreground.png b/configpanel/res/mipmap-hdpi/ic_foreground.png Binary files differdeleted file mode 100644 index 97158bc..0000000 --- a/configpanel/res/mipmap-hdpi/ic_foreground.png +++ /dev/null diff --git a/configpanel/res/mipmap-mdpi/ic_background.png b/configpanel/res/mipmap-mdpi/ic_background.png Binary files differdeleted file mode 100644 index 58bcf52..0000000 --- a/configpanel/res/mipmap-mdpi/ic_background.png +++ /dev/null diff --git a/configpanel/res/mipmap-mdpi/ic_foreground.png b/configpanel/res/mipmap-mdpi/ic_foreground.png Binary files differdeleted file mode 100644 index 7b9bc07..0000000 --- a/configpanel/res/mipmap-mdpi/ic_foreground.png +++ /dev/null diff --git a/configpanel/res/mipmap-xhdpi/ic_background.png b/configpanel/res/mipmap-xhdpi/ic_background.png Binary files differdeleted file mode 100644 index 681a199..0000000 --- a/configpanel/res/mipmap-xhdpi/ic_background.png +++ /dev/null diff --git a/configpanel/res/mipmap-xhdpi/ic_foreground.png b/configpanel/res/mipmap-xhdpi/ic_foreground.png Binary files differdeleted file mode 100644 index c079116..0000000 --- a/configpanel/res/mipmap-xhdpi/ic_foreground.png +++ /dev/null diff --git a/configpanel/res/mipmap-xxhdpi/ic_background.png b/configpanel/res/mipmap-xxhdpi/ic_background.png Binary files differdeleted file mode 100644 index 1e707e8..0000000 --- a/configpanel/res/mipmap-xxhdpi/ic_background.png +++ /dev/null diff --git a/configpanel/res/mipmap-xxhdpi/ic_foreground.png b/configpanel/res/mipmap-xxhdpi/ic_foreground.png Binary files differdeleted file mode 100644 index ecc70af..0000000 --- a/configpanel/res/mipmap-xxhdpi/ic_foreground.png +++ /dev/null diff --git a/configpanel/res/mipmap-xxxhdpi/ic_background.png b/configpanel/res/mipmap-xxxhdpi/ic_background.png Binary files differdeleted file mode 100644 index b6e860b..0000000 --- a/configpanel/res/mipmap-xxxhdpi/ic_background.png +++ /dev/null diff --git a/configpanel/res/mipmap-xxxhdpi/ic_foreground.png b/configpanel/res/mipmap-xxxhdpi/ic_foreground.png Binary files differdeleted file mode 100644 index 3133594..0000000 --- a/configpanel/res/mipmap-xxxhdpi/ic_foreground.png +++ /dev/null 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 index 6e13cb6..c0e77b4 100644 --- a/configpanel/res/xml/button_panel.xml +++ b/configpanel/res/xml/button_panel.xml @@ -15,7 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. --> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + android:title="@string/button_panel_title"> <PreferenceCategory android:key="fp_key" diff --git a/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java b/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java index 737dbd5..485346b 100644 --- a/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java +++ b/configpanel/src/org/lineageos/settings/device/ButtonSettingsActivity.java @@ -18,14 +18,15 @@ package org.lineageos.settings.device; import android.os.Bundle; -import android.preference.PreferenceActivity; -public class ButtonSettingsActivity extends PreferenceActivity { +import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; +import com.android.settingslib.collapsingtoolbar.R; +public class ButtonSettingsActivity extends CollapsingToolbarBaseActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - getFragmentManager().beginTransaction().replace(android.R.id.content, + getFragmentManager().beginTransaction().replace(R.id.content_frame, new ButtonSettingsFragment()).commit(); } } diff --git a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java index 199e367..9605bdf 100644 --- a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java +++ b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java @@ -39,8 +39,6 @@ public class ButtonSettingsFragment extends PreferenceFragment @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { addPreferencesFromResource(R.xml.button_panel); - final ActionBar actionBar = getActivity().getActionBar(); - actionBar.setDisplayHomeAsUpEnabled(true); } @Override @@ -117,15 +115,6 @@ public class ButtonSettingsFragment extends PreferenceFragment } } - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == android.R.id.home) { - getActivity().onBackPressed(); - return true; - } - return false; - } - private void updatePreferencesBasedOnDependencies() { for (String pref : Constants.sNodeDependencyMap.keySet()) { SwitchPreference b = (SwitchPreference) findPreference(pref); |