Revert "sdm660-common: DeviceSettings: Nuke thermal settings"
This reverts commit c455b70f97
.
This commit is contained in:
parent
964f9afff1
commit
2075a54b27
22 changed files with 305 additions and 1 deletions
|
@ -75,6 +75,16 @@
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".PerformanceTileService"
|
||||||
|
android:icon="@drawable/thermal_balance"
|
||||||
|
android:label="@string/thermal_balance"
|
||||||
|
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.service.quicksettings.action.QS_TILE"/>
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".speaker.ClearSpeakerActivity"
|
android:name=".speaker.ClearSpeakerActivity"
|
||||||
|
|
8
DeviceSettings/res/drawable/ic_thermal.xml
Normal file
8
DeviceSettings/res/drawable/ic_thermal.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="24dp"
|
||||||
|
android:width="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?android:attr/colorControlNormal">
|
||||||
|
<path android:fillColor="#000" android:pathData="M17 3H21V5H17V3M17 7H21V9H17V7M17 11H21V13H17.75L17 12.1V11M21 15V17H19C19 16.31 18.9 15.63 18.71 15H21M7 3V5H3V3H7M7 7V9H3V7H7M7 11V12.1L6.25 13H3V11H7M3 15H5.29C5.1 15.63 5 16.31 5 17H3V15M15 13V5C15 3.34 13.66 2 12 2S9 3.34 9 5V13C6.79 14.66 6.34 17.79 8 20S12.79 22.66 15 21 17.66 16.21 16 14C15.72 13.62 15.38 13.28 15 13M12 4C12.55 4 13 4.45 13 5V8H11V5C11 4.45 11.45 4 12 4Z" />
|
||||||
|
</vector>
|
12
DeviceSettings/res/drawable/thermal_balance.xml
Normal file
12
DeviceSettings/res/drawable/thermal_balance.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<group>
|
||||||
|
<clip-path android:pathData="M0,0h24v24H0V0z M 0,0"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M17 3H21V5H17V3M17 7H21V9H17V7M17 11H21V13H17.75L17 12.1V11M21 15V17H19C19 16.31 18.9 15.63 18.71 15H21M7 3V5H3V3H7M7 7V9H3V7H7M7 11V12.1L6.25 13H3V11H7M3 15H5.29C5.1 15.63 5 16.31 5 17H3V15M15 13V5C15 3.34 13.66 2 12 2S9 3.34 9 5V13C6.79 14.66 6.34 17.79 8 20S12.79 22.66 15 21 17.66 16.21 16 14C15.72 13.62 15.38 13.28 15 13M12 4C12.55 4 13 4.45 13 5V8H11V5C11 4.45 11.45 4 12 4Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
|
@ -20,7 +20,17 @@
|
||||||
<string name="device_kcal_title">Displaykalibierung</string>
|
<string name="device_kcal_title">Displaykalibierung</string>
|
||||||
<string name="vibration_strength_title">Stärke</string>
|
<string name="vibration_strength_title">Stärke</string>
|
||||||
|
|
||||||
<!-- Haptic -->
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Temperatur</string>
|
||||||
|
<string name="thermal_title">Temperatur Einstellung</string>
|
||||||
|
<string name="thermal_summary">Wähle das Temperatur Profil</string>
|
||||||
|
<string name="thermal_dialogTitle">Wähle das Temperatur Profil</string>
|
||||||
|
|
||||||
|
<string name="thermal_performance">Performance</string>
|
||||||
|
<string name="thermal_battery">Energieeffizient</string>
|
||||||
|
<string name="thermal_gaming">Gaming</string>
|
||||||
|
<string name="thermal_balance">Balance</string>
|
||||||
|
<string name="thermal_extreme_battery">Energiesparen</string>
|
||||||
<string name="vibration_title">Haptisches Feedback</string>
|
<string name="vibration_title">Haptisches Feedback</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -33,6 +33,19 @@
|
||||||
<!-- Ambient Display -->
|
<!-- Ambient Display -->
|
||||||
<string name="ambient_display">Pantalla ambiente</string>
|
<string name="ambient_display">Pantalla ambiente</string>
|
||||||
<string name="advanced_doze_summary">Ajustes pantalla ambiente</string>
|
<string name="advanced_doze_summary">Ajustes pantalla ambiente</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Rendimiento</string>
|
||||||
|
<string name="thermal_title">Ajustes de Rendimiento</string>
|
||||||
|
<string name="thermal_summary">Elija su configuración de Rendimiento</string>
|
||||||
|
<string name="thermal_dialogTitle">Elija su configuración de Rendimiento</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Rendimiento</string>
|
||||||
|
<string name="thermal_battery">Batería</string>
|
||||||
|
<string name="thermal_gaming">Juego</string>
|
||||||
|
<string name="thermal_balance">Balance</string>
|
||||||
|
<string name="thermal_extreme_battery">Batería Extrema</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
<string name="dirac_title">Mi Sound Enhancer</string>
|
<string name="dirac_title">Mi Sound Enhancer</string>
|
||||||
|
|
|
@ -25,6 +25,19 @@
|
||||||
<string name="vibration_title">Retroalimentación háptica</string>
|
<string name="vibration_title">Retroalimentación háptica</string>
|
||||||
<string name="vibration_strength_title">Fuerza</string>
|
<string name="vibration_strength_title">Fuerza</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Rendimiento</string>
|
||||||
|
<string name="thermal_title">Ajustes de Rendimiento</string>
|
||||||
|
<string name="thermal_summary">Elija su configuración de Rendimiento</string>
|
||||||
|
<string name="thermal_dialogTitle">Elija su configuración de Rendimiento</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Rendimiento</string>
|
||||||
|
<string name="thermal_battery">Batería</string>
|
||||||
|
<string name="thermal_gaming">Juego</string>
|
||||||
|
<string name="thermal_balance">Balance</string>
|
||||||
|
<string name="thermal_extreme_battery">Batería Extrema</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
<string name="dirac_title">Mi Sound Enhancer</string>
|
<string name="dirac_title">Mi Sound Enhancer</string>
|
||||||
<string name="dirac_summary">Optimizar la calidad del audio</string>
|
<string name="dirac_summary">Optimizar la calidad del audio</string>
|
||||||
|
|
|
@ -33,6 +33,21 @@
|
||||||
<!-- Ambient Display -->
|
<!-- Ambient Display -->
|
||||||
<string name="ambient_display">Doze de xiaomi</string>
|
<string name="ambient_display">Doze de xiaomi</string>
|
||||||
<string name="advanced_doze_summary">Pantalla ambiente</string>
|
<string name="advanced_doze_summary">Pantalla ambiente</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Rendimiento</string>
|
||||||
|
<string name="thermal_title">Ajustes de Rendimiento</string>
|
||||||
|
<string name="thermal_summary">Elija su configuración de Rendimiento</string>
|
||||||
|
<string name="thermal_dialogTitle">Elija su configuración de Rendimiento</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Rendimiento</string>
|
||||||
|
<string name="thermal_battery">Batería</string>
|
||||||
|
<string name="thermal_gaming">Juego</string>
|
||||||
|
<string name="thermal_balance">Balance</string>
|
||||||
|
<string name="thermal_extreme_battery">Batería Extrema</string>
|
||||||
|
|
||||||
|
<!-- FP Actions -->
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
<string name="dirac_title">Mi Sound Enhancer</string>
|
<string name="dirac_title">Mi Sound Enhancer</string>
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<string name="vibration_title">Umpan balik getaran</string>
|
<string name="vibration_title">Umpan balik getaran</string>
|
||||||
<string name="vibration_strength_title">Kekuatan</string>
|
<string name="vibration_strength_title">Kekuatan</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Suhu</string>
|
||||||
|
<string name="thermal_title">Setelan suhu</string>
|
||||||
|
<string name="thermal_summary">Pilih profil suhu</string>
|
||||||
|
<string name="thermal_dialogTitle">Pilih profil suhu yang anda sukai</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Performa</string>
|
||||||
|
<string name="thermal_battery">Baterai</string>
|
||||||
|
<string name="thermal_gaming">Gaming</string>
|
||||||
|
<string name="thermal_balance">Seimbang</string>
|
||||||
|
<string name="thermal_extreme_battery">Hemat baterai ekstrim</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
<string name="dirac_title">Mi Sound Enhancer</string>
|
<string name="dirac_title">Mi Sound Enhancer</string>
|
||||||
<string name="dirac_summary">Optimalkan kualitas audio</string>
|
<string name="dirac_summary">Optimalkan kualitas audio</string>
|
||||||
|
|
|
@ -29,6 +29,19 @@
|
||||||
<string name="vibration_title">振動フィードバック</string>
|
<string name="vibration_title">振動フィードバック</string>
|
||||||
<string name="vibration_strength_title">強さ</string>
|
<string name="vibration_strength_title">強さ</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">パフォーマンス</string>
|
||||||
|
<string name="thermal_title">パフォーマンスの設定</string>
|
||||||
|
<string name="thermal_summary">パフォーマンス設定を選択して下さい</string>
|
||||||
|
<string name="thermal_dialogTitle">パフォーマンス設定を選択して下さい</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">高性能</string>
|
||||||
|
<string name="thermal_battery">省電力</string>
|
||||||
|
<string name="thermal_gaming">ゲーム</string>
|
||||||
|
<string name="thermal_balance">バランス</string>
|
||||||
|
<string name="thermal_extreme_battery">超省電力</string>
|
||||||
|
|
||||||
<string name="audio_title">サウンドエンハンサ</string>
|
<string name="audio_title">サウンドエンハンサ</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<string name="vibration_title">햅틱 피드백</string>
|
<string name="vibration_title">햅틱 피드백</string>
|
||||||
<string name="vibration_strength_title">강도</string>
|
<string name="vibration_strength_title">강도</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">쓰로틀링 관리</string>
|
||||||
|
<string name="thermal_title">쓰로틀링 관리 설정</string>
|
||||||
|
<string name="thermal_summary">쓰로틀링 관리 프로필 설정</string>
|
||||||
|
<string name="thermal_dialogTitle">쓰로틀링 관리 프로필 선택</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">성능 향상</string>
|
||||||
|
<string name="thermal_battery">배터리 효율 향상</string>
|
||||||
|
<string name="thermal_gaming">게이밍 특화</string>
|
||||||
|
<string name="thermal_balance">균형 설정</string>
|
||||||
|
<string name="thermal_extreme_battery">배터리 효율 매우 향상</string>
|
||||||
|
|
||||||
<string name="audio_title">사운드 강화</string>
|
<string name="audio_title">사운드 강화</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<string name="vibration_title">Retorno de vibração</string>
|
<string name="vibration_title">Retorno de vibração</string>
|
||||||
<string name="vibration_strength_title">Intensidade</string>
|
<string name="vibration_strength_title">Intensidade</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Temperatura</string>
|
||||||
|
<string name="thermal_title">Configurações de temperatura</string>
|
||||||
|
<string name="thermal_summary">Permite escolher o perfil de Temperatura adotado pelo aparelho</string>
|
||||||
|
<string name="thermal_dialogTitle">Escolha o perfil de Temperatura</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Desempenho</string>
|
||||||
|
<string name="thermal_battery">Bateria</string>
|
||||||
|
<string name="thermal_gaming">Jogos</string>
|
||||||
|
<string name="thermal_balance">Balanceado</string>
|
||||||
|
<string name="thermal_extreme_battery">Bateria Extrema</string>
|
||||||
|
|
||||||
<string name="audio_title">Áudio</string>
|
<string name="audio_title">Áudio</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<string name="vibration_title">Вибрация</string>
|
<string name="vibration_title">Вибрация</string>
|
||||||
<string name="vibration_strength_title">Сила</string>
|
<string name="vibration_strength_title">Сила</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Температурные режимы</string>
|
||||||
|
<string name="thermal_title">Настройки температуры</string>
|
||||||
|
<string name="thermal_summary">Выберите температурный режим</string>
|
||||||
|
<string name="thermal_dialogTitle">Выберите температурный режим</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Производительность</string>
|
||||||
|
<string name="thermal_battery">Энергосбережение</string>
|
||||||
|
<string name="thermal_gaming">Игры</string>
|
||||||
|
<string name="thermal_balance">Баланс</string>
|
||||||
|
<string name="thermal_extreme_battery">Экстремальное энергосбережение</string>
|
||||||
|
|
||||||
<string name="audio_title">Аудио</string>
|
<string name="audio_title">Аудио</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -31,6 +31,19 @@
|
||||||
<string name="vibration_title">Вибрация</string>
|
<string name="vibration_title">Вибрация</string>
|
||||||
<string name="vibration_strength_title">Сила</string>
|
<string name="vibration_strength_title">Сила</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Производительность</string>
|
||||||
|
<string name="thermal_title">Настройки производительности</string>
|
||||||
|
<string name="thermal_summary">Выберите Ваш профиль производительности</string>
|
||||||
|
<string name="thermal_dialogTitle">Выберите Ваш профиль производительности</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Производительность</string>
|
||||||
|
<string name="thermal_battery">Энергосбережение</string>
|
||||||
|
<string name="thermal_gaming">Игры</string>
|
||||||
|
<string name="thermal_balance">Баланс</string>
|
||||||
|
<string name="thermal_extreme_battery">Экстримальное энергосбережение</string>
|
||||||
|
|
||||||
<string name="audio_title">Аудио</string>
|
<string name="audio_title">Аудио</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<string name="vibration_title">Hmatová spätná odozva</string>
|
<string name="vibration_title">Hmatová spätná odozva</string>
|
||||||
<string name="vibration_strength_title">Sila</string>
|
<string name="vibration_strength_title">Sila</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Výkon</string>
|
||||||
|
<string name="thermal_title">Nastavenia Výkonu</string>
|
||||||
|
<string name="thermal_summary">Režim výkonu</string>
|
||||||
|
<string name="thermal_dialogTitle">Režim výkonu</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Výkon</string>
|
||||||
|
<string name="thermal_battery">Šetrič batérie</string>
|
||||||
|
<string name="thermal_gaming">Herný</string>
|
||||||
|
<string name="thermal_balance">Vyvážený</string>
|
||||||
|
<string name="thermal_extreme_battery">Extrémny šetrič batŕeie</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
<string name="dirac_title">Mi vylepšenie zvuku</string>
|
<string name="dirac_title">Mi vylepšenie zvuku</string>
|
||||||
<string name="dirac_summary">Optimalizácia kvality zvuku</string>
|
<string name="dirac_summary">Optimalizácia kvality zvuku</string>
|
||||||
|
|
|
@ -29,6 +29,19 @@
|
||||||
<string name="vibration_title">触觉反馈</string>
|
<string name="vibration_title">触觉反馈</string>
|
||||||
<string name="vibration_strength_title">强度</string>
|
<string name="vibration_strength_title">强度</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">性能</string>
|
||||||
|
<string name="thermal_title">性能选项</string>
|
||||||
|
<string name="thermal_summary">性能选项</string>
|
||||||
|
<string name="thermal_dialogTitle">设置性能选项</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">高性能</string>
|
||||||
|
<string name="thermal_battery">延长电池</string>
|
||||||
|
<string name="thermal_gaming">游戏</string>
|
||||||
|
<string name="thermal_balance">平衡</string>
|
||||||
|
<string name="thermal_extreme_battery">极致延长电池</string>
|
||||||
|
|
||||||
<!-- Dirac -->
|
<!-- Dirac -->
|
||||||
<string name="audio_title">音米</string>
|
<string name="audio_title">音米</string>
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,23 @@
|
||||||
<string name="vibration_title">触觉反馈</string>
|
<string name="vibration_title">触觉反馈</string>
|
||||||
<string name="vibration_strength_title">强度</string>
|
<string name="vibration_strength_title">强度</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">性能</string>
|
||||||
|
<string name="thermal_title">性能选项</string>
|
||||||
|
<string name="thermal_summary">性能选项</string>
|
||||||
|
<string name="thermal_dialogTitle">设置性能选项</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">高性能</string>
|
||||||
|
<string name="thermal_battery">延长电池</string>
|
||||||
|
<string name="thermal_gaming">游戏</string>
|
||||||
|
<string name="thermal_balance">平衡</string>
|
||||||
|
<string name="thermal_extreme_battery">极致延长电池</string>
|
||||||
|
|
||||||
|
<!-- FP Actions -->
|
||||||
|
|
||||||
|
<!-- Values for FP Actions -->
|
||||||
|
|
||||||
<string name="audio_title">音频</string>
|
<string name="audio_title">音频</string>
|
||||||
|
|
||||||
<!-- Dirac settings -->
|
<!-- Dirac settings -->
|
||||||
|
|
|
@ -14,6 +14,20 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
|
<string-array name="thermal_profiles">
|
||||||
|
<item>@string/thermal_balance</item>
|
||||||
|
<item>@string/thermal_performance</item>
|
||||||
|
<item>@string/thermal_battery</item>
|
||||||
|
<item>@string/thermal_gaming</item>
|
||||||
|
<item>@string/thermal_extreme_battery</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="thermal_values">
|
||||||
|
<item>0</item>
|
||||||
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
|
<item>4</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
<!-- Values for Dirac headset pref -->
|
<!-- Values for Dirac headset pref -->
|
||||||
<string-array name="dirac_headset_pref_entries" translatable="false">
|
<string-array name="dirac_headset_pref_entries" translatable="false">
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<string name="vibration_title">Haptic Feedback</string>
|
<string name="vibration_title">Haptic Feedback</string>
|
||||||
<string name="vibration_strength_title">Strength</string>
|
<string name="vibration_strength_title">Strength</string>
|
||||||
|
|
||||||
|
<!-- Thermal Profiles -->
|
||||||
|
<string name="thermal_profile_title">Thermal</string>
|
||||||
|
<string name="thermal_title">Thermal Settings</string>
|
||||||
|
<string name="thermal_summary">Choose your Thermal Profile</string>
|
||||||
|
<string name="thermal_dialogTitle">Choose your Thermal Profile</string>
|
||||||
|
|
||||||
|
<!-- Values for Thermal Presets -->
|
||||||
|
<string name="thermal_performance">Performance</string>
|
||||||
|
<string name="thermal_battery">Battery</string>
|
||||||
|
<string name="thermal_gaming">Gaming</string>
|
||||||
|
<string name="thermal_balance">Balance</string>
|
||||||
|
<string name="thermal_extreme_battery">Extreme Battery</string>
|
||||||
|
|
||||||
<!-- kcal -->
|
<!-- kcal -->
|
||||||
<string name="advanced_settings_kcal">Display Color Calibration</string>
|
<string name="advanced_settings_kcal">Display Color Calibration</string>
|
||||||
<string name="cat_colormanagement">Color Settings</string>
|
<string name="cat_colormanagement">Color Settings</string>
|
||||||
|
|
|
@ -187,4 +187,20 @@
|
||||||
android:summary="@string/fastcharge_summary" />
|
android:summary="@string/fastcharge_summary" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="thermal_profile"
|
||||||
|
android:title="@string/thermal_profile_title">
|
||||||
|
|
||||||
|
<org.lineageos.settings.device.preferences.SecureSettingListPreference
|
||||||
|
android:persistent="true"
|
||||||
|
android:defaultValue="0"
|
||||||
|
android:dialogTitle="@string/thermal_dialogTitle"
|
||||||
|
android:entries="@array/thermal_profiles"
|
||||||
|
android:entryValues="@array/thermal_values"
|
||||||
|
android:key="thermal"
|
||||||
|
android:summary="@string/thermal_summary"
|
||||||
|
android:title="@string/thermal_title"
|
||||||
|
android:icon="@drawable/ic_thermal" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
|
@ -82,6 +82,10 @@ public class BootReceiver extends BroadcastReceiver implements Utils {
|
||||||
FileUtils.setProp(DeviceSettings.HALL_WAKEUP_PROP, Settings.Secure.getInt(
|
FileUtils.setProp(DeviceSettings.HALL_WAKEUP_PROP, Settings.Secure.getInt(
|
||||||
context.getContentResolver(), DeviceSettings.PREF_HALL_WAKEUP, 1) == 1);
|
context.getContentResolver(), DeviceSettings.PREF_HALL_WAKEUP, 1) == 1);
|
||||||
|
|
||||||
|
// Thermal
|
||||||
|
FileUtils.setValue(DeviceSettings.THERMAL_PATH, Settings.Secure.getInt(context.getContentResolver(),
|
||||||
|
DeviceSettings.PREF_THERMAL, 0));
|
||||||
|
|
||||||
// Dirac
|
// Dirac
|
||||||
context.startService(new Intent(context, DiracService.class));
|
context.startService(new Intent(context, DiracService.class));
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,9 @@ public class DeviceSettings extends PreferenceFragment implements
|
||||||
public static final String HALL_WAKEUP_PATH = "/sys/module/hall/parameters/hall_toggle";
|
public static final String HALL_WAKEUP_PATH = "/sys/module/hall/parameters/hall_toggle";
|
||||||
public static final String HALL_WAKEUP_PROP = "persist.service.folio_daemon";
|
public static final String HALL_WAKEUP_PROP = "persist.service.folio_daemon";
|
||||||
|
|
||||||
|
public static final String PREF_THERMAL = "thermal";
|
||||||
|
public static final String THERMAL_PATH = "/sys/devices/virtual/thermal/thermal_message/sconfig";
|
||||||
|
|
||||||
private static final String DEVICE_DOZE_PACKAGE_NAME = "com.advanced.settings.doze";
|
private static final String DEVICE_DOZE_PACKAGE_NAME = "com.advanced.settings.doze";
|
||||||
|
|
||||||
private static final String DEVICE_JASON_PACKAGE_NAME = "org.lineageos.settings.devicex";
|
private static final String DEVICE_JASON_PACKAGE_NAME = "org.lineageos.settings.devicex";
|
||||||
|
@ -90,6 +93,7 @@ public class DeviceSettings extends PreferenceFragment implements
|
||||||
private SecureSettingListPreference mHeadsetType;
|
private SecureSettingListPreference mHeadsetType;
|
||||||
private SecureSettingListPreference mPreset;
|
private SecureSettingListPreference mPreset;
|
||||||
private SecureSettingSwitchPreference mFastcharge;
|
private SecureSettingSwitchPreference mFastcharge;
|
||||||
|
private SecureSettingListPreference mTHERMAL;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||||
|
@ -160,6 +164,12 @@ public class DeviceSettings extends PreferenceFragment implements
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Thermal Switch
|
||||||
|
mTHERMAL = (SecureSettingListPreference) findPreference(PREF_THERMAL);
|
||||||
|
mTHERMAL.setValue(FileUtils.getValue(THERMAL_PATH));
|
||||||
|
mTHERMAL.setSummary(mTHERMAL.getEntry());
|
||||||
|
mTHERMAL.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
// Dirac
|
// Dirac
|
||||||
boolean enhancerEnabled;
|
boolean enhancerEnabled;
|
||||||
try {
|
try {
|
||||||
|
@ -271,6 +281,12 @@ public class DeviceSettings extends PreferenceFragment implements
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PREF_THERMAL:
|
||||||
|
mTHERMAL.setValue((String) value);
|
||||||
|
mTHERMAL.setSummary(mTHERMAL.getEntry());
|
||||||
|
FileUtils.setValue(THERMAL_PATH, (String) value);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.lineageos.settings.device;
|
||||||
|
|
||||||
|
import android.service.quicksettings.Tile;
|
||||||
|
import android.service.quicksettings.TileService;
|
||||||
|
|
||||||
|
public class PerformanceTileService extends TileService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartListening() {
|
||||||
|
|
||||||
|
int currentState = Integer.parseInt(FileUtils.getValue(DeviceSettings.THERMAL_PATH));
|
||||||
|
|
||||||
|
Tile tile = getQsTile();
|
||||||
|
tile.setState(Tile.STATE_ACTIVE);
|
||||||
|
tile.setLabel(getResources().getStringArray(R.array.thermal_profiles)[currentState]);
|
||||||
|
|
||||||
|
tile.updateTile();
|
||||||
|
super.onStartListening();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick() {
|
||||||
|
int currentState = Integer.parseInt(FileUtils.getValue(DeviceSettings.THERMAL_PATH));
|
||||||
|
|
||||||
|
int nextState;
|
||||||
|
if (currentState == 4) {
|
||||||
|
nextState = 0;
|
||||||
|
} else {
|
||||||
|
nextState = currentState + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Tile tile = getQsTile();
|
||||||
|
FileUtils.setValue(DeviceSettings.THERMAL_PATH, nextState);
|
||||||
|
tile.setLabel(getResources().getStringArray(R.array.thermal_profiles)[nextState]);
|
||||||
|
|
||||||
|
tile.updateTile();
|
||||||
|
super.onClick();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue