mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 10:32:42 +00:00
![Tad](/assets/img/avatar_default.png)
- No patches were found with incorrect authorship/From: lines - The older AndroidHardening patch repos are no longer available to verify CID. - New GrapheneOS patches do not include a CID. - *Signature_Spoofing.patch CID could not be found. - Fixed CID of *Harden_Sig_Spoofing.patch to match 14.1 - Fixed CID of *LGE_Fixes.patch to match 14.1 - Fixed CID of *Harden.patch to match 14.1 - Added edit note to *Harden.patch - Fixed CID of *PREREQ_Handle_All_Modes.patch to match 14.1 - Fixed CID of *More_Preferred_Network_Modes.patch to match 14.1 - Fixed CID of *AES256.patch to match 14.1 - Fixed CID of *0001-OTA_Keys.patch to match 18.1 - Fixed CID of *Camera_Fix.patch to match 15.1 - Fixed CID of *Connectivity.patch to match 14.1 - Fixed CID of *Fix_Calling.patch to match 14.1 - Fixed CID of *Remove_Analytics.patch to match 14.1 - Fixed CID of Unused-*.patch/audio_extn to match original Signed-off-by: Tad <tad@spotco.us>
260 lines
12 KiB
Diff
260 lines
12 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tad <tad@spotco.us>
|
|
Date: Fri, 28 Dec 2018 21:22:20 -0500
|
|
Subject: [PATCH] More preferred network modes
|
|
|
|
Change-Id: Ibd97b5209c002547da714cb176094fee57a18f6d
|
|
---
|
|
res/values/strings.xml | 47 +++++++++++++++++++
|
|
.../android/phone/MobileNetworkSettings.java | 31 ++++++++++--
|
|
2 files changed, 74 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
|
index c3939697d..b220a2331 100644
|
|
--- a/res/values/strings.xml
|
|
+++ b/res/values/strings.xml
|
|
@@ -476,6 +476,8 @@
|
|
<string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary">Preferred network mode: CDMA/EvDo/GSM/WCDMA</string>
|
|
<!-- LTE -->
|
|
<string name="preferred_network_mode_lte_summary">Preferred network mode: LTE </string>
|
|
+ <!-- LTE only -->
|
|
+ <string name="preferred_network_mode_lte_only_summary">Preferred network mode: LTE only</string>
|
|
<!-- GSM/WCDMA/LTE -->
|
|
<string name="preferred_network_mode_lte_gsm_wcdma_summary">Preferred network mode: GSM/WCDMA/LTE</string>
|
|
<!-- CDMA+LTE/EVDO -->
|
|
@@ -484,6 +486,8 @@
|
|
<string name="preferred_network_mode_global_summary">Preferred network mode: Global</string>
|
|
<!-- LTE / WCDMA -->
|
|
<string name="preferred_network_mode_lte_wcdma_summary">Preferred network mode: LTE / WCDMA</string>
|
|
+ <!-- LTE / WCDMA only -->
|
|
+ <string name="preferred_network_mode_lte_wcdma_only_summary">Preferred network mode: LTE / WCDMA only</string>
|
|
<!-- LTE / GSM / UMTS -->
|
|
<string name="preferred_network_mode_lte_gsm_umts_summary">Preferred network mode: LTE / GSM / UMTS</string>
|
|
<!-- LTE / CDMA -->
|
|
@@ -502,6 +506,8 @@
|
|
<string name="preferred_network_mode_tdscdma_gsm_wcdma_summary">Preferred network mode: TDSCDMA/GSM/WCDMA</string>
|
|
<!-- LTE/TDSCDMA/WCDMA -->
|
|
<string name="preferred_network_mode_lte_tdscdma_wcdma_summary">Preferred network mode: LTE/TDSCDMA/WCDMA</string>
|
|
+ <!-- LTE/TDSCDMA/WCDMA only -->
|
|
+ <string name="preferred_network_mode_lte_tdscdma_wcdma_only_summary">Preferred network mode: LTE/TDSCDMA/WCDMA only</string>
|
|
<!-- LTE/TDSCDMA/GSM/WCDMA -->
|
|
<string name="preferred_network_mode_lte_tdscdma_gsm_wcdma_summary">Preferred network mode: LTE/TDSCDMA/GSM/WCDMA</string>
|
|
<!-- TDSCDMA/CDMA/EvDo/GSM/WCDMA -->
|
|
@@ -723,96 +729,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 36b65e77c..968ec96bc 100644
|
|
--- a/src/com/android/phone/MobileNetworkSettings.java
|
|
+++ b/src/com/android/phone/MobileNetworkSettings.java
|
|
@@ -1318,8 +1318,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:
|
|
@@ -1548,7 +1551,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(
|
|
@@ -1595,11 +1598,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(
|
|
@@ -1621,6 +1624,12 @@ public class MobileNetworkSettings extends Activity {
|
|
mButtonEnabledNetworks.setSummary(R.string.network_3G);
|
|
break;
|
|
case Phone.NT_MODE_WCDMA_ONLY:
|
|
+ if (!mIsGlobalCdma) {
|
|
+ mButtonEnabledNetworks.setSummary(R.string.network_3G_only);
|
|
+ } else {
|
|
+ mButtonEnabledNetworks.setSummary(R.string.network_global);
|
|
+ }
|
|
+ break;
|
|
case Phone.NT_MODE_GSM_UMTS:
|
|
case Phone.NT_MODE_WCDMA_PREF:
|
|
if (!mIsGlobalCdma) {
|
|
@@ -1644,11 +1653,25 @@ public class MobileNetworkSettings extends Activity {
|
|
controlGsmOptions(true);
|
|
break;
|
|
}
|
|
+ if (!mIsGlobalCdma) {
|
|
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
|
+ ? R.string.network_4G : R.string.network_lte);
|
|
+ } else {
|
|
+ mButtonEnabledNetworks.setSummary(R.string.network_global);
|
|
+ }
|
|
+ break;
|
|
case Phone.NT_MODE_LTE_ONLY:
|
|
+ if (!mIsGlobalCdma) {
|
|
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
|
+ ? R.string.network_4G_only : R.string.network_lte_only);
|
|
+ } else {
|
|
+ mButtonEnabledNetworks.setSummary(R.string.network_global);
|
|
+ }
|
|
+ break;
|
|
case Phone.NT_MODE_LTE_WCDMA:
|
|
if (!mIsGlobalCdma) {
|
|
mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
|
- ? R.string.network_4G : R.string.network_lte);
|
|
+ ? R.string.network_3G_4G_only : R.string.network_3G_lte_only);
|
|
} else {
|
|
mButtonEnabledNetworks.setSummary(R.string.network_global);
|
|
}
|