Files
packages_apps_Settings/res/xml/clipboard_auto_clear_settings.xml
Oliver Scott 70acdc87e7 Settings: Expose clipboard auto clear setting [2/2]
[someone5678]
* Adapt to current project
* Use Settings instead of DeviceConfig as GMS don't likes it
* Add switch for clipboard auto clear
* Import resources from CalyxOS and crDroid Android and adapt it
* Update summary setting logic

Ref:
72db57c966
48e00e2b81
33c49aa70c
bc81eea9cc

Issue: calyxos#2208
Change-Id: Ie101177aba90ea085d83c0cb641ffed447cceecd
Signed-off-by: someone5678 <59456192+someone5678@users.noreply.github.com>
2025-12-10 00:41:29 +09:00

44 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 TheParasiteProject
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"
xmlns:settings="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:title="@string/clipboard_auto_clear_title">
<com.android.settingslib.widget.TopIntroPreference
android:key="clipboard_auto_clear_summary"
android:title="@string/clipboard_auto_clear_summary"
settings:searchable="false" />
<lineageos.preference.LineageSecureSettingMainSwitchPreference
android:key="clipboard_auto_clear_enabled"
android:title="@string/clipboard_auto_clear_enabled_title"
android:defaultValue="true"/>
<lineageos.preference.LineageSecureSettingListPreference
android:key="clipboard_auto_clear_timeout"
android:title="@string/clipboard_auto_clear_timeout_title"
android:summary="%s"
android:dependency="clipboard_auto_clear_enabled"
android:entries="@array/clipboard_auto_clear_timeout_entries"
android:entryValues="@array/clipboard_auto_clear_timeout_values"
android:defaultValue="3600000"
settings:controller="com.android.settings.custom.privacy.ClipboardAutoClearTimeoutPreferenceController" />
</PreferenceScreen>