Add preference to disable charging animation

Close #456
This commit is contained in:
MM20
2023-08-26 23:04:47 +02:00
parent f079974c10
commit d1371b224d
8 changed files with 52 additions and 1 deletions
@@ -508,6 +508,9 @@
<string name="preference_icon_pack_summary_empty">No icon packs installed</string>
<!-- Indicates that an icon pack supports dynamic colors (icon colors adapt to the launchers color scheme) -->
<string name="icon_pack_dynamic_colors">Dynamic colors</string>
<string name="preference_category_animations">Animations</string>
<string name="preference_charging_animation">Charging</string>
<string name="preference_charging_animation_summary">Play a bubble animation while the device is charging</string>
<string name="preference_category_system_bars">System bars</string>
<string name="preference_status_bar_icons">Status bar icons</string>
<string name="preference_nav_bar_icons">Navigation bar icons</string>
@@ -185,6 +185,10 @@ fun createFactorySettings(context: Context): Settings {
.setOrdering(Settings.SearchResultOrderingSettings.Ordering.Weighted)
.setWeightFactor(Settings.SearchResultOrderingSettings.WeightFactor.Default)
)
.setAnimations(
Settings.AnimationSettings.newBuilder()
.setCharging(true)
)
.build()
}
@@ -15,5 +15,9 @@ class Migration_16_17: VersionedMigration(16, 17) {
}.toString()
)
)
.setAnimations(
builder.animations.toBuilder()
.setCharging(true)
)
}
}
@@ -367,4 +367,9 @@ message Settings {
bool widget_tags_multiline = 2;
}
UiState ui = 30;
message AnimationSettings {
bool charging = 1;
}
AnimationSettings animations = 31;
}