mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-25 07:29:24 -05:00
Add more preferred network modes such as LTE Only, LTE/3G only, and 3G only
This commit is contained in:
parent
c07027dd97
commit
0df749ef73
@ -181,7 +181,7 @@
|
||||
<subId>1</subId>
|
||||
</connectionDescriptor>
|
||||
</profile>
|
||||
<profile name="Bed" uuid="ac1e7dbc-b785-431d-ba6c-b0bb221e8772">
|
||||
<profile name="Sleep" uuid="ac1e7dbc-b785-431d-ba6c-b0bb221e8772">
|
||||
<uuids/>
|
||||
<profiletype>toggle</profiletype>
|
||||
<statusbar>no</statusbar>
|
||||
|
@ -181,7 +181,7 @@
|
||||
<subId>1</subId>
|
||||
</connectionDescriptor>
|
||||
</profile>
|
||||
<profile name="Bed" uuid="ac1e7dbc-b785-431d-ba6c-b0bb221e8772">
|
||||
<profile name="Sleep" uuid="ac1e7dbc-b785-431d-ba6c-b0bb221e8772">
|
||||
<uuids/>
|
||||
<profiletype>toggle</profiletype>
|
||||
<statusbar>no</statusbar>
|
||||
|
@ -0,0 +1,268 @@
|
||||
From d731905f0209c623aca7059d2764786b938813b8 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 28 Dec 2018 08:01:25 -0500
|
||||
Subject: [PATCH] More preferred network modes
|
||||
|
||||
Change-Id: I7c670fc1cb8d9c7f9a7a454286511865274f437b
|
||||
---
|
||||
res/values/strings.xml | 47 +++++++++++++++++++
|
||||
.../android/phone/MobileNetworkSettings.java | 43 ++++++++++-------
|
||||
2 files changed, 73 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 5be5e1c7..b8c4b9c6 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -423,6 +423,8 @@
|
||||
<string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary">Preferred network mode: CDMA/EvDo/GSM/WCDMA</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE [CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_summary">Preferred network mode: LTE </string>
|
||||
+ <!-- Mobile network settings, summary for preferred network mode LTE only [CHAR LIMIT=100] -->
|
||||
+ <string name="preferred_network_mode_lte_only_summary">Preferred network mode: LTE only</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode GSM/WCDMA/LTE [CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_gsm_wcdma_summary">Preferred network mode: GSM/WCDMA/LTE</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode CDMA+LTE/EVDO[CHAR LIMIT=100] -->
|
||||
@@ -431,6 +433,8 @@
|
||||
<string name="preferred_network_mode_global_summary">Preferred network mode: Global</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / WCDMA[CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_wcdma_summary">Preferred network mode: LTE / WCDMA</string>
|
||||
+ <!-- Mobile network settings, summary for preferred network mode LTE / WCDMA only [CHAR LIMIT=100] -->
|
||||
+ <string name="preferred_network_mode_lte_wcdma_only_summary">Preferred network mode: LTE / WCDMA only</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / GSM / UMTS [CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_gsm_umts_summary">Preferred network mode: LTE / GSM / UMTS</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / CDMA [CHAR LIMIT=100] -->
|
||||
@@ -449,6 +453,8 @@
|
||||
<string name="preferred_network_mode_tdscdma_gsm_wcdma_summary">Preferred network mode: TDSCDMA/GSM/WCDMA</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / TDSCDMA / WCDMA[CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_tdscdma_wcdma_summary">Preferred network mode: LTE/TDSCDMA/WCDMA</string>
|
||||
+ <!-- Mobile network settings, summary for preferred network mode LTE / TDSCDMA / WCDMA only [CHAR LIMIT=100] -->
|
||||
+ <string name="preferred_network_mode_lte_tdscdma_wcdma_only_summary">Preferred network mode: LTE/TDSCDMA/WCDMA only</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / TDSCDMA / GSM / WCDMA[CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_tdscdma_gsm_wcdma_summary">Preferred network mode: LTE/TDSCDMA/GSM/WCDMA</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode TDSCDMA / CDMA / EvDo / GSM / WCDMA[CHAR LIMIT=100] -->
|
||||
@@ -680,96 +686,137 @@
|
||||
<string name="multi_category_enable">Multi-category enabled</string>
|
||||
<string name="multi_category_disable">Multi-category disabled</string>
|
||||
|
||||
+ <string name="network_3G_lte_only">LTE/3G only</string>
|
||||
+ <string name="network_lte_only">LTE only</string>
|
||||
<string name="network_lte">LTE (recommended)</string>
|
||||
+ <string name="network_3G_4G_only">4G/3G only</string>
|
||||
+ <string name="network_4G_only">4G only</string>
|
||||
<string name="network_4G">4G (recommended)</string>
|
||||
+ <string name="network_3G_only">3G only</string>
|
||||
<string name="network_3G" translatable="false">3G</string>
|
||||
<string name="network_2G" translatable="false">2G</string>
|
||||
<string name="network_1x" translatable="false">1x</string>
|
||||
<string name="network_global">Global</string>
|
||||
|
||||
<string-array name="enabled_networks_except_gsm_choices" translatable="false">
|
||||
+ <item>@string/network_3G_lte_only</item>
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_gsm_4g_choices" translatable="false">
|
||||
+ <item>@string/network_3G_4G_only</item>
|
||||
+ <item>@string/network_4G_only</item>
|
||||
<item>@string/network_4G</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_gsm_values" translatable="false">
|
||||
+ <item>"12"</item>
|
||||
+ <item>"11"</item>
|
||||
<item>"9"</item>
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_except_lte_choices" translatable="false">
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_lte_values" translatable="false">
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
<item>"1"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_except_gsm_lte_choices" translatable="false">
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_gsm_lte_values" translatable="false">
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_choices" translatable="false">
|
||||
+ <item>@string/network_3G_lte_only</item>
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_4g_choices" translatable="false">
|
||||
+ <item>@string/network_3G_4G_only</item>
|
||||
+ <item>@string/network_4G_only</item>
|
||||
<item>@string/network_4G</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_values" translatable="false">
|
||||
+ <item>"12"</item>
|
||||
+ <item>"11"</item>
|
||||
<item>"9"</item>
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
<item>"1"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_cdma_choices" translatable="false">
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_1x</item>
|
||||
<item>@string/network_global</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_cdma_values" translatable="false">
|
||||
+ <item>"11"</item>
|
||||
<item>"8"</item>
|
||||
+ <item>"6"</item>
|
||||
<item>"4"</item>
|
||||
<item>"5"</item>
|
||||
<item>"10"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_cdma_no_lte_choices" translatable="false">
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_1x</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_cdma_no_lte_values" translatable="false">
|
||||
+ <item>"6"</item>
|
||||
<item>"4"</item>
|
||||
<item>"5"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_cdma_only_lte_choices" translatable="false">
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
<item>@string/network_global</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_cdma_only_lte_values" translatable="false">
|
||||
+ <item>"11"</item>
|
||||
<item>"8"</item>
|
||||
<item>"10"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_tdscdma_choices" translatable="false">
|
||||
+ <item>@string/network_3G_lte_only</item>
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_tdscdma_values" translatable="false">
|
||||
+ <item>"19"</item>
|
||||
+ <item>"11"</item>
|
||||
<item>"22"</item>
|
||||
+ <item>"14"</item>
|
||||
<item>"18"</item>
|
||||
<item>"1"</item>
|
||||
</string-array>
|
||||
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
|
||||
index d5c09924..ac904af0 100644
|
||||
--- a/src/com/android/phone/MobileNetworkSettings.java
|
||||
+++ b/src/com/android/phone/MobileNetworkSettings.java
|
||||
@@ -1025,7 +1025,7 @@ public class MobileNetworkSettings extends PreferenceActivity
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_ONLY:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
- R.string.preferred_network_mode_lte_summary);
|
||||
+ R.string.preferred_network_mode_lte_only_summary);
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_TDSCDMA_GSM:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
@@ -1072,11 +1072,11 @@ public class MobileNetworkSettings extends PreferenceActivity
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
- R.string.preferred_network_mode_lte_tdscdma_wcdma_summary);
|
||||
+ R.string.preferred_network_mode_lte_tdscdma_wcdma_only_summary);
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_WCDMA:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
- R.string.preferred_network_mode_lte_wcdma_summary);
|
||||
+ R.string.preferred_network_mode_lte_wcdma_only_summary);
|
||||
break;
|
||||
default:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
@@ -1093,7 +1093,6 @@ public class MobileNetworkSettings extends PreferenceActivity
|
||||
Integer.toString(Phone.NT_MODE_TDSCDMA_GSM_WCDMA));
|
||||
mButtonEnabledNetworks.setSummary(R.string.network_3G);
|
||||
break;
|
||||
- case Phone.NT_MODE_WCDMA_ONLY:
|
||||
case Phone.NT_MODE_GSM_UMTS:
|
||||
case Phone.NT_MODE_WCDMA_PREF:
|
||||
if (!mIsGlobalCdma) {
|
||||
@@ -1125,19 +1124,6 @@ public class MobileNetworkSettings extends PreferenceActivity
|
||||
controlGsmOptions(true);
|
||||
break;
|
||||
}
|
||||
- case Phone.NT_MODE_LTE_ONLY:
|
||||
- case Phone.NT_MODE_LTE_WCDMA:
|
||||
- if (!mIsGlobalCdma) {
|
||||
- mButtonEnabledNetworks.setValue(
|
||||
- Integer.toString(Phone.NT_MODE_LTE_GSM_WCDMA));
|
||||
- mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
||||
- ? R.string.network_4G : R.string.network_lte);
|
||||
- } else {
|
||||
- mButtonEnabledNetworks.setValue(
|
||||
- Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
|
||||
- mButtonEnabledNetworks.setSummary(R.string.network_global);
|
||||
- }
|
||||
- break;
|
||||
case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
|
||||
if (isWorldMode()) {
|
||||
mButtonEnabledNetworks.setSummary(
|
||||
@@ -1199,6 +1185,29 @@ public class MobileNetworkSettings extends PreferenceActivity
|
||||
}
|
||||
}
|
||||
break;
|
||||
+ case Phone.NT_MODE_LTE_WCDMA:
|
||||
+ if (!mIsGlobalCdma) {
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_LTE_WCDMA));
|
||||
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
||||
+ ? R.string.network_3G_4G_only : R.string.network_3G_lte_only);
|
||||
+ } else {
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
|
||||
+ mButtonEnabledNetworks.setSummary(R.string.network_global);
|
||||
+ }
|
||||
+ break;
|
||||
+ case Phone.NT_MODE_WCDMA_ONLY:
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_WCDMA_ONLY));
|
||||
+ mButtonEnabledNetworks.setSummary(R.string.network_3G_only);
|
||||
+ break;
|
||||
+ case Phone.NT_MODE_LTE_ONLY:
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_LTE_ONLY));
|
||||
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
||||
+ ? R.string.network_4G_only : R.string.network_lte_only);
|
||||
+ break;
|
||||
default:
|
||||
String errMsg = "Invalid Network Mode (" + NetworkMode + "). Ignore.";
|
||||
loge(errMsg);
|
||||
--
|
||||
2.20.1
|
||||
|
@ -0,0 +1,280 @@
|
||||
From c9384522f4667ba0f444cff167dfb7a1d348e5b2 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 27 Dec 2018 15:22:46 -0500
|
||||
Subject: [PATCH] More preferred network modes
|
||||
|
||||
Change-Id: I78e8f3b018fd867ad25aecb2296588cf4a6e2347
|
||||
---
|
||||
res/values/strings.xml | 47 +++++++++++++++++++
|
||||
.../android/phone/MobileNetworkSettings.java | 46 +++++++++++-------
|
||||
2 files changed, 76 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index a5651571c..7e9ebc2f8 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -408,6 +408,8 @@
|
||||
<string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary">Preferred network mode: CDMA/EvDo/GSM/WCDMA</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE [CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_summary">Preferred network mode: LTE </string>
|
||||
+ <!-- Mobile network settings, summary for preferred network mode LTE only [CHAR LIMIT=100] -->
|
||||
+ <string name="preferred_network_mode_lte_only_summary">Preferred network mode: LTE only</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode GSM/WCDMA/LTE [CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_gsm_wcdma_summary">Preferred network mode: GSM/WCDMA/LTE</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode CDMA+LTE/EVDO[CHAR LIMIT=100] -->
|
||||
@@ -416,6 +418,8 @@
|
||||
<string name="preferred_network_mode_global_summary">Preferred network mode: Global</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / WCDMA[CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_wcdma_summary">Preferred network mode: LTE / WCDMA</string>
|
||||
+ <!-- Mobile network settings, summary for preferred network mode LTE / WCDMA only [CHAR LIMIT=100] -->
|
||||
+ <string name="preferred_network_mode_lte_wcdma_only_summary">Preferred network mode: LTE / WCDMA only</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / GSM / UMTS [CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_gsm_umts_summary">Preferred network mode: LTE / GSM / UMTS</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / CDMA [CHAR LIMIT=100] -->
|
||||
@@ -434,6 +438,8 @@
|
||||
<string name="preferred_network_mode_tdscdma_gsm_wcdma_summary">Preferred network mode: TDSCDMA/GSM/WCDMA</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / TDSCDMA / WCDMA[CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_tdscdma_wcdma_summary">Preferred network mode: LTE/TDSCDMA/WCDMA</string>
|
||||
+ <!-- Mobile network settings, summary for preferred network mode LTE / TDSCDMA / WCDMA only [CHAR LIMIT=100] -->
|
||||
+ <string name="preferred_network_mode_lte_tdscdma_wcdma_only_summary">Preferred network mode: LTE/TDSCDMA/WCDMA only</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode LTE / TDSCDMA / GSM / WCDMA[CHAR LIMIT=100] -->
|
||||
<string name="preferred_network_mode_lte_tdscdma_gsm_wcdma_summary">Preferred network mode: LTE/TDSCDMA/GSM/WCDMA</string>
|
||||
<!-- Mobile network settings, summary for preferred network mode TDSCDMA / CDMA / EvDo / GSM / WCDMA[CHAR LIMIT=100] -->
|
||||
@@ -694,96 +700,137 @@
|
||||
<string name="multi_category_enable">Multi-category enabled</string>
|
||||
<string name="multi_category_disable">Multi-category disabled</string>
|
||||
|
||||
+ <string name="network_3G_lte_only">LTE/3G only</string>
|
||||
+ <string name="network_lte_only">LTE only</string>
|
||||
<string name="network_lte">LTE (recommended)</string>
|
||||
+ <string name="network_3G_4G_only">4G/3G only</string>
|
||||
+ <string name="network_4G_only">4G only</string>
|
||||
<string name="network_4G">4G (recommended)</string>
|
||||
+ <string name="network_3G_only">3G only</string>
|
||||
<string name="network_3G" translatable="false">3G</string>
|
||||
<string name="network_2G" translatable="false">2G</string>
|
||||
<string name="network_1x" translatable="false">1x</string>
|
||||
<string name="network_global">Global</string>
|
||||
|
||||
<string-array name="enabled_networks_except_gsm_choices" translatable="false">
|
||||
+ <item>@string/network_3G_lte_only</item>
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_gsm_4g_choices" translatable="false">
|
||||
+ <item>@string/network_3G_4G_only</item>
|
||||
+ <item>@string/network_4G_only</item>
|
||||
<item>@string/network_4G</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_gsm_values" translatable="false">
|
||||
+ <item>"12"</item>
|
||||
+ <item>"11"</item>
|
||||
<item>"9"</item>
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_except_lte_choices" translatable="false">
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_lte_values" translatable="false">
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
<item>"1"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_except_gsm_lte_choices" translatable="false">
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_except_gsm_lte_values" translatable="false">
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_choices" translatable="false">
|
||||
+ <item>@string/network_3G_lte_only</item>
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_4g_choices" translatable="false">
|
||||
+ <item>@string/network_3G_4G_only</item>
|
||||
+ <item>@string/network_4G_only</item>
|
||||
<item>@string/network_4G</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_values" translatable="false">
|
||||
+ <item>"12"</item>
|
||||
+ <item>"11"</item>
|
||||
<item>"9"</item>
|
||||
+ <item>"2"</item>
|
||||
<item>"0"</item>
|
||||
<item>"1"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_cdma_choices" translatable="false">
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_1x</item>
|
||||
<item>@string/network_global</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_cdma_values" translatable="false">
|
||||
+ <item>"11"</item>
|
||||
<item>"8"</item>
|
||||
+ <item>"6"</item>
|
||||
<item>"4"</item>
|
||||
<item>"5"</item>
|
||||
<item>"10"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_cdma_no_lte_choices" translatable="false">
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_1x</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_cdma_no_lte_values" translatable="false">
|
||||
+ <item>"6"</item>
|
||||
<item>"4"</item>
|
||||
<item>"5"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_cdma_only_lte_choices" translatable="false">
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
<item>@string/network_global</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_cdma_only_lte_values" translatable="false">
|
||||
+ <item>"11"</item>
|
||||
<item>"8"</item>
|
||||
<item>"10"</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="enabled_networks_tdscdma_choices" translatable="false">
|
||||
+ <item>@string/network_3G_lte_only</item>
|
||||
+ <item>@string/network_lte_only</item>
|
||||
<item>@string/network_lte</item>
|
||||
+ <item>@string/network_3G_only</item>
|
||||
<item>@string/network_3G</item>
|
||||
<item>@string/network_2G</item>
|
||||
</string-array>
|
||||
<string-array name="enabled_networks_tdscdma_values" translatable="false">
|
||||
+ <item>"19"</item>
|
||||
+ <item>"11"</item>
|
||||
<item>"22"</item>
|
||||
+ <item>"14"</item>
|
||||
<item>"18"</item>
|
||||
<item>"1"</item>
|
||||
</string-array>
|
||||
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
|
||||
index 0ea4702b4..ec8824b63 100644
|
||||
--- a/src/com/android/phone/MobileNetworkSettings.java
|
||||
+++ b/src/com/android/phone/MobileNetworkSettings.java
|
||||
@@ -1155,8 +1155,11 @@ public class MobileNetworkSettings extends Activity {
|
||||
int modemNetworkMode;
|
||||
// if new mode is invalid ignore it
|
||||
switch (buttonNetworkMode) {
|
||||
+ case Phone.NT_MODE_WCDMA_ONLY:
|
||||
case Phone.NT_MODE_WCDMA_PREF:
|
||||
case Phone.NT_MODE_GSM_ONLY:
|
||||
+ case Phone.NT_MODE_LTE_ONLY:
|
||||
+ case Phone.NT_MODE_LTE_WCDMA:
|
||||
case Phone.NT_MODE_LTE_GSM_WCDMA:
|
||||
case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
|
||||
case Phone.NT_MODE_CDMA:
|
||||
@@ -1363,7 +1366,7 @@ public class MobileNetworkSettings extends Activity {
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_ONLY:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
- R.string.preferred_network_mode_lte_summary);
|
||||
+ R.string.preferred_network_mode_lte_only_summary);
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_TDSCDMA_GSM:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
@@ -1410,11 +1413,11 @@ public class MobileNetworkSettings extends Activity {
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_TDSCDMA_WCDMA:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
- R.string.preferred_network_mode_lte_tdscdma_wcdma_summary);
|
||||
+ R.string.preferred_network_mode_lte_tdscdma_wcdma_only_summary);
|
||||
break;
|
||||
case Phone.NT_MODE_LTE_WCDMA:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
- R.string.preferred_network_mode_lte_wcdma_summary);
|
||||
+ R.string.preferred_network_mode_lte_wcdma_only_summary);
|
||||
break;
|
||||
default:
|
||||
mButtonPreferredNetworkMode.setSummary(
|
||||
@@ -1431,7 +1434,6 @@ public class MobileNetworkSettings extends Activity {
|
||||
Integer.toString(Phone.NT_MODE_TDSCDMA_GSM_WCDMA));
|
||||
mButtonEnabledNetworks.setSummary(R.string.network_3G);
|
||||
break;
|
||||
- case Phone.NT_MODE_WCDMA_ONLY:
|
||||
case Phone.NT_MODE_GSM_UMTS:
|
||||
case Phone.NT_MODE_WCDMA_PREF:
|
||||
if (!mIsGlobalCdma) {
|
||||
@@ -1463,19 +1465,6 @@ public class MobileNetworkSettings extends Activity {
|
||||
controlGsmOptions(true);
|
||||
break;
|
||||
}
|
||||
- case Phone.NT_MODE_LTE_ONLY:
|
||||
- case Phone.NT_MODE_LTE_WCDMA:
|
||||
- if (!mIsGlobalCdma) {
|
||||
- mButtonEnabledNetworks.setValue(
|
||||
- Integer.toString(Phone.NT_MODE_LTE_GSM_WCDMA));
|
||||
- mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
||||
- ? R.string.network_4G : R.string.network_lte);
|
||||
- } else {
|
||||
- mButtonEnabledNetworks.setValue(
|
||||
- Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
|
||||
- mButtonEnabledNetworks.setSummary(R.string.network_global);
|
||||
- }
|
||||
- break;
|
||||
case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
|
||||
if (isWorldMode()) {
|
||||
mButtonEnabledNetworks.setSummary(
|
||||
@@ -1537,6 +1526,29 @@ public class MobileNetworkSettings extends Activity {
|
||||
}
|
||||
}
|
||||
break;
|
||||
+ case Phone.NT_MODE_LTE_WCDMA:
|
||||
+ if (!mIsGlobalCdma) {
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_LTE_WCDMA));
|
||||
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
||||
+ ? R.string.network_3G_4G_only : R.string.network_3G_lte_only);
|
||||
+ } else {
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA));
|
||||
+ mButtonEnabledNetworks.setSummary(R.string.network_global);
|
||||
+ }
|
||||
+ break;
|
||||
+ case Phone.NT_MODE_WCDMA_ONLY:
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_WCDMA_ONLY));
|
||||
+ mButtonEnabledNetworks.setSummary(R.string.network_3G_only);
|
||||
+ break;
|
||||
+ case Phone.NT_MODE_LTE_ONLY:
|
||||
+ mButtonEnabledNetworks.setValue(
|
||||
+ Integer.toString(Phone.NT_MODE_LTE_ONLY));
|
||||
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
||||
+ ? R.string.network_4G_only : R.string.network_lte_only);
|
||||
+ break;
|
||||
default:
|
||||
String errMsg = "Invalid Network Mode (" + NetworkMode + "). Ignore.";
|
||||
loge(errMsg);
|
||||
--
|
||||
2.20.1
|
||||
|
@ -325,7 +325,7 @@ hardenDefconfig() {
|
||||
|
||||
#Enable supported options
|
||||
#Disabled: CONFIG_DEBUG_SG (bootloops - https://patchwork.kernel.org/patch/8989981)
|
||||
declare -a optionsYes=("CONFIG_ARM64_SW_TTBR0_PAN" "CONFIG_BUG" "CONFIG_BUG_ON_DATA_CORRUPTION" "CONFIG_CC_STACKPROTECTOR" "CONFIG_CC_STACKPROTECTOR_STRONG" "CONFIG_CPU_SW_DOMAIN_PAN" "CONFIG_DEBUG_CREDENTIALS" "CONFIG_DEBUG_KERNEL" "CONFIG_DEBUG_LIST" "CONFIG_DEBUG_NOTIFIERS" "CONFIG_DEBUG_RODATA" "CONFIG_DEBUG_WX" "CONFIG_FORTIFY_SOURCE" "CONFIG_GCC_PLUGIN_LATENT_ENTROPY" "CONFIG_GCC_PLUGIN_RANDSTRUCT" "CONFIG_GCC_PLUGINS" "CONFIG_GCC_PLUGIN_STRUCTLEAK" "CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL" "CONFIG_HARDENED_USERCOPY" "CONFIG_IO_STRICT_DEVMEM" "CONFIG_KAISER" "CONFIG_LEGACY_VSYSCALL_NONE" "CONFIG_PAGE_POISONING" "CONFIG_PAGE_POISONING_NO_SANITY" "CONFIG_PAGE_POISONING_ZERO" "CONFIG_PAGE_TABLE_ISOLATION" "CONFIG_PANIC_ON_OOPS" "CONFIG_RANDOMIZE_BASE" "CONFIG_REFCOUNT_FULL" "CONFIG_RETPOLINE" "CONFIG_SCHED_STACK_END_CHECK" "CONFIG_SECCOMP" "CONFIG_SECCOMP_FILTER" "CONFIG_SECURITY" "CONFIG_SECURITY_PERF_EVENTS_RESTRICT" "CONFIG_SECURITY_YAMA" "CONFIG_SECURITY_YAMA_STACKED" "CONFIG_SLAB_FREELIST_RANDOM" "CONFIG_SLAB_HARDENED" "CONFIG_SLUB_DEBUG" "CONFIG_STRICT_DEVMEM" "CONFIG_STRICT_KERNEL_RWX" "CONFIG_STRICT_MEMORY_RWX" "CONFIG_SYN_COOKIES" "CONFIG_UNMAP_KERNEL_AT_EL0" "CONFIG_VMAP_STACK" "CONFIG_SECURITY_DMESG_RESTRICT" "CONFIG_SLAB_FREELIST_HARDENED" "CONFIG_GCC_PLUGINS" "CONFIG_GCC_PLUGIN_LATENT_ENTROPY" "CONFIG_GCC_PLUGIN_STRUCTLEAK" "CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL" "CONFIG_GCC_PLUGIN_RANDSTRUCT" "CONFIG_GCC_PLUGIN_RANDSTRUCT_PERFORMANCE" "CONFIG_IPV6_PRIVACY" "CONFIG_HARDEN_BRANCH_PREDICTOR" "CONFIG_IOMMU_API" "CONFIG_IOMMU_SUPPORT" "CONFIG_IOMMU_HELPER" "INTEL_IOMMU_DEFAULT_ON" "CONFIG_ARM_SMMU" "CONFIG_QCOM_IOMMU" "CONFIG_MSM_IOMMU" "CONFIG_MSM_TZ_SMMU" "CONFIG_KGSL_PER_PROCESS_PAGE_TABLE" "CONFIG_MSM_KGSL_MMU_PAGE_FAULT" "CONFIG_IOMMU_PGTABLES_L2" "CONFIG_TEGRA_IOMMU_SMMU" "CONFIG_TEGRA_IOMMU_GART" "CONFIG_MTK_IOMMU" "CONFIG_EXYNOS_IOMMU" "CONFIG_OMAP_IOMMU" "CONFIG_OF_IOMMU")
|
||||
declare -a optionsYes=("CONFIG_ARM64_SW_TTBR0_PAN" "CONFIG_BUG" "CONFIG_BUG_ON_DATA_CORRUPTION" "CONFIG_CC_STACKPROTECTOR" "CONFIG_CC_STACKPROTECTOR_STRONG" "CONFIG_CPU_SW_DOMAIN_PAN" "CONFIG_DEBUG_CREDENTIALS" "CONFIG_DEBUG_KERNEL" "CONFIG_DEBUG_LIST" "CONFIG_DEBUG_NOTIFIERS" "CONFIG_DEBUG_RODATA" "CONFIG_DEBUG_WX" "CONFIG_FORTIFY_SOURCE" "CONFIG_GCC_PLUGIN_LATENT_ENTROPY" "CONFIG_GCC_PLUGIN_RANDSTRUCT" "CONFIG_GCC_PLUGINS" "CONFIG_GCC_PLUGIN_STRUCTLEAK" "CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL" "CONFIG_HARDENED_USERCOPY" "CONFIG_IO_STRICT_DEVMEM" "CONFIG_KAISER" "CONFIG_LEGACY_VSYSCALL_NONE" "CONFIG_PAGE_POISONING" "CONFIG_PAGE_POISONING_NO_SANITY" "CONFIG_PAGE_POISONING_ZERO" "CONFIG_PAGE_TABLE_ISOLATION" "CONFIG_PANIC_ON_OOPS" "CONFIG_RANDOMIZE_BASE" "CONFIG_REFCOUNT_FULL" "CONFIG_RETPOLINE" "CONFIG_SCHED_STACK_END_CHECK" "CONFIG_SECCOMP" "CONFIG_SECCOMP_FILTER" "CONFIG_SECURITY" "CONFIG_SECURITY_PERF_EVENTS_RESTRICT" "CONFIG_SECURITY_YAMA" "CONFIG_SECURITY_YAMA_STACKED" "CONFIG_SLAB_FREELIST_RANDOM" "CONFIG_SLAB_HARDENED" "CONFIG_SLUB_DEBUG" "CONFIG_STRICT_DEVMEM" "CONFIG_STRICT_KERNEL_RWX" "CONFIG_STRICT_MEMORY_RWX" "CONFIG_SYN_COOKIES" "CONFIG_UNMAP_KERNEL_AT_EL0" "CONFIG_VMAP_STACK" "CONFIG_SECURITY_DMESG_RESTRICT" "CONFIG_SLAB_FREELIST_HARDENED" "CONFIG_GCC_PLUGINS" "CONFIG_GCC_PLUGIN_LATENT_ENTROPY" "CONFIG_GCC_PLUGIN_STRUCTLEAK" "CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL" "CONFIG_GCC_PLUGIN_RANDSTRUCT" "CONFIG_GCC_PLUGIN_RANDSTRUCT_PERFORMANCE" "CONFIG_IPV6_PRIVACY" "CONFIG_HARDEN_BRANCH_PREDICTOR" "CONFIG_IOMMU_API" "CONFIG_IOMMU_SUPPORT" "CONFIG_IOMMU_HELPER" "CONFIG_INTEL_IOMMU_DEFAULT_ON" "CONFIG_ARM_SMMU" "CONFIG_QCOM_IOMMU" "CONFIG_MSM_IOMMU" "CONFIG_MSM_TZ_SMMU" "CONFIG_KGSL_PER_PROCESS_PAGE_TABLE" "CONFIG_MSM_KGSL_MMU_PAGE_FAULT" "CONFIG_IOMMU_PGTABLES_L2" "CONFIG_TEGRA_IOMMU_SMMU" "CONFIG_TEGRA_IOMMU_GART" "CONFIG_MTK_IOMMU" "CONFIG_EXYNOS_IOMMU" "CONFIG_OMAP_IOMMU" "CONFIG_OF_IOMMU")
|
||||
for option in "${optionsYes[@]}"
|
||||
do
|
||||
sed -i 's/# '"$option"' is not set/'"$option"'=y/' $defconfigPath &>/dev/null || true;
|
||||
|
@ -134,6 +134,9 @@ sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPA
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
|
||||
enterAndClear "packages/services/Telephony";
|
||||
patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0001-More_Preferred_Network_Modes.patch";
|
||||
|
||||
enterAndClear "system/bt";
|
||||
patch -p1 < "$DOS_PATCHES/android_system_bt/0001-Improve_Quality.patch"; #Improve Bluetooth audio quality, credit @ValdikSS
|
||||
|
||||
|
@ -133,6 +133,9 @@ sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPA
|
||||
enterAndClear "packages/inputmethods/LatinIME";
|
||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||
|
||||
enterAndClear "packages/services/Telephony";
|
||||
patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/0001-More_Preferred_Network_Modes.patch";
|
||||
|
||||
enterAndClear "system/bt";
|
||||
patch -p1 < "$DOS_PATCHES/android_system_bt/0001-Improve_Quality.patch"; #Improve Bluetooth audio quality, credit @ValdikSS
|
||||
|
||||
@ -182,7 +185,7 @@ sed -i '3itypeattribute hwaddrs misc_block_device_exception;' sepolicy/hwaddrs.t
|
||||
|
||||
enterAndClear "device/lge/mako";
|
||||
echo "allow kickstart usbfs:dir search;" >> sepolicy/kickstart.te; #Fix forceencrypt on first boot
|
||||
patch -p1 < "$DOS_PATCHES/android_device_lge_mako/0001-Enable_LTE.patch";
|
||||
#patch -p1 < "$DOS_PATCHES/android_device_lge_mako/0001-Enable_LTE.patch"; #LTE offers enhanced crypto, however the leaked modem is 3 years insecure and eats battery
|
||||
|
||||
enterAndClear "device/motorola/clark";
|
||||
rm setup-makefiles.sh;
|
||||
|
Loading…
Reference in New Issue
Block a user