mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-23 14:39:24 -05:00
20.0: Switch to latest (prebuilt) OpenEUICC
Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
parent
1a0e13a70d
commit
268ae82d1e
@ -2,7 +2,6 @@
|
||||
<manifest>
|
||||
|
||||
<remote name="gitlab" fetch="https://gitlab.com/" />
|
||||
<remote name="angry" fetch="https://gitea.angry.im/" />
|
||||
|
||||
<!-- START OF UNNECESSARY REPO REMOVAL -->
|
||||
<remove-project name="LineageOS/android_external_ant-wireless_ant_native" />
|
||||
@ -51,10 +50,6 @@
|
||||
<!-- START OF ADDITIONAL REPOS -->
|
||||
<!-- GrapheneOS -->
|
||||
<project path="external/hardened_malloc" name="GrapheneOS/hardened_malloc" remote="github" revision="749640c274d54e084505a24fa758bcb5f96a25ef" />
|
||||
|
||||
<!-- OpenEUICC -->
|
||||
<project path="packages/apps/OpenEUICC" name="PeterCxy/OpenEUICC" remote="angry" revision="6add8c89ac141f177cd8d124a0a955232f4222f9" />
|
||||
<project path="prebuilts/openeuicc-deps" name="PeterCxy/android_prebuilts_openeuicc-deps" remote="angry" revision="55f3e2c7ab26484f7478b26540fa14392d0c2cd7" />
|
||||
<!-- END OF ADDITIONAL REPOS -->
|
||||
|
||||
<!-- START OF DEVICE REPOS -->
|
||||
|
@ -1,132 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 21 Aug 2023 08:07:40 -0400
|
||||
Subject: [PATCH] Hacky fix for misidentifying physical SIM
|
||||
|
||||
Signed-off-by: Tad <tad@spotco.us>
|
||||
---
|
||||
app/src/main/java/im/angry/openeuicc/core/EuiccChannel.kt | 4 +++-
|
||||
.../java/im/angry/openeuicc/core/EuiccChannelManager.kt | 7 ++++---
|
||||
.../java/im/angry/openeuicc/service/OpenEuiccService.kt | 3 ++-
|
||||
.../java/im/angry/openeuicc/ui/EuiccManagementFragment.kt | 4 ++--
|
||||
app/src/main/java/im/angry/openeuicc/ui/MainActivity.kt | 6 ++++--
|
||||
5 files changed, 15 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/app/src/main/java/im/angry/openeuicc/core/EuiccChannel.kt b/app/src/main/java/im/angry/openeuicc/core/EuiccChannel.kt
|
||||
index 53fd3c7..0067996 100644
|
||||
--- a/app/src/main/java/im/angry/openeuicc/core/EuiccChannel.kt
|
||||
+++ b/app/src/main/java/im/angry/openeuicc/core/EuiccChannel.kt
|
||||
@@ -8,7 +8,8 @@ data class EuiccChannelInfo(
|
||||
val cardId: Int,
|
||||
val name: String,
|
||||
val imei: String,
|
||||
- val removable: Boolean
|
||||
+ val removable: Boolean,
|
||||
+ val ignore: Boolean
|
||||
)
|
||||
|
||||
abstract class EuiccChannel(
|
||||
@@ -19,6 +20,7 @@ abstract class EuiccChannel(
|
||||
val name = info.name
|
||||
val imei = info.imei
|
||||
val removable = info.removable
|
||||
+ val ignore = info.ignore
|
||||
|
||||
abstract val lpa: LocalProfileAssistant
|
||||
abstract val valid: Boolean
|
||||
diff --git a/app/src/main/java/im/angry/openeuicc/core/EuiccChannelManager.kt b/app/src/main/java/im/angry/openeuicc/core/EuiccChannelManager.kt
|
||||
index c710c9d..4e709ae 100644
|
||||
--- a/app/src/main/java/im/angry/openeuicc/core/EuiccChannelManager.kt
|
||||
+++ b/app/src/main/java/im/angry/openeuicc/core/EuiccChannelManager.kt
|
||||
@@ -67,12 +67,13 @@ class EuiccChannelManager(private val context: Context) {
|
||||
uiccInfo.cardId,
|
||||
"SIM ${uiccInfo.slotIndex}",
|
||||
tm.getImei(uiccInfo.slotIndex) ?: return null,
|
||||
- uiccInfo.isRemovable
|
||||
+ uiccInfo.isRemovable,
|
||||
+ (uiccInfo.getEid() == null || uiccInfo.getEid().matches("^[0]+$".toRegex()))
|
||||
)
|
||||
|
||||
var euiccChannel: EuiccChannel? = null
|
||||
|
||||
- if (uiccInfo.isEuicc && !uiccInfo.isRemovable) {
|
||||
+ if (uiccInfo.isEuicc && !uiccInfo.isRemovable && !channelInfo.ignore) {
|
||||
Log.d(TAG, "Using TelephonyManager for slot ${uiccInfo.slotIndex}")
|
||||
// TODO: On Tiramisu, we should also connect all available "ports" for MEP support
|
||||
euiccChannel = TelephonyManagerChannel.tryConnect(tm, channelInfo)
|
||||
@@ -141,4 +142,4 @@ class EuiccChannelManager(private val context: Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/app/src/main/java/im/angry/openeuicc/service/OpenEuiccService.kt b/app/src/main/java/im/angry/openeuicc/service/OpenEuiccService.kt
|
||||
index eb41e7c..be94316 100644
|
||||
--- a/app/src/main/java/im/angry/openeuicc/service/OpenEuiccService.kt
|
||||
+++ b/app/src/main/java/im/angry/openeuicc/service/OpenEuiccService.kt
|
||||
@@ -58,6 +58,7 @@ class OpenEuiccService : EuiccService() {
|
||||
|
||||
override fun onGetEuiccProfileInfoList(slotId: Int): GetEuiccProfileInfoListResult? {
|
||||
val channel = findChannel(slotId) ?: return null
|
||||
+ if(findChannel(slotId)!!.ignore) { return null }
|
||||
val profiles = channel.lpa.profiles.operational.map {
|
||||
EuiccProfileInfo.Builder(it.iccid).apply {
|
||||
setProfileName(it.name)
|
||||
@@ -179,4 +180,4 @@ class OpenEuiccService : EuiccService() {
|
||||
// No-op -- we do not care
|
||||
return RESULT_FIRST_USER
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/app/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt b/app/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt
|
||||
index 6a3b253..e261cac 100644
|
||||
--- a/app/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt
|
||||
+++ b/app/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt
|
||||
@@ -80,7 +80,7 @@ class EuiccManagementFragment : Fragment(), EuiccFragmentMarker, EuiccProfilesCh
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
private fun refresh() {
|
||||
swipeRefresh.isRefreshing = true
|
||||
-
|
||||
+ if(channel!!.ignore) { return }
|
||||
lifecycleScope.launch {
|
||||
val profiles = withContext(Dispatchers.IO) {
|
||||
openEuiccApplication.subscriptionManager.tryRefreshCachedEuiccInfo(channel.cardId)
|
||||
@@ -221,4 +221,4 @@ class EuiccManagementFragment : Fragment(), EuiccFragmentMarker, EuiccProfilesCh
|
||||
|
||||
override fun getItemCount(): Int = profiles.size
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/app/src/main/java/im/angry/openeuicc/ui/MainActivity.kt b/app/src/main/java/im/angry/openeuicc/ui/MainActivity.kt
|
||||
index d0f7465..b286cde 100644
|
||||
--- a/app/src/main/java/im/angry/openeuicc/ui/MainActivity.kt
|
||||
+++ b/app/src/main/java/im/angry/openeuicc/ui/MainActivity.kt
|
||||
@@ -95,15 +95,17 @@ class MainActivity : AppCompatActivity() {
|
||||
manager.enumerateEuiccChannels()
|
||||
manager.knownChannels.forEach {
|
||||
Log.d(TAG, it.name)
|
||||
- Log.d(TAG, it.lpa.eid)
|
||||
+ //Log.d(TAG, it.lpa.eid)
|
||||
openEuiccApplication.subscriptionManager.tryRefreshCachedEuiccInfo(it.cardId)
|
||||
}
|
||||
}
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
manager.knownChannels.forEach { channel ->
|
||||
+ if(!channel!!.ignore) {
|
||||
spinnerAdapter.add(channel.name)
|
||||
fragments.add(EuiccManagementFragment.newInstance(channel.slotId))
|
||||
+ }
|
||||
}
|
||||
|
||||
if (fragments.isNotEmpty()) {
|
||||
@@ -112,4 +114,4 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
@ -1 +1 @@
|
||||
Subproject commit f59d65f6eeb20d58a65ccd4f4f353ed65d8c06d0
|
||||
Subproject commit 31ae5e5179470a9f593d64f27e2993267f38efc8
|
@ -51,7 +51,7 @@ cd "$DOS_BUILD_BASE";
|
||||
#top dir
|
||||
cp -r "$DOS_PREBUILT_APPS/Fennec_DOS-Shim" "$DOS_BUILD_BASE/packages/apps/"; #Add a shim to install Fennec DOS without actually including the large APK
|
||||
cp -r "$DOS_PREBUILT_APPS/SupportDivestOS" "$DOS_BUILD_BASE/packages/apps/"; #Add the Support app
|
||||
#cp -r "$DOS_PREBUILT_APPS/OpenEUICC" "$DOS_BUILD_BASE/packages/apps/"; #Add the OpenEUICC app
|
||||
cp -r "$DOS_PREBUILT_APPS/OpenEUICC" "$DOS_BUILD_BASE/packages/apps/"; #Add the OpenEUICC app
|
||||
gpgVerifyDirectory "$DOS_PREBUILT_APPS/android_vendor_FDroid_PrebuiltApps/packages";
|
||||
cp -r "$DOS_PREBUILT_APPS/android_vendor_FDroid_PrebuiltApps/." "$DOS_BUILD_BASE/vendor/fdroid_prebuilt/"; #Add the prebuilt apps
|
||||
cp -r "$DOS_PATCHES_COMMON/android_vendor_divested/." "$DOS_BUILD_BASE/vendor/divested/"; #Add our vendor files
|
||||
@ -322,10 +322,6 @@ if enterAndClear "packages/apps/Nfc"; then
|
||||
if [ "$DOS_GRAPHENE_CONSTIFY" = true ]; then applyPatch "$DOS_PATCHES/android_packages_apps_Nfc/0001-constify_JNINativeMethod.patch"; fi; #Constify JNINativeMethod tables (GrapheneOS)
|
||||
fi;
|
||||
|
||||
if enterAndClear "packages/apps/OpenEUICC"; then
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_OpenEUICC/0001-hacky-fix.patch"; #Hacky fix for misidentifying physical SIM (DivestOS)
|
||||
fi;
|
||||
|
||||
if enterAndClear "packages/apps/Settings"; then
|
||||
git revert --no-edit 41b4ed345a91da1dd46c00ee11a151c2b5ff4f43;
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0004-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch)
|
||||
|
Loading…
Reference in New Issue
Block a user