Introduce OplusEuicc

This is a companion app for EuiccGoogle (SIM Manager), that basically
sends over the mapping of the SIM slots and sets proper SIM tray
illustration (props to Yuri for the lottie animations).

For the time being it only includes the mappings for one of the
OnePlus 11 models (OP594DL1).

Change-Id: I09db5d6a9acbf05bf82803682572aeae54337c1b
This commit is contained in:
Bruno Martins
2023-07-18 00:31:08 +01:00
parent 4f26dde88b
commit f4b2b275c7
7 changed files with 74 additions and 0 deletions

19
Euicc/Android.bp Normal file
View File

@@ -0,0 +1,19 @@
//
// Copyright (C) 2023 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
android_app {
name: "OplusEuicc",
srcs: ["src/**/*.kt"],
resource_dirs: ["res"],
sdk_version: "current",
product_specific: true,
optimize: {
proguard_flags_files: ["proguard.flags"],
},
}

20
Euicc/AndroidManifest.xml Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.lineageos.euicc">
<application android:usesNonSdkApi="true">
<receiver
android:directBootAware="true"
android:exported="true"
android:name=".EuiccReceiver"
android:permission="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS">
<intent-filter>
<action android:name="com.google.android.euicc.action.PARTNER_CUSTOMIZATION"/>
</intent-filter>
</receiver>
</application>
</manifest>

3
Euicc/proguard.flags Normal file
View File

@@ -0,0 +1,3 @@
-keep class org.lineageos.euicc.* {
*;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="sim_illustration_lottie_mappings_json">{\"sim_illustration_lottie_mappings\":[{\"devices\":[\"OP594DL1\"],\"illustration_lottie\":\"sim_illustration_lottie_bottom\"}]}</string>
<string name="sim_slot_mappings_json">{\"sim-slot-mappings\":[{\"devices\":[\"OP594DL1\"],\"esim-slot-ids\":[1],\"psim-slot-ids\":[0]}]}</string>
</resources>

View File

@@ -0,0 +1,21 @@
/*
* Copyright (C) 2023 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
package org.lineageos.euicc
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
class EuiccReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
Log.d(TAG, "Received PARTNER_CUSTOMIZATION intent")
}
companion object {
private const val TAG = "OplusEuiccReceiver"
}
}