LineageSettingsProvider: Allow enabling lockscreen rotation by default

...and enable it by default for sw600dp

Change-Id: I0df4f0907591146a21d3da0e0d11e3213ad8767a
This commit is contained in:
Michael Bestas
2023-07-10 15:10:54 +03:00
parent ff85a9631f
commit 1a53318ab3
3 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014-2015 The CyanogenMod Project
2019-2023 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>
<!-- Defaults for System -->
<!-- Default value for lockscreen rotation -->
<bool name="def_lockscreen_rotation">true</bool>
</resources>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014-2015 The CyanogenMod Project
2019-2021 The LineageOS Project
2019-2023 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.
@@ -16,6 +16,7 @@
limitations under the License.
-->
<resources>
<!-- Defaults for Secure -->
<!-- Default for LineageSettings.Secure.STATS_COLLECTION -->
@@ -78,4 +79,7 @@
-->
<integer name="def_clock_position">2</integer>
<!-- Default value for lockscreen rotation -->
<bool name="def_lockscreen_rotation">false</bool>
</resources>

View File

@@ -1,6 +1,6 @@
/**
* Copyright (C) 2015-2016 The CyanogenMod Project
* 2017-2022 The LineageOS Project
* 2017-2023 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.
@@ -491,6 +491,9 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{
loadIntegerSetting(stmt, LineageSettings.System.STATUS_BAR_CLOCK,
R.integer.def_clock_position);
loadBooleanSetting(stmt, LineageSettings.System.LOCKSCREEN_ROTATION,
R.bool.def_lockscreen_rotation);
if (mContext.getResources().getBoolean(R.bool.def_notification_pulse_custom_enable)) {
loadStringSetting(stmt, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES,
R.string.def_notification_pulse_custom_value);