mirror of
https://github.com/oplus-giulia-dev/android_hardware_oplus
synced 2025-11-04 05:45:34 +08:00
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:
19
Euicc/Android.bp
Normal file
19
Euicc/Android.bp
Normal 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
20
Euicc/AndroidManifest.xml
Normal 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
3
Euicc/proguard.flags
Normal file
@@ -0,0 +1,3 @@
|
||||
-keep class org.lineageos.euicc.* {
|
||||
*;
|
||||
}
|
||||
1
Euicc/res/raw/esim_intro_illustration_lottie.json
Normal file
1
Euicc/res/raw/esim_intro_illustration_lottie.json
Normal file
File diff suppressed because one or more lines are too long
1
Euicc/res/raw/sim_illustration_lottie_bottom.json
Normal file
1
Euicc/res/raw/sim_illustration_lottie_bottom.json
Normal file
File diff suppressed because one or more lines are too long
9
Euicc/res/values/strings.xml
Normal file
9
Euicc/res/values/strings.xml
Normal 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>
|
||||
21
Euicc/src/org/lineageos/euicc/EuiccReceiver.kt
Normal file
21
Euicc/src/org/lineageos/euicc/EuiccReceiver.kt
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user