lineage_build_unified/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch
Andy CrossGate Yan 8c76874398 Initial commit
2019-08-08 10:59:47 +08:00

88 lines
4.6 KiB
Diff

From 2ac5823e318b5cbf1418d9f1b45fae66711a621b Mon Sep 17 00:00:00 2001
From: AndyCGYan <GeForce8800Ultra@gmail.com>
Date: Sun, 13 Jan 2019 21:44:48 +0800
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
---
res/values-zh-rCN/strings.xml | 4 ++--
res/values/strings.xml | 4 ++--
res/xml/long_screen_prefs.xml | 2 +-
res/xml/parts_catalog.xml | 4 ++--
src/org/lineageos/lineageparts/applications/LongScreenSettings.java | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 2938aa0..04848ad 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -481,8 +481,8 @@
<string name="expanded_desktop_style_hide_navigation">隐藏导航栏</string>
<string name="expanded_desktop_style_hide_both">同时隐藏</string>
<string name="expanded_desktop_nothing_to_show_text">关闭开关以自定义您每个应用的扩展桌面</string>
- <string name="long_screen_settings_title">全屏应用</string>
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
+ <string name="inverse_long_screen_settings_title">禁用拉伸全屏</string>
+ <string name="inverse_long_screen_settings_summary">对选定的应用禁用拉伸全屏</string>
<string name="charging_sounds_settings_title">充电提示音</string>
<string name="charging_sounds_enabled_title">启用</string>
<string name="charging_sounds_enabled_summary">连接或断开电源时发出声音</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 684cbee..bc5fffe 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -616,8 +616,8 @@
<string name="expanded_desktop_nothing_to_show_text">Turn the switch off to customize your expanded desktop on a per-app basis</string>
<!-- Applications: Long screen -->
- <string name="long_screen_settings_title">Full screen apps</string>
- <string name="long_screen_settings_summary">Force legacy apps to use full screen aspect ratio</string>
+ <string name="inverse_long_screen_settings_title">Disable stretch-to-fullscreen</string>
+ <string name="inverse_long_screen_settings_summary">Prevent selected apps from utilizing stretch-to-fullscreen</string>
<!-- Sounds: Charging sounds -->
<string name="charging_sounds_settings_title">Charging sounds</string>
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
index ec947fa..20da90a 100644
--- a/res/xml/long_screen_prefs.xml
+++ b/res/xml/long_screen_prefs.xml
@@ -18,6 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:lineage="http://schemas.android.com/apk/res/org.lineageos.lineageparts"
android:key="long_screen_settings"
- android:title="@string/long_screen_settings_title">
+ android:title="@string/inverse_long_screen_settings_title">
</PreferenceScreen>
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
index 2ad4fdb..4bc2c5a 100644
--- a/res/xml/parts_catalog.xml
+++ b/res/xml/parts_catalog.xml
@@ -102,8 +102,8 @@
lineage:xmlRes="@xml/expanded_desktop_prefs" />
<part android:key="long_screen_settings"
- android:title="@string/long_screen_settings_title"
- android:summary="@string/long_screen_settings_summary"
+ android:title="@string/inverse_long_screen_settings_title"
+ android:summary="@string/inverse_long_screen_settings_summary"
android:fragment="org.lineageos.lineageparts.applications.LongScreenSettings"
lineage:xmlRes="@xml/long_screen_prefs" />
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
index 782e33e..3aa6320 100644
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
@@ -245,7 +245,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
mApplicationsState.ensureIcon(entry);
holder.icon.setImageDrawable(entry.icon);
holder.state.setTag(entry);
- holder.state.setChecked(mLongScreen.shouldForceLongScreen(entry.info.packageName));
+ holder.state.setChecked(!(mLongScreen.shouldForceLongScreen(entry.info.packageName)));
return holder.rootView;
}
--
2.7.4