Compare commits
135 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d360415b3 | |||
|
|
fe4412bb0a | ||
| 4e809bad82 | |||
|
|
3a67714e73 | ||
|
|
7e3ba94d63 | ||
|
|
30213e2d7d | ||
|
|
ef8fe6b810 | ||
|
|
d0197cd72f | ||
|
|
2b53411014 | ||
|
|
d8cb024d17 | ||
|
|
67136ee52e | ||
|
|
7cd00758e3 | ||
|
|
547c534e78 | ||
|
|
d415ac0ee6 | ||
|
|
c6473358e2 | ||
|
|
b8724aa866 | ||
|
|
914817d98a | ||
|
|
f07d367656 | ||
|
|
89d6684342 | ||
|
|
190ae7f321 | ||
|
|
26c913ccf8 | ||
|
|
a0995b6e0a | ||
|
|
15f18a41a4 | ||
|
|
989b6ba659 | ||
|
|
9dd8c18207 | ||
|
|
a6b49ee233 | ||
|
|
632f3b911c | ||
|
|
1eba7d34b1 | ||
|
|
198ba59f78 | ||
|
|
f4ec6bf221 | ||
|
|
04e927cc2b | ||
|
|
2a0aa8bc2f | ||
|
|
7ae38ca1be | ||
|
|
ce36f84afa | ||
|
|
f0548bef78 | ||
|
|
71ce131ef7 | ||
|
|
5e83463f05 | ||
|
|
c5a2cb2eb0 | ||
|
|
4b0fdb9d0d | ||
|
|
1c66bbfeeb | ||
|
|
9e9b0fe2fa | ||
|
|
fb0c0864fa | ||
|
|
5c416f8e40 | ||
|
|
3513c6826a | ||
|
|
126f7853e0 | ||
|
|
7d6707f4c0 | ||
|
|
0cad8a424d | ||
|
|
6604548518 | ||
|
|
d8d3c133fb | ||
|
|
3edb8fe6e9 | ||
|
|
2c82644337 | ||
|
|
8738bcd8ae | ||
|
|
9f60507abc | ||
|
|
43a27ff0b8 | ||
|
|
c0a67cae2b | ||
|
|
db91ce039b | ||
|
|
9a1f70d171 | ||
|
|
824602c65f | ||
|
|
32308a2cc3 | ||
|
|
7aa2810650 | ||
|
|
c9363253e9 | ||
|
|
b5a8e6c32a | ||
|
|
464b1d35eb | ||
|
|
0c554081c2 | ||
|
|
9582ba05f9 | ||
|
|
81fa629d76 | ||
|
|
6f268cde54 | ||
|
|
ac5f626358 | ||
|
|
768b9a517e | ||
|
|
1bab687397 | ||
|
|
09a9918362 | ||
|
|
3e90c6d758 | ||
|
|
baeef85734 | ||
|
|
03e2ea4da3 | ||
|
|
d80f587aa0 | ||
|
|
105ddc3159 | ||
|
|
64d9d1da29 | ||
|
|
14641e5c16 | ||
|
|
8bbf9c4146 | ||
|
|
19793f68d5 | ||
|
|
881fa7ab5f | ||
|
|
f8ef7eae09 | ||
|
|
91123cb96a | ||
|
|
88ba34dba5 | ||
|
|
4add258572 | ||
|
|
507e831020 | ||
|
|
6788b965d2 | ||
|
|
55fecc58e7 | ||
|
|
f549d68095 | ||
|
|
1adb147c70 | ||
|
|
8e78ae9adb | ||
|
|
fe717b29aa | ||
|
|
34f36e2f7f | ||
|
|
b759d9e88b | ||
|
|
3216027fe1 | ||
|
|
af9087a995 | ||
|
|
80fe8c3c7d | ||
|
|
5c3146f7b0 | ||
|
|
b3a4339f74 | ||
|
|
593f97fade | ||
|
|
08742df8f6 | ||
|
|
410aa3511d | ||
|
|
144646e6ec | ||
|
|
ed88bdc5cc | ||
|
|
285eccf3de | ||
|
|
a5621a3541 | ||
|
|
e9f090f2a6 | ||
|
|
f362a930ea | ||
|
|
74306993ea | ||
|
|
bc1b861c9c | ||
|
|
244c88cb10 | ||
|
|
01689599c6 | ||
|
|
e67b5c7075 | ||
|
|
6044b3541f | ||
|
|
a73d6486f0 | ||
|
|
ed4caad386 | ||
|
|
d292aa03ba | ||
|
|
090d5f2b5c | ||
|
|
403ddc3d92 | ||
|
|
0eff57e0e6 | ||
|
|
95ad0c188e | ||
|
|
45a45e8eeb | ||
|
|
8dfc2b9662 | ||
|
|
481fb35dce | ||
|
|
471f49b51d | ||
|
|
bfbb9381b4 | ||
|
|
b4a2a6b744 | ||
|
|
77a47a0df2 | ||
|
|
88b4e237fc | ||
|
|
5e1bf232a7 | ||
|
|
eafb8b4a7e | ||
|
|
81bd03c42f | ||
|
|
93353b7fe4 | ||
|
|
e0ed208f22 | ||
|
|
3fc8912155 |
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (C) 2023 The LineageOS Project
|
||||
// Copyright (C) 2023-2025 The LineageOS Project
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -13,24 +13,16 @@ android_app {
|
||||
product_specific: true,
|
||||
certificate: "platform",
|
||||
privileged: true,
|
||||
privapp_allowlist: "org.lineageos.euicc.xml",
|
||||
|
||||
optimize: {
|
||||
proguard_flags_files: ["proguard.flags"],
|
||||
},
|
||||
required: [
|
||||
"org.lineageos.euicc.xml",
|
||||
"hidden-api-whitelist-org.lineageos.euicc.xml",
|
||||
],
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "org.lineageos.euicc.xml",
|
||||
relative_install_path: "permissions",
|
||||
filename: "org.lineageos.euicc.xml",
|
||||
src: "org.lineageos.euicc.xml",
|
||||
product_specific: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "hidden-api-whitelist-org.lineageos.euicc.xml",
|
||||
relative_install_path: "sysconfig",
|
||||
|
||||
@@ -1,9 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2023 The LineageOS Project
|
||||
SPDX-FileCopyrightText: 2023-2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="sim_illustration_lottie_mappings_json">{\"sim_illustration_lottie_mappings\":[{\"devices\":[\"OP591BL1\",\"OP5929L1\",\"OP594DL1\",\"OP595DL1\",\"OP5D0DL1\",\"OP5D55L1\"],\"illustration_lottie\":\"sim_illustration_lottie_bottom\"}]}</string>
|
||||
<string name="sim_slot_mappings_json">{\"sim-slot-mappings\":[{\"devices\":[\"OP594DL1\",\"OP595DL1\",\"OP5D55L1\"],\"esim-slot-ids\":[1],\"psim-slot-ids\":[0]},{\"devices\":[\"OP591BL1\",\"OP5929L1\",\"OP5D0DL1\"],\"esim-slot-ids\":[],\"psim-slot-ids\":[0,1]}]}</string>
|
||||
<string name="sim_illustration_lottie_mappings_json" translatable="false">
|
||||
{
|
||||
\"sim_illustration_lottie_mappings\": [
|
||||
{
|
||||
\"devices\": [
|
||||
\"OP591BL1\",
|
||||
\"OP5929L1\",
|
||||
\"OP594DL1\",
|
||||
\"OP595DL1\",
|
||||
\"OP5CF9L1\",
|
||||
\"OP5D0DL1\",
|
||||
\"OP5D35L1\",
|
||||
\"OP5D55L1\"
|
||||
],
|
||||
\"illustration_lottie\": \"sim_illustration_lottie_bottom\"
|
||||
}
|
||||
]
|
||||
}
|
||||
</string>
|
||||
<string name="sim_slot_mappings_json" translatable="false">
|
||||
{
|
||||
\"sim-slot-mappings\": [
|
||||
{
|
||||
\"devices\": [
|
||||
\"OP594DL1\",
|
||||
\"OP595DL1\",
|
||||
\"OP5D35L1\",
|
||||
\"OP5D55L1\"
|
||||
],
|
||||
\"esim-slot-ids\": [
|
||||
1
|
||||
],
|
||||
\"psim-slot-ids\": [
|
||||
0
|
||||
]
|
||||
},
|
||||
{
|
||||
\"devices\": [
|
||||
\"OP591BL1\",
|
||||
\"OP5929L1\",
|
||||
\"OP5CF9L1\",
|
||||
\"OP5D0DL1\"
|
||||
],
|
||||
\"esim-slot-ids\": [],
|
||||
\"psim-slot-ids\": [
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</string>
|
||||
</resources>
|
||||
|
||||
12
KeyHandler/res/values-ta/strings.xml
Normal file
12
KeyHandler/res/values-ta/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="alert_slider_top_position">முதற் நிலை</string>
|
||||
<string name="alert_slider_middle_position">நடு நிலை</string>
|
||||
<string name="alert_slider_bottom_position">கீழ் நிலை</string>
|
||||
<string name="alert_slider_mode_none">இல்லை</string>
|
||||
<string name="alert_slider_mode_silent">ஒலியின்மை</string>
|
||||
</resources>
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 The LineageOS Project
|
||||
SPDX-FileCopyrightText: 2021-2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:title="@string/alert_slider_category_title">
|
||||
|
||||
<SwitchPreference
|
||||
<SwitchPreferenceCompat
|
||||
android:key="config_mute_media"
|
||||
android:title="@string/alert_slider_mute_media_title"
|
||||
android:summary="@string/alert_slider_mute_media_summary"
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 The LineageOS Project
|
||||
* SPDX-FileCopyrightText: 2021-2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.lineageos.settings.device
|
||||
|
||||
import android.os.Bundle
|
||||
|
||||
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity
|
||||
|
||||
class ButtonSettingsActivity : CollapsingToolbarBaseActivity() {
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
fragmentManager.beginTransaction().replace(
|
||||
com.android.settingslib.collapsingtoolbar.R.id.content_frame,
|
||||
ButtonSettingsFragment()
|
||||
).commit()
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.replace(
|
||||
com.android.settingslib.collapsingtoolbar.R.id.content_frame,
|
||||
ButtonSettingsFragment(),
|
||||
TAG
|
||||
).commit()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ButtonSettingsActivity"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,15 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The LineageOS Project
|
||||
* SPDX-FileCopyrightText: 2021-2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.lineageos.settings.device
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import androidx.preference.PreferenceFragment
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
|
||||
class ButtonSettingsFragment : PreferenceFragment() {
|
||||
class ButtonSettingsFragment : PreferenceFragmentCompat() {
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
addPreferencesFromResource(R.xml.button_panel)
|
||||
activity.actionBar!!.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
override fun addPreferencesFromResource(preferencesResId: Int) {
|
||||
super.addPreferencesFromResource(preferencesResId)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.home -> {
|
||||
activity.finish()
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
setPreferencesFromResource(R.xml.button_panel, rootKey)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ android_app {
|
||||
|
||||
certificate: "platform",
|
||||
platform_apis: true,
|
||||
privileged: true,
|
||||
system_ext_specific: true,
|
||||
|
||||
optimize: {
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.lineageos.pen">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
|
||||
android:usesPermissionFlags="neverForLocation" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
-->
|
||||
<exceptions>
|
||||
<exception package="org.lineageos.pen">
|
||||
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false" />
|
||||
<permission name="android.permission.BLUETOOTH_CONNECT" fixed="false" />
|
||||
<permission name="android.permission.BLUETOOTH_SCAN" fixed="false" />
|
||||
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false" />
|
||||
|
||||
9
Pen/res/values-az/strings.xml
Normal file
9
Pen/res/values-az/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Qələm taxılıb</string>
|
||||
<string name="tap_to_connect">Bağlanmaq üçün toxunun</string>
|
||||
</resources>
|
||||
9
Pen/res/values-bg/strings.xml
Normal file
9
Pen/res/values-bg/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Дигитална писалка е сдвоена</string>
|
||||
<string name="tap_to_connect">Натисни за сдвояване</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ca/strings.xml
Normal file
9
Pen/res/values-ca/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Bolígraf adjunt</string>
|
||||
<string name="tap_to_connect">Toqueu per connectar</string>
|
||||
</resources>
|
||||
9
Pen/res/values-cs/strings.xml
Normal file
9
Pen/res/values-cs/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Pero připojeno</string>
|
||||
<string name="tap_to_connect">Klepnutím připojit</string>
|
||||
</resources>
|
||||
9
Pen/res/values-el/strings.xml
Normal file
9
Pen/res/values-el/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Η γραφίδα προσαρτήθηκε</string>
|
||||
<string name="tap_to_connect">Πατήστε για σύνδεση</string>
|
||||
</resources>
|
||||
9
Pen/res/values-en-rAU/strings.xml
Normal file
9
Pen/res/values-en-rAU/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Pen attached</string>
|
||||
<string name="tap_to_connect">Tap to connect</string>
|
||||
</resources>
|
||||
9
Pen/res/values-en-rCA/strings.xml
Normal file
9
Pen/res/values-en-rCA/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Pen attached</string>
|
||||
<string name="tap_to_connect">Tap to connect</string>
|
||||
</resources>
|
||||
9
Pen/res/values-en-rGB/strings.xml
Normal file
9
Pen/res/values-en-rGB/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Pen attached</string>
|
||||
<string name="tap_to_connect">Tap to connect</string>
|
||||
</resources>
|
||||
9
Pen/res/values-en-rIN/strings.xml
Normal file
9
Pen/res/values-en-rIN/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Pen attached</string>
|
||||
<string name="tap_to_connect">Tap to connect</string>
|
||||
</resources>
|
||||
9
Pen/res/values-es/strings.xml
Normal file
9
Pen/res/values-es/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Bolígrafo adjunto</string>
|
||||
<string name="tap_to_connect">Toca para conectar</string>
|
||||
</resources>
|
||||
9
Pen/res/values-fa/strings.xml
Normal file
9
Pen/res/values-fa/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">قلم متصل شد</string>
|
||||
<string name="tap_to_connect">برای اتصال ضربه بزنید</string>
|
||||
</resources>
|
||||
9
Pen/res/values-fr/strings.xml
Normal file
9
Pen/res/values-fr/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Stylo attaché</string>
|
||||
<string name="tap_to_connect">Appuyer pour connecter</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ga-rIE/strings.xml
Normal file
9
Pen/res/values-ga-rIE/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Peann ceangailte</string>
|
||||
<string name="tap_to_connect">Tapáil chun ceangal</string>
|
||||
</resources>
|
||||
9
Pen/res/values-hu/strings.xml
Normal file
9
Pen/res/values-hu/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Toll mellékelve</string>
|
||||
<string name="tap_to_connect">A csatlakoztatáshoz érintse meg</string>
|
||||
</resources>
|
||||
9
Pen/res/values-it/strings.xml
Normal file
9
Pen/res/values-it/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Penna attaccata</string>
|
||||
<string name="tap_to_connect">Tocca per connettere</string>
|
||||
</resources>
|
||||
9
Pen/res/values-iw/strings.xml
Normal file
9
Pen/res/values-iw/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">עט מצורף</string>
|
||||
<string name="tap_to_connect">נגיעה להתחברות</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ja/strings.xml
Normal file
9
Pen/res/values-ja/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">ペンを装着しました</string>
|
||||
<string name="tap_to_connect">タップして接続</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ka/strings.xml
Normal file
9
Pen/res/values-ka/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">კალამი მიუერთდა</string>
|
||||
<string name="tap_to_connect">შეეხეთ მიერთებისთვის</string>
|
||||
</resources>
|
||||
9
Pen/res/values-pl/strings.xml
Normal file
9
Pen/res/values-pl/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Dołączone pióro</string>
|
||||
<string name="tap_to_connect">Dotknij, aby połączyć</string>
|
||||
</resources>
|
||||
9
Pen/res/values-pt-rBR/strings.xml
Normal file
9
Pen/res/values-pt-rBR/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Caneta anexada</string>
|
||||
<string name="tap_to_connect">Toque para conectar</string>
|
||||
</resources>
|
||||
9
Pen/res/values-pt-rPT/strings.xml
Normal file
9
Pen/res/values-pt-rPT/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Caneta anexada</string>
|
||||
<string name="tap_to_connect">Toque para conectar</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ro/strings.xml
Normal file
9
Pen/res/values-ro/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Stilou atașat</string>
|
||||
<string name="tap_to_connect">Atingeți pentru a conecta</string>
|
||||
</resources>
|
||||
8
Pen/res/values-ru/strings.xml
Normal file
8
Pen/res/values-ru/strings.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="tap_to_connect">Нажмите, чтобы подключить</string>
|
||||
</resources>
|
||||
9
Pen/res/values-sl/strings.xml
Normal file
9
Pen/res/values-sl/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Pisalo priključeno</string>
|
||||
<string name="tap_to_connect">Tapnite za povezavo</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ta/strings.xml
Normal file
9
Pen/res/values-ta/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">எழுத்தாணி இணைக்கப்பட்டது</string>
|
||||
<string name="tap_to_connect">இணைக்கத் தட்டுக</string>
|
||||
</resources>
|
||||
9
Pen/res/values-ug/strings.xml
Normal file
9
Pen/res/values-ug/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">قەلەم ئۇلاندى</string>
|
||||
<string name="tap_to_connect">چېكىلسە باغلىنىدۇ</string>
|
||||
</resources>
|
||||
9
Pen/res/values-vi/strings.xml
Normal file
9
Pen/res/values-vi/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">Đã gắn bút</string>
|
||||
<string name="tap_to_connect">Chạm để kết nối</string>
|
||||
</resources>
|
||||
9
Pen/res/values-zh-rCN/strings.xml
Normal file
9
Pen/res/values-zh-rCN/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="pen_attached">笔已连接</string>
|
||||
<string name="tap_to_connect">轻触以连接</string>
|
||||
</resources>
|
||||
9
Pen/res/values/config.xml
Normal file
9
Pen/res/values/config.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<!-- Max supported refresh rate when using pen. -->
|
||||
<string name="config_penSupportedRefreshRate" translatable="false"></string>
|
||||
</resources>
|
||||
@@ -17,14 +17,24 @@ import android.bluetooth.le.ScanResult
|
||||
import android.bluetooth.le.ScanSettings
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.database.ContentObserver
|
||||
import android.hardware.input.InputManager
|
||||
import android.os.Handler
|
||||
import android.os.IBinder
|
||||
import android.os.UEventObserver
|
||||
import android.provider.Settings
|
||||
import android.provider.Settings.System.PEAK_REFRESH_RATE
|
||||
import android.util.Log
|
||||
|
||||
class PenService : Service() {
|
||||
private val bluetoothManager by lazy { getSystemService(BluetoothManager::class.java) }
|
||||
private val inputManager by lazy { getSystemService(InputManager::class.java) }
|
||||
private val notificationManager by lazy { getSystemService(NotificationManager::class.java) }
|
||||
|
||||
private val penSupportedRefreshRate by lazy { getString(R.string.config_penSupportedRefreshRate) }
|
||||
|
||||
private val handler by lazy { Handler(mainLooper) }
|
||||
|
||||
private val observer = object : UEventObserver() {
|
||||
private val lock = Any()
|
||||
|
||||
@@ -43,6 +53,30 @@ class PenService : Service() {
|
||||
}
|
||||
}
|
||||
|
||||
private val inputObserver = object : InputManager.InputDeviceListener {
|
||||
override fun onInputDeviceAdded(deviceId: Int) {
|
||||
overridePeakRefreshRateIfNeeded()
|
||||
}
|
||||
|
||||
override fun onInputDeviceRemoved(deviceId: Int) {
|
||||
overridePeakRefreshRateIfNeeded()
|
||||
}
|
||||
|
||||
override fun onInputDeviceChanged(deviceId: Int) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
private val peakRefreshRateSettingsObserver by lazy {
|
||||
object : ContentObserver(handler) {
|
||||
override fun onChange(selfChange: Boolean) {
|
||||
super.onChange(selfChange)
|
||||
|
||||
overridePeakRefreshRateIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
intent?.getStringExtra(EXTRA_PENCIL_ADDR)?.let {
|
||||
bondBtDevice(it)
|
||||
@@ -56,12 +90,28 @@ class PenService : Service() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
if (!penSupportedRefreshRate.isEmpty()) {
|
||||
contentResolver.registerContentObserver(
|
||||
Settings.System.getUriFor(PEAK_REFRESH_RATE),
|
||||
false,
|
||||
peakRefreshRateSettingsObserver
|
||||
)
|
||||
peakRefreshRateSettingsObserver.onChange(true)
|
||||
|
||||
inputManager.registerInputDeviceListener(inputObserver, handler)
|
||||
}
|
||||
|
||||
observer.startObserving("DEVPATH=/devices/virtual/oplus_wireless/pencil")
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
|
||||
if (!penSupportedRefreshRate.isEmpty()) {
|
||||
contentResolver.unregisterContentObserver(peakRefreshRateSettingsObserver)
|
||||
inputManager.unregisterInputDeviceListener(inputObserver)
|
||||
}
|
||||
|
||||
observer.stopObserving()
|
||||
}
|
||||
|
||||
@@ -69,8 +119,16 @@ class PenService : Service() {
|
||||
val adapter = bluetoothManager.adapter
|
||||
@Suppress("DEPRECATION") adapter.enable()
|
||||
|
||||
val scanner = adapter.bluetoothLeScanner
|
||||
scanner.startScan(
|
||||
val scanner = run {
|
||||
repeat(50) {
|
||||
adapter.bluetoothLeScanner?.let {
|
||||
return@run it
|
||||
}
|
||||
Thread.sleep(100)
|
||||
}
|
||||
return@run null
|
||||
}
|
||||
scanner?.startScan(
|
||||
listOf(ScanFilter.Builder().setDeviceAddress(pencilAddr).build()),
|
||||
ScanSettings.Builder()
|
||||
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
|
||||
@@ -97,6 +155,29 @@ class PenService : Service() {
|
||||
)
|
||||
}
|
||||
|
||||
private fun overridePeakRefreshRateIfNeeded() {
|
||||
val isPenConnected = inputManager.inputDeviceIds.firstOrNull {
|
||||
val device = inputManager.getInputDevice(it) ?: return@firstOrNull false
|
||||
if (device.vendorId != 0x22D9 && device.vendorId != 0x330A) {
|
||||
// Not an OPPO/Maxeye vendor ID
|
||||
return@firstOrNull false
|
||||
}
|
||||
if (device.bluetoothAddress?.startsWith("C0:87:06") == false &&
|
||||
device.bluetoothAddress?.startsWith("F8:6F:DE") == false) {
|
||||
// Not a Maxeye/Goodix MAC prefix
|
||||
return@firstOrNull false
|
||||
}
|
||||
return@firstOrNull true
|
||||
} != null
|
||||
val peakRefreshRate = Settings.System.getString(contentResolver, PEAK_REFRESH_RATE)
|
||||
|
||||
if (isPenConnected && peakRefreshRate == "Infinity") {
|
||||
Settings.System.putString(contentResolver, PEAK_REFRESH_RATE, penSupportedRefreshRate)
|
||||
} else if (!isPenConnected && peakRefreshRate == penSupportedRefreshRate) {
|
||||
Settings.System.putString(contentResolver, PEAK_REFRESH_RATE, "Infinity")
|
||||
}
|
||||
}
|
||||
|
||||
private fun postNotification(pencilAddr: String) {
|
||||
val adapter = bluetoothManager.adapter
|
||||
|
||||
|
||||
@@ -16,4 +16,3 @@
|
||||
| OPLUS_LINEAGE_TOUCH_HAL | USE_OPLUSTOUCH | Use and interface with stock OplusTouch | false |
|
||||
| OPLUS_LINEAGE_VIBRATOR_HAL | INCLUDE_DIR | Device specific include dir path | |
|
||||
| OPLUS_LINEAGE_VIBRATOR_HAL | USE_EFFECT_STREAM | Enable effect stream feature | false |
|
||||
| QTI_GPT_UTILS | USE_BSG_FRAMEWORK | Enable BSG framework feature | true |
|
||||
|
||||
@@ -19,7 +19,8 @@ AntiFlicker::AntiFlicker() : mOplusDisplayFd(open("/dev/oplus_display", O_RDWR))
|
||||
|
||||
ndk::ScopedAStatus AntiFlicker::getEnabled(bool* _aidl_return) {
|
||||
unsigned int value;
|
||||
if (ioctl(mOplusDisplayFd, PANEL_IOCTL_GET_PWM_TURBO, &value) != 0 &&
|
||||
if (ioctl(mOplusDisplayFd, PANEL_IOCTL_GET_PWM_PULSE, &value) != 0 &&
|
||||
ioctl(mOplusDisplayFd, PANEL_IOCTL_GET_PWM_TURBO, &value) != 0 &&
|
||||
ioctl(mOplusDisplayFd, PANEL_IOCTL_GET_DIMLAYER_BL_EN, &value) != 0) {
|
||||
LOG(ERROR) << "Failed to read current AntiFlicker state";
|
||||
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||
@@ -34,7 +35,8 @@ ndk::ScopedAStatus AntiFlicker::setEnabled(bool enabled) {
|
||||
return status;
|
||||
}
|
||||
unsigned int value = enabled;
|
||||
if (isEnabled != enabled && ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_PWM_TURBO, &value) != 0 &&
|
||||
if (isEnabled != enabled && ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_PWM_PULSE, &value) != 0 &&
|
||||
ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_PWM_TURBO, &value) != 0 &&
|
||||
ioctl(mOplusDisplayFd, PANEL_IOCTL_SET_DIMLAYER_BL_EN, &value) != 0) {
|
||||
LOG(ERROR) << "Failed to set AntiFlicker state";
|
||||
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
android:key="doze_enable"
|
||||
android:title="@string/ambient_display_enable_title" />
|
||||
|
||||
<SwitchPreference
|
||||
<SwitchPreferenceCompat
|
||||
android:key="always_on_display"
|
||||
android:disableDependentsState="true"
|
||||
android:title="@string/ambient_display_always_on_title"
|
||||
@@ -55,7 +55,7 @@
|
||||
android:key="proximity_sensor"
|
||||
android:title="@string/proximity_sensor_title">
|
||||
|
||||
<SwitchPreference
|
||||
<SwitchPreferenceCompat
|
||||
android:key="gesture_pocket"
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_pocket"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 The LineageOS Project
|
||||
* SPDX-FileCopyrightText: 2021-2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
@@ -11,18 +11,18 @@ import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.widget.CompoundButton
|
||||
import androidx.preference.*
|
||||
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceCategory
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import androidx.preference.SwitchPreferenceCompat
|
||||
import com.android.settingslib.widget.MainSwitchPreference
|
||||
|
||||
class DozeSettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChangeListener,
|
||||
CompoundButton.OnCheckedChangeListener {
|
||||
private lateinit var alwaysOnDisplayPreference: SwitchPreference
|
||||
private lateinit var switchBar: MainSwitchPreference
|
||||
class DozeSettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChangeListener {
|
||||
private lateinit var alwaysOnDisplayPreference: SwitchPreferenceCompat
|
||||
|
||||
private var pickUpPreference: ListPreference? = null
|
||||
private var pocketPreference: SwitchPreference? = null
|
||||
private var pocketPreference: SwitchPreferenceCompat? = null
|
||||
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
@@ -41,8 +41,8 @@ class DozeSettingsFragment : PreferenceFragmentCompat(), Preference.OnPreference
|
||||
}
|
||||
|
||||
val dozeEnabled = Utils.isDozeEnabled(requireContext())
|
||||
switchBar = findPreference(Utils.DOZE_ENABLE)!!
|
||||
switchBar.addOnSwitchChangeListener(this)
|
||||
val switchBar = findPreference<MainSwitchPreference>(Utils.DOZE_ENABLE)!!
|
||||
switchBar.onPreferenceChangeListener = this
|
||||
switchBar.isChecked = dozeEnabled
|
||||
|
||||
alwaysOnDisplayPreference = findPreference(Utils.ALWAYS_ON_DISPLAY)!!
|
||||
@@ -80,27 +80,29 @@ class DozeSettingsFragment : PreferenceFragmentCompat(), Preference.OnPreference
|
||||
}
|
||||
|
||||
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
|
||||
if (preference.key == Utils.ALWAYS_ON_DISPLAY) {
|
||||
Utils.enableAlwaysOn(requireContext(), newValue as Boolean)
|
||||
when (preference.key) {
|
||||
Utils.ALWAYS_ON_DISPLAY -> {
|
||||
val isChecked = newValue as Boolean
|
||||
Utils.enableAlwaysOn(requireContext(), isChecked)
|
||||
}
|
||||
Utils.DOZE_ENABLE -> {
|
||||
val isChecked = newValue as Boolean
|
||||
Utils.enableDoze(requireContext(), isChecked)
|
||||
Utils.checkDozeService(requireContext())
|
||||
|
||||
if (!isChecked) {
|
||||
Utils.enableAlwaysOn(requireContext(), false)
|
||||
alwaysOnDisplayPreference.isChecked = false
|
||||
}
|
||||
|
||||
alwaysOnDisplayPreference.isEnabled = isChecked
|
||||
pickUpPreference?.isEnabled = isChecked
|
||||
pocketPreference?.isEnabled = isChecked
|
||||
}
|
||||
}
|
||||
|
||||
handler.post { Utils.checkDozeService(requireContext()) }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
|
||||
Utils.enableDoze(requireContext(), isChecked)
|
||||
Utils.checkDozeService(requireContext())
|
||||
|
||||
switchBar.isChecked = isChecked
|
||||
|
||||
if (!isChecked) {
|
||||
Utils.enableAlwaysOn(requireContext(), false)
|
||||
alwaysOnDisplayPreference.isChecked = false
|
||||
}
|
||||
|
||||
alwaysOnDisplayPreference.isEnabled = isChecked
|
||||
pickUpPreference?.isEnabled = isChecked
|
||||
pocketPreference?.isEnabled = isChecked
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
30
eSimSwitcher/Android.bp
Normal file
30
eSimSwitcher/Android.bp
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
android_app {
|
||||
name: "OplusEsimSwitcher",
|
||||
defaults: ["SettingsLibDefaults"],
|
||||
|
||||
srcs: ["src/**/*.kt"],
|
||||
|
||||
resource_dirs: ["res"],
|
||||
|
||||
certificate: "platform",
|
||||
platform_apis: true,
|
||||
system_ext_specific: true,
|
||||
privileged: true,
|
||||
privapp_allowlist: "org.lineageos.settings.esimswitcher.xml",
|
||||
|
||||
static_libs: [
|
||||
"androidx.core_core",
|
||||
"androidx.preference_preference",
|
||||
"org.lineageos.settings.resources",
|
||||
"vendor.oplus.hardware.esim-V1-java",
|
||||
],
|
||||
|
||||
optimize: {
|
||||
proguard_flags_files: ["proguard.flags"],
|
||||
},
|
||||
}
|
||||
50
eSimSwitcher/AndroidManifest.xml
Normal file
50
eSimSwitcher/AndroidManifest.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.lineageos.settings.esimswitcher">
|
||||
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION" />
|
||||
|
||||
<application
|
||||
android:directBootAware="true"
|
||||
android:label="@string/device_settings_app_name"
|
||||
android:persistent="true"
|
||||
android:theme="@style/Theme.SubSettingsBase">
|
||||
|
||||
<activity
|
||||
android:exported="false"
|
||||
android:label="@string/esim_settings_title"
|
||||
android:name=".EsimSettingsActivity">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="com.android.settings.action.IA_SETTINGS" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data android:name="com.android.settings.category"
|
||||
android:value="com.android.settings.category.ia.wireless" />
|
||||
<meta-data android:name="com.android.settings.icon"
|
||||
android:resource="@drawable/ic_settings_esim" />
|
||||
<meta-data android:name="com.android.settings.icon_tintable"
|
||||
android:value="true" />
|
||||
<meta-data android:name="com.android.settings.order"
|
||||
android:value="-10" />
|
||||
<meta-data android:name="com.android.settings.profile"
|
||||
android:value="primary_profile_only" />
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
android:exported="true"
|
||||
android:name=".BootCompletedReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
6
eSimSwitcher/org.lineageos.settings.esimswitcher.xml
Normal file
6
eSimSwitcher/org.lineageos.settings.esimswitcher.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<permissions>
|
||||
<privapp-permissions package="org.lineageos.settings.esimswitcher">
|
||||
<permission name="android.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION"/>
|
||||
</privapp-permissions>
|
||||
</permissions>
|
||||
3
eSimSwitcher/proguard.flags
Normal file
3
eSimSwitcher/proguard.flags
Normal file
@@ -0,0 +1,3 @@
|
||||
-keep class org.lineageos.settings.esimswitcher.* {
|
||||
*;
|
||||
}
|
||||
10
eSimSwitcher/res/drawable/ic_settings_esim.xml
Normal file
10
eSimSwitcher/res/drawable/ic_settings_esim.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M480,680L640,520L584,464L520,526L520,360L440,360L440,526L376,464L320,520L480,680ZM240,880Q207,880 183.5,856.5Q160,833 160,800L160,320L400,80L720,80Q753,80 776.5,103.5Q800,127 800,160L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM240,800L720,800Q720,800 720,800Q720,800 720,800L720,160Q720,160 720,160Q720,160 720,160L434,160L240,354L240,800Q240,800 240,800Q240,800 240,800ZM240,800Q240,800 240,800Q240,800 240,800L240,800L434,800L720,800Q720,800 720,800Q720,800 720,800L720,800Q720,800 720,800Q720,800 720,800L240,800Z"/>
|
||||
</vector>
|
||||
13
eSimSwitcher/res/values-az/strings.xml
Normal file
13
eSimSwitcher/res/values-az/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM ayarları</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Virtual SIM kart istifadə etmək üçün operator profilini endirib aktivləşdirin</string>
|
||||
<string name="esim_toggle_dialog">eSIM-i fəallaşdırsanız, SIM 2 sıradan çıxarılacaq. Yenə də fəallaşdırılsın?</string>
|
||||
<string name="esim_toggle_dialog_cancel">İmtina</string>
|
||||
<string name="esim_toggle_dialog_ok">Fəallaşdır</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-bg/strings.xml
Normal file
13
eSimSwitcher/res/values-bg/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM настройки</string>
|
||||
<string name="esim_toggle_title">Дигитален SIM (eSIM)</string>
|
||||
<string name="esim_toggle_summary">Изтеглете и активирайте файл на оператор, за да използвате виртуална SIM карта</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 ще бъде спряна, ако включите eSIM. Включване въпреки това?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Отказ</string>
|
||||
<string name="esim_toggle_dialog_ok">Включване</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ca/strings.xml
Normal file
13
eSimSwitcher/res/values-ca/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Configuració eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Baixa i activa un perfil d\'operador per utilitzar una targeta SIM virtual</string>
|
||||
<string name="esim_toggle_dialog">La SIM 2 es desactivarà si activeu l\'eSIM. Voleu habilitar-la igualment?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancel·la</string>
|
||||
<string name="esim_toggle_dialog_ok">Habilita</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-en-rAU/strings.xml
Normal file
13
eSimSwitcher/res/values-en-rAU/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM settings</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Download and activate an operator profile to use a virtual SIM card</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 will be disabled if you enable eSIM. Enable it anyway?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancel</string>
|
||||
<string name="esim_toggle_dialog_ok">Enable</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-en-rCA/strings.xml
Normal file
13
eSimSwitcher/res/values-en-rCA/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM settings</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Download and activate an operator profile to use a virtual SIM card</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 will be disabled if you enable eSIM. Enable it anyway?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancel</string>
|
||||
<string name="esim_toggle_dialog_ok">Enable</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-en-rGB/strings.xml
Normal file
13
eSimSwitcher/res/values-en-rGB/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM settings</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Download and activate an operator profile to use a virtual SIM card</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 will be disabled if you enable eSIM. Enable it anyway?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancel</string>
|
||||
<string name="esim_toggle_dialog_ok">Enable</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-en-rIN/strings.xml
Normal file
13
eSimSwitcher/res/values-en-rIN/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM settings</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Download and activate an operator profile to use a virtual SIM card</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 will be disabled if you enable eSIM. Enable it anyway?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancel</string>
|
||||
<string name="esim_toggle_dialog_ok">Enable</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-fa/strings.xml
Normal file
13
eSimSwitcher/res/values-fa/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">تنظیمات سیمکارت مجازی</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">برای استفاده از سیمکارت مجازی، پیکربندی یک اپراتور را بارگیری و فعال کنید</string>
|
||||
<string name="esim_toggle_dialog">اگر سیم مجازی را فعال کنید سیمکارت دوم شما غیرفعال خواهد شد. آیا ادامه میدهید؟</string>
|
||||
<string name="esim_toggle_dialog_cancel">لغو</string>
|
||||
<string name="esim_toggle_dialog_ok">فعالسازی</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-fr/strings.xml
Normal file
13
eSimSwitcher/res/values-fr/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Paramètres eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Télécharger et activer un profil d\'opérateur pour utiliser une carte SIM virtuelle</string>
|
||||
<string name="esim_toggle_dialog">La carte SIM 2 sera désactivée si vous activez l\'eSIM. L\'activer quand même ?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Annuler</string>
|
||||
<string name="esim_toggle_dialog_ok">Activer</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ga-rIE/strings.xml
Normal file
13
eSimSwitcher/res/values-ga-rIE/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Socruithe eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Íoslódáil agus gníomhaigh próifíl oibreora chun cárta SIM fíorúil a úsáid</string>
|
||||
<string name="esim_toggle_dialog">Díchumasófar SIM 2 má chumasóidh tú eSIM. Ar mhaith leat é a chumasú ar aon nós?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cealaigh</string>
|
||||
<string name="esim_toggle_dialog_ok">Cumasaigh</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-hu/strings.xml
Normal file
13
eSimSwitcher/res/values-hu/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM-beállítások</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">A virtuális SIM használatához töltse le és aktiválja a kapott profilt</string>
|
||||
<string name="esim_toggle_dialog">A 2.SIM letiltásra kerül, ha engedélyezi az eSIM-et. Engedélyezi?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Mégsem</string>
|
||||
<string name="esim_toggle_dialog_ok">Engedélyezés</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-it/strings.xml
Normal file
13
eSimSwitcher/res/values-it/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Impostazioni eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Scarica e attiva un profilo operatore per utilizzare una SIM virtuale</string>
|
||||
<string name="esim_toggle_dialog">La SIM 2 sarà disabilitata se abiliti la eSIM. Abilitarla comunque?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Annulla</string>
|
||||
<string name="esim_toggle_dialog_ok">Abilita</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ja/strings.xml
Normal file
13
eSimSwitcher/res/values-ja/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM 設定</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">仮想 SIM カードを使用するには、オペレータプロファイルをダウンロードして有効化してください</string>
|
||||
<string name="esim_toggle_dialog">eSIM を有効にすると SIM2 は無効になります。それでも有効にしますか?</string>
|
||||
<string name="esim_toggle_dialog_cancel">キャンセル</string>
|
||||
<string name="esim_toggle_dialog_ok">有効化</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ka/strings.xml
Normal file
13
eSimSwitcher/res/values-ka/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM-პარამეტრები</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">ჩამოტვირთეთ და აამოქმედეთ მომწოდებლის პროფილი, რომ გამოიყენოთ წარმოსახვითი SIM-ბარათი</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 გაითიშება, თუ ჩაირთვება eSIM. მაინც გსურთ განაგრძოთ?</string>
|
||||
<string name="esim_toggle_dialog_cancel">გაუქმება</string>
|
||||
<string name="esim_toggle_dialog_ok">ჩართვა</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-pl/strings.xml
Normal file
13
eSimSwitcher/res/values-pl/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Ustawienia eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Pobierz i aktywuj profil operatora, aby używać wirtualnej karty SIM</string>
|
||||
<string name="esim_toggle_dialog">Karta SIM 2 zostanie wyłączona, jeśli włączysz kartę eSIM. Włączyć ją mimo to?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Anuluj</string>
|
||||
<string name="esim_toggle_dialog_ok">Włącz</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-pt-rBR/strings.xml
Normal file
13
eSimSwitcher/res/values-pt-rBR/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Configurações do eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Baixe e ative um perfil de operadora para usar um cartão SIM virtual</string>
|
||||
<string name="esim_toggle_dialog">O SIM 2 será desativado se você ativar o eSIM. Ativar mesmo assim?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancelar</string>
|
||||
<string name="esim_toggle_dialog_ok">Ativar</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-pt-rPT/strings.xml
Normal file
13
eSimSwitcher/res/values-pt-rPT/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Definições do eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Transferir e ativar um perfil de operador para usar um cartão SIM virtual</string>
|
||||
<string name="esim_toggle_dialog">O SIM 2 será desativado se ativar o eSIM. Ativar mesmo assim?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancelar</string>
|
||||
<string name="esim_toggle_dialog_ok">Ativar</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ro/strings.xml
Normal file
13
eSimSwitcher/res/values-ro/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Setări eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Descărcați și activați un profil de operator pentru a utiliza o cartelă SIM virtuală</string>
|
||||
<string name="esim_toggle_dialog">Cardul SIM 2 va fi dezactivat dacă activați eSIM. Îl activați oricum?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Anulare</string>
|
||||
<string name="esim_toggle_dialog_ok">Activează</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ru/strings.xml
Normal file
13
eSimSwitcher/res/values-ru/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Настройки eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Загрузите и активируйте профиль оператора для использования виртуальной SIM-карты</string>
|
||||
<string name="esim_toggle_dialog">SIM-карта 2 будет отключена, если вы включите eSIM. Включить ее в любом случае?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Отмена</string>
|
||||
<string name="esim_toggle_dialog_ok">Вкл.</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-sl/strings.xml
Normal file
13
eSimSwitcher/res/values-sl/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Nastavitve eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Prenesi in omogoči profil operaterja za uporabo navidezne kartice SIM</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 bo onemogočen, če omogočite eSIM. Omogoči vseeno?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Prekliči</string>
|
||||
<string name="esim_toggle_dialog_ok">Omogoči</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ta/strings.xml
Normal file
13
eSimSwitcher/res/values-ta/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM அமைப்புகள்</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">மெய்நிகர் செறிவு அட்டையைப் பயன்படுத்த, இயக்கித் தற்குறிப்பைப் பதிவிறக்கிச் செயற்படுத்துக</string>
|
||||
<string name="esim_toggle_dialog">நீர் eSIM ஐச் செயற்படுத்தினால், SIM 2 முடக்கப்படும். இருந்தாலும் செயற்படுத்தவா?</string>
|
||||
<string name="esim_toggle_dialog_cancel">விலக்குக</string>
|
||||
<string name="esim_toggle_dialog_ok">இயக்குக</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-ug/strings.xml
Normal file
13
eSimSwitcher/res/values-ug/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM تەڭشىكى</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">مەۋھۇم SIM كارتىنى ئىشلىتىش ئۈچۈن مەشغۇلاتچىنىڭ تەرجىمىھالىنى چۈشۈرۈپ ۋە ئاكتىپلايدۇ</string>
|
||||
<string name="esim_toggle_dialog">ئەگەر eSIM نى قوزغاتسىڭىز SIM 2 چەكلىنىدۇ. ئۇنى قوزغىتىۋېرەمسىز؟</string>
|
||||
<string name="esim_toggle_dialog_cancel">ۋاز كەچ</string>
|
||||
<string name="esim_toggle_dialog_ok">قوزغات</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-vi/strings.xml
Normal file
13
eSimSwitcher/res/values-vi/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">Cài đặt eSIM</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Tải và kích hoạt hồ sơ nhà mạng để sử dụng thẻ SIM ảo</string>
|
||||
<string name="esim_toggle_dialog">SIM 2 sẽ bị vô hiệu hoá nếu như bạn bật eSIM. Bạn vẫn muốn bật chứ?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Huỷ</string>
|
||||
<string name="esim_toggle_dialog_ok">Bật</string>
|
||||
</resources>
|
||||
13
eSimSwitcher/res/values-zh-rCN/strings.xml
Normal file
13
eSimSwitcher/res/values-zh-rCN/strings.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM 设置</string>
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">下载并激活运营商配置文件以使用虚拟 SIM 卡</string>
|
||||
<string name="esim_toggle_dialog">启用 eSIM 后,SIM 2 将被禁用。是否仍然启用 eSIM ?</string>
|
||||
<string name="esim_toggle_dialog_cancel">取消</string>
|
||||
<string name="esim_toggle_dialog_ok">启用</string>
|
||||
</resources>
|
||||
15
eSimSwitcher/res/values/strings.xml
Normal file
15
eSimSwitcher/res/values/strings.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="esim_settings_title">eSIM settings</string>
|
||||
|
||||
<string name="esim_toggle_title">eSIM</string>
|
||||
<string name="esim_toggle_summary">Download and activate an operator profile to use a virtual SIM card</string>
|
||||
|
||||
<string name="esim_toggle_dialog">SIM 2 will be disabled if you enable eSIM. Enable it anyway?</string>
|
||||
<string name="esim_toggle_dialog_cancel">Cancel</string>
|
||||
<string name="esim_toggle_dialog_ok">Enable</string>
|
||||
</resources>
|
||||
14
eSimSwitcher/res/xml/esim_settings.xml
Normal file
14
eSimSwitcher/res/xml/esim_settings.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:key="esim_toggle"
|
||||
android:title="@string/esim_toggle_title"
|
||||
android:summary="@string/esim_toggle_summary" />
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.lineageos.settings.esimswitcher
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.util.Log
|
||||
|
||||
class BootCompletedReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
Log.d(TAG, "Received boot completed intent")
|
||||
|
||||
val hasNonRemovableEuicc = context.resources.getIntArray(
|
||||
com.android.internal.R.array.non_removable_euicc_slots
|
||||
).isNotEmpty()
|
||||
|
||||
setComponentEnabled(context, EsimSettingsActivity::class.java.name, hasNonRemovableEuicc)
|
||||
}
|
||||
|
||||
private fun setComponentEnabled(context: Context, component: String, enabled: Boolean) {
|
||||
val name = ComponentName(context, component)
|
||||
val pm = context.packageManager
|
||||
val newState = if (enabled) {
|
||||
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
||||
} else {
|
||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED
|
||||
}
|
||||
|
||||
if (pm.getComponentEnabledSetting(name) != newState) {
|
||||
pm.setComponentEnabledSetting(name, newState, PackageManager.DONT_KILL_APP)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "OplusEsimBootReceiver"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.lineageos.settings.esimswitcher
|
||||
|
||||
import android.content.Context
|
||||
import android.os.ServiceManager
|
||||
import android.os.SystemProperties
|
||||
import android.se.omapi.Channel
|
||||
import android.se.omapi.Reader
|
||||
import android.se.omapi.SEService
|
||||
import android.se.omapi.Session
|
||||
import android.util.Log
|
||||
import kotlinx.coroutines.asExecutor
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import vendor.oplus.hardware.esim.IOplusEsim
|
||||
|
||||
class EsimController(private val context: Context) {
|
||||
private val hasSN220Chipset = SystemProperties.get(NFC_CONFIG_FILE_NAME_PROP).contains("SN220")
|
||||
|
||||
private val oplusEsimService by lazy {
|
||||
IOplusEsim.Stub.asInterface(ServiceManager.getService("${IOplusEsim.DESCRIPTOR}/default"))
|
||||
}
|
||||
|
||||
fun currentGpioState() = oplusEsimService?.esimGpio ?: 0
|
||||
|
||||
fun toggleEsimState(state: Int) {
|
||||
val gpioState = currentGpioState()
|
||||
Log.d(TAG, "Current eSIM status = $gpioState")
|
||||
|
||||
if (state == gpioState) {
|
||||
Log.d(TAG, "No need to change eSIM state")
|
||||
return
|
||||
}
|
||||
|
||||
oplusEsimService?.setUimPower(0)
|
||||
|
||||
if (hasSN220Chipset) {
|
||||
specialSetEsimGpio(if (gpioState == 0) 1 else 0)
|
||||
/* oplusEsimService?.setUimPower(1) done via SEService.OnConnectedListener */
|
||||
} else {
|
||||
oplusEsimService?.setEsimGpio(if (gpioState == 0) 1 else 0)
|
||||
oplusEsimService?.setUimPower(1)
|
||||
}
|
||||
}
|
||||
|
||||
private fun specialSetEsimGpio(state: Int) {
|
||||
var seService: SEService? = null
|
||||
|
||||
val listener = object : SEService.OnConnectedListener {
|
||||
override fun onConnected() {
|
||||
Log.d(TAG, "SEService connected")
|
||||
|
||||
val service = seService ?: return
|
||||
|
||||
try {
|
||||
val reader = service.readers.firstOrNull { it.name == "eSE1" }
|
||||
val session = reader?.openSession()
|
||||
val channel = session?.openLogicalChannel(null)
|
||||
|
||||
oplusEsimService?.setEsimGpio(state)
|
||||
oplusEsimService?.setUimPower(1)
|
||||
|
||||
channel?.close()
|
||||
session?.close()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to open eSE session", e)
|
||||
} finally {
|
||||
try {
|
||||
service.shutdown()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to shutdown SEService", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
seService = SEService(context, Dispatchers.IO.asExecutor(), listener)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to start SEService", e)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "OplusEsimController"
|
||||
|
||||
private const val NFC_CONFIG_FILE_NAME_PROP = "persist.vendor.nfc.config_file_name"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.lineageos.settings.esimswitcher
|
||||
|
||||
import android.os.Bundle
|
||||
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity
|
||||
|
||||
class EsimSettingsActivity : CollapsingToolbarBaseActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.replace(
|
||||
com.android.settingslib.collapsingtoolbar.R.id.content_frame,
|
||||
EsimSettingsFragment(),
|
||||
TAG
|
||||
).commit()
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "EsimSettingsActivity"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.lineageos.settings.esimswitcher
|
||||
|
||||
import android.app.AlertDialog
|
||||
import android.os.Bundle
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import androidx.preference.SwitchPreferenceCompat
|
||||
import org.lineageos.settings.esimswitcher.R
|
||||
|
||||
class EsimSettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChangeListener {
|
||||
private lateinit var controller: EsimController
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.esim_settings, rootKey)
|
||||
controller = EsimController(requireContext())
|
||||
|
||||
val switcher = findPreference<SwitchPreferenceCompat>(ESIM_TOGGLE_KEY)
|
||||
switcher?.isChecked = controller.currentGpioState() == 1
|
||||
switcher?.onPreferenceChangeListener = this
|
||||
}
|
||||
|
||||
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
|
||||
val enable = newValue as Boolean
|
||||
if (enable) {
|
||||
AlertDialog.Builder(requireContext())
|
||||
.setMessage(R.string.esim_toggle_dialog)
|
||||
.setNegativeButton(R.string.esim_toggle_dialog_cancel) { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
}
|
||||
.setPositiveButton(R.string.esim_toggle_dialog_ok) { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
controller.toggleEsimState(1)
|
||||
(preference as? SwitchPreferenceCompat)?.isChecked = true
|
||||
}
|
||||
.show()
|
||||
return false
|
||||
} else {
|
||||
controller.toggleEsimState(0)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val ESIM_TOGGLE_KEY = "esim_toggle"
|
||||
}
|
||||
}
|
||||
25
folio-daemon/Android.bp
Normal file
25
folio-daemon/Android.bp
Normal file
@@ -0,0 +1,25 @@
|
||||
cc_binary {
|
||||
name: "folio-daemon",
|
||||
|
||||
init_rc: ["folio_daemon.rc"],
|
||||
|
||||
shared_libs: [
|
||||
"libandroid",
|
||||
"libcutils",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
srcs: ["main.cpp"],
|
||||
|
||||
cflags: [
|
||||
"-DLOG_TAG=\"folio-daemon\"",
|
||||
"-DLOG_NDEBUG=0",
|
||||
] + [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
|
||||
owner: "google",
|
||||
|
||||
system_ext_specific: true,
|
||||
}
|
||||
11
folio-daemon/folio_daemon.rc
Normal file
11
folio-daemon/folio_daemon.rc
Normal file
@@ -0,0 +1,11 @@
|
||||
service folio-daemon /system_ext/bin/folio-daemon
|
||||
class late_start
|
||||
user system
|
||||
group system uhid
|
||||
disabled
|
||||
|
||||
on property:init.svc.zygote=running
|
||||
start folio-daemon
|
||||
|
||||
on property:init.svc.zygote=stopped
|
||||
stop folio-daemon
|
||||
161
folio-daemon/main.cpp
Normal file
161
folio-daemon/main.cpp
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017 The Android Open Source Project
|
||||
* SPDX-FileCopyrightText: 2023-2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <android/looper.h>
|
||||
#include <android/sensor.h>
|
||||
#include <cutils/log.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/uinput.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// Hall-effect sensor type
|
||||
#define SENSOR_TYPE 33171002
|
||||
|
||||
#define RETRY_LIMIT 120
|
||||
#define RETRY_PERIOD 30 // 30 seconds
|
||||
#define WARN_PERIOD (time_t)300 // 5 minutes
|
||||
|
||||
/*
|
||||
* This simple daemon listens for events from the Hall-effect sensor and writes
|
||||
* the appropriate SW_LID event to a uinput node. This allows the screen to be
|
||||
* locked with a magnetic folio case.
|
||||
*/
|
||||
int main(void) {
|
||||
int uinputFd;
|
||||
int err;
|
||||
struct uinput_user_dev uidev;
|
||||
ASensorManager* sensorManager = nullptr;
|
||||
ASensorRef hallSensor;
|
||||
ALooper* looper;
|
||||
ASensorEventQueue* eventQueue = nullptr;
|
||||
time_t lastWarn = 0;
|
||||
int attemptCount = 0;
|
||||
|
||||
ALOGI("Started");
|
||||
|
||||
uinputFd = TEMP_FAILURE_RETRY(open("/dev/uinput", O_WRONLY | O_NONBLOCK));
|
||||
if (uinputFd < 0) {
|
||||
ALOGE("Unable to open uinput node: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = TEMP_FAILURE_RETRY(ioctl(uinputFd, UI_SET_EVBIT, EV_SW)) |
|
||||
TEMP_FAILURE_RETRY(ioctl(uinputFd, UI_SET_EVBIT, EV_SYN)) |
|
||||
TEMP_FAILURE_RETRY(ioctl(uinputFd, UI_SET_SWBIT, SW_LID));
|
||||
if (err != 0) {
|
||||
ALOGE("Unable to enable SW_LID events: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
memset(&uidev, 0, sizeof(uidev));
|
||||
snprintf(uidev.name, UINPUT_MAX_NAME_SIZE, "uinput-folio");
|
||||
uidev.id.bustype = BUS_VIRTUAL;
|
||||
uidev.id.vendor = 0;
|
||||
uidev.id.product = 0;
|
||||
uidev.id.version = 0;
|
||||
|
||||
err = TEMP_FAILURE_RETRY(write(uinputFd, &uidev, sizeof(uidev)));
|
||||
if (err < 0) {
|
||||
ALOGE("Write user device to uinput node failed: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = TEMP_FAILURE_RETRY(ioctl(uinputFd, UI_DEV_CREATE));
|
||||
if (err < 0) {
|
||||
ALOGE("Unable to create uinput device: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
ALOGI("Successfully registered uinput-folio for SW_LID events");
|
||||
|
||||
// Get Hall-effect sensor events from the NDK
|
||||
sensorManager = ASensorManager_getInstanceForPackage(nullptr);
|
||||
looper = ALooper_forThread();
|
||||
if (looper == nullptr) {
|
||||
looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);
|
||||
}
|
||||
|
||||
eventQueue = ASensorManager_createEventQueue(sensorManager, looper, 0, NULL, NULL);
|
||||
|
||||
/*
|
||||
* As long as we are unable to get the sensor handle, periodically retry
|
||||
* and emit an error message at a low frequency to prevent high CPU usage
|
||||
* and log spam. If we simply exited with an error here, we would be
|
||||
* immediately restarted and fail in the same way indefinitely.
|
||||
*/
|
||||
while (true) {
|
||||
time_t now = time(NULL);
|
||||
hallSensor = ASensorManager_getDefaultSensorEx(sensorManager, SENSOR_TYPE, true);
|
||||
if (hallSensor != nullptr) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (++attemptCount >= RETRY_LIMIT) {
|
||||
ALOGE("Retries exhausted; exiting");
|
||||
goto out;
|
||||
} else if (now > lastWarn + WARN_PERIOD) {
|
||||
ALOGE("Unable to get Hall-effect sensor");
|
||||
lastWarn = now;
|
||||
}
|
||||
|
||||
sleep(RETRY_PERIOD);
|
||||
}
|
||||
|
||||
err = ASensorEventQueue_registerSensor(eventQueue, hallSensor, 0, 0);
|
||||
if (err < 0) {
|
||||
ALOGE("Unable to register for Hall-effect sensor events");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ALOGI("Starting polling loop");
|
||||
|
||||
// Polling loop
|
||||
while (ALooper_pollOnce(-1, NULL, NULL, NULL) > ALOOPER_POLL_TIMEOUT) {
|
||||
ASensorEvent sensorEvent;
|
||||
while (ASensorEventQueue_getEvents(eventQueue, &sensorEvent, 1) > 0) {
|
||||
// 0 means closed; 1 means open
|
||||
int isClosed = sensorEvent.data[0] > 0.0f ? 0 : 1;
|
||||
struct input_event event;
|
||||
event.type = EV_SW;
|
||||
event.code = SW_LID;
|
||||
event.value = isClosed;
|
||||
err = TEMP_FAILURE_RETRY(write(uinputFd, &event, sizeof(event)));
|
||||
if (err < 0) {
|
||||
ALOGE("Write EV_SW to uinput node failed: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
// Force a flush with an EV_SYN
|
||||
event.type = EV_SYN;
|
||||
event.code = SYN_REPORT;
|
||||
event.value = 0;
|
||||
err = TEMP_FAILURE_RETRY(write(uinputFd, &event, sizeof(event)));
|
||||
if (err < 0) {
|
||||
ALOGE("Write EV_SYN to uinput node failed: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
ALOGI("Sent lid %s event", isClosed ? "closed" : "open");
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
// Clean up
|
||||
if (sensorManager != nullptr && eventQueue != nullptr) {
|
||||
ASensorManager_destroyEventQueue(sensorManager, eventQueue);
|
||||
}
|
||||
|
||||
if (uinputFd >= 0) {
|
||||
close(uinputFd);
|
||||
}
|
||||
|
||||
// The loop can only be exited via failure or signal
|
||||
return 1;
|
||||
}
|
||||
@@ -102,6 +102,31 @@ aidl_interface {
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.displaypanelfeature",
|
||||
system_ext_specific: true,
|
||||
odm_available: true,
|
||||
local_include_dir: "aidl",
|
||||
srcs: ["aidl/vendor/oplus/hardware/displaypanelfeature/*.aidl"],
|
||||
stability: "vintf",
|
||||
owner: "oplus",
|
||||
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: true,
|
||||
},
|
||||
java: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
versions_with_info: [
|
||||
{
|
||||
version: "1",
|
||||
imports: [],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.esim",
|
||||
system_ext_specific: true,
|
||||
@@ -127,6 +152,39 @@ aidl_interface {
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.olc2",
|
||||
system_ext_specific: true,
|
||||
vendor_available: true,
|
||||
local_include_dir: "aidl",
|
||||
srcs: ["aidl/vendor/oplus/hardware/olc2/*.aidl"],
|
||||
stability: "vintf",
|
||||
owner: "oplus",
|
||||
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: true,
|
||||
},
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
},
|
||||
versions_with_info: [
|
||||
{
|
||||
version: "1",
|
||||
imports: [],
|
||||
},
|
||||
{
|
||||
version: "2",
|
||||
imports: [],
|
||||
},
|
||||
{
|
||||
version: "3",
|
||||
imports: [],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.osense.client",
|
||||
system_ext_specific: true,
|
||||
@@ -206,6 +264,39 @@ aidl_interface {
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.stability.oplus_project",
|
||||
system_ext_specific: true,
|
||||
vendor_available: true,
|
||||
local_include_dir: "aidl",
|
||||
srcs: ["aidl/vendor/oplus/hardware/stability/oplus_project/*.aidl"],
|
||||
stability: "vintf",
|
||||
owner: "oplus",
|
||||
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: true,
|
||||
},
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
},
|
||||
versions_with_info: [
|
||||
{
|
||||
version: "1",
|
||||
imports: [],
|
||||
},
|
||||
{
|
||||
version: "2",
|
||||
imports: [],
|
||||
},
|
||||
{
|
||||
version: "3",
|
||||
imports: [],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.touch",
|
||||
system_ext_specific: true,
|
||||
@@ -234,3 +325,33 @@ aidl_interface {
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "vendor.oplus.hardware.urcc",
|
||||
system_ext_specific: true,
|
||||
vendor_available: true,
|
||||
local_include_dir: "aidl",
|
||||
srcs: ["aidl/vendor/oplus/hardware/urcc/*.aidl"],
|
||||
stability: "vintf",
|
||||
owner: "oplus",
|
||||
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: true,
|
||||
},
|
||||
ndk: {
|
||||
gen_log: true,
|
||||
},
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
},
|
||||
versions_with_info: [
|
||||
{
|
||||
version: "1",
|
||||
imports: [],
|
||||
},
|
||||
|
||||
],
|
||||
frozen: true,
|
||||
}
|
||||
|
||||
13
interfaces/aidl/vendor/oplus/hardware/displaypanelfeature/IDisplayPanelFeature.aidl
vendored
Normal file
13
interfaces/aidl/vendor/oplus/hardware/displaypanelfeature/IDisplayPanelFeature.aidl
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.displaypanelfeature;
|
||||
|
||||
@VintfStability
|
||||
interface IDisplayPanelFeature {
|
||||
int getDisplayPanelFeatureValue(int featureId, inout int[] featureValues);
|
||||
int setDisplayPanelFeatureValue(int featureId, in int[] featureValues);
|
||||
int getDisplayPanelInfo(int featureId, out List<String> panelInfo);
|
||||
}
|
||||
16
interfaces/aidl/vendor/oplus/hardware/olc2/ExceptionInfo.aidl
vendored
Normal file
16
interfaces/aidl/vendor/oplus/hardware/olc2/ExceptionInfo.aidl
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
@VintfStability
|
||||
parcelable ExceptionInfo {
|
||||
long time;
|
||||
int exceptionId;
|
||||
int exceptionType;
|
||||
int level;
|
||||
long atomicLogs;
|
||||
String logParams;
|
||||
}
|
||||
13
interfaces/aidl/vendor/oplus/hardware/olc2/ExceptionRecord.aidl
vendored
Normal file
13
interfaces/aidl/vendor/oplus/hardware/olc2/ExceptionRecord.aidl
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
@VintfStability
|
||||
parcelable ExceptionRecord {
|
||||
int exception_id;
|
||||
int dropped;
|
||||
long expire;
|
||||
}
|
||||
14
interfaces/aidl/vendor/oplus/hardware/olc2/FileInfo.aidl
vendored
Normal file
14
interfaces/aidl/vendor/oplus/hardware/olc2/FileInfo.aidl
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
@VintfStability
|
||||
parcelable FileInfo {
|
||||
String path;
|
||||
int mode;
|
||||
long size;
|
||||
long mtime;
|
||||
}
|
||||
11
interfaces/aidl/vendor/oplus/hardware/olc2/IGaiaEventListener.aidl
vendored
Normal file
11
interfaces/aidl/vendor/oplus/hardware/olc2/IGaiaEventListener.aidl
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
@VintfStability
|
||||
interface IGaiaEventListener {
|
||||
void onGaiaEvent(in byte[] event);
|
||||
}
|
||||
34
interfaces/aidl/vendor/oplus/hardware/olc2/IOplusLogCore.aidl
vendored
Normal file
34
interfaces/aidl/vendor/oplus/hardware/olc2/IOplusLogCore.aidl
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
import android.os.ParcelFileDescriptor;
|
||||
|
||||
import vendor.oplus.hardware.olc2.ExceptionInfo;
|
||||
import vendor.oplus.hardware.olc2.FileInfo;
|
||||
import vendor.oplus.hardware.olc2.IGaiaEventListener;
|
||||
import vendor.oplus.hardware.olc2.IOplusLogCoreEventCallback;
|
||||
|
||||
@VintfStability
|
||||
interface IOplusLogCore {
|
||||
int enableExceptionMonitor(boolean enabled);
|
||||
int olcRaiseException(in ExceptionInfo exceptionInfo);
|
||||
int pullDroppedExceptions();
|
||||
|
||||
int registerEventCallback(IOplusLogCoreEventCallback callback);
|
||||
int unregisterEventCallback(IOplusLogCoreEventCallback callback);
|
||||
|
||||
boolean doShell(String command);
|
||||
boolean doShellBlocking(String command);
|
||||
|
||||
ParcelFileDescriptor getFileDescriptor(String path, int flags);
|
||||
FileInfo getFileInfo(String path);
|
||||
List<FileInfo> getFileInfoList(String path, boolean recursive);
|
||||
boolean removePath(String path);
|
||||
void registerGaiaEventListener(IGaiaEventListener listener);
|
||||
void unregisterGaiaEventListener(IGaiaEventListener listener);
|
||||
void sendGaiaEvent(in byte[] event);
|
||||
}
|
||||
15
interfaces/aidl/vendor/oplus/hardware/olc2/IOplusLogCoreEventCallback.aidl
vendored
Normal file
15
interfaces/aidl/vendor/oplus/hardware/olc2/IOplusLogCoreEventCallback.aidl
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
import vendor.oplus.hardware.olc2.ExceptionInfo;
|
||||
import vendor.oplus.hardware.olc2.ExceptionRecord;
|
||||
|
||||
@VintfStability
|
||||
interface IOplusLogCoreEventCallback {
|
||||
void onDroppedExceptions(in ExceptionRecord[] records);
|
||||
void onException(in ExceptionInfo exception);
|
||||
}
|
||||
14
interfaces/aidl/vendor/oplus/hardware/olc2/StatusCode.aidl
vendored
Normal file
14
interfaces/aidl/vendor/oplus/hardware/olc2/StatusCode.aidl
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum StatusCode {
|
||||
SUCCESS = 0,
|
||||
FAILURE_UNKNOWN = 1,
|
||||
FAILURE_ARGS_INVALID = 2,
|
||||
}
|
||||
51
interfaces/aidl/vendor/oplus/hardware/stability/oplus_project/IOplusProject.aidl
vendored
Normal file
51
interfaces/aidl/vendor/oplus/hardware/stability/oplus_project/IOplusProject.aidl
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.stability.oplus_project;
|
||||
|
||||
@VintfStability
|
||||
interface IOplusProject {
|
||||
int get_eng_version();
|
||||
String get_force_reboot();
|
||||
int get_ftmmode();
|
||||
String get_hungtask();
|
||||
String get_mt_gpio();
|
||||
String get_ocp();
|
||||
String get_opboot();
|
||||
int get_operator_name();
|
||||
String get_oplusocp_status(int pmic_id);
|
||||
String get_opluspoff_reason(int pmic_id);
|
||||
String get_opluspon_reason(int pmic_id);
|
||||
int get_pcb_version();
|
||||
String get_phoenix();
|
||||
String get_pmic_info();
|
||||
String get_poff_reason();
|
||||
String get_pon_reason();
|
||||
int get_project();
|
||||
int get_rf_type();
|
||||
int get_sau();
|
||||
String get_serial_ID();
|
||||
String get_shutdown_detect();
|
||||
boolean is_ufs_devices();
|
||||
String miscModule2Load();
|
||||
String miscModuleBlocklist();
|
||||
String miscReadLinkedModules();
|
||||
|
||||
int[] readAgingData(int type);
|
||||
String read_theia_node(int theia_node_id);
|
||||
|
||||
boolean saveAgingData(int type, in int[] saveAgingData, int length);
|
||||
|
||||
boolean set_opboot(String opboot);
|
||||
boolean set_phoenix(String monitoring_command);
|
||||
boolean set_shutdown_detect(String shutdown_detect_value);
|
||||
|
||||
boolean write_theia_node(int theia_node_id, String theia_data);
|
||||
|
||||
String get_dram_freq();
|
||||
|
||||
String read_op1_record_info();
|
||||
boolean write_op1_record_info(String op1_logs_data);
|
||||
}
|
||||
28
interfaces/aidl/vendor/oplus/hardware/urcc/IUrcc.aidl
vendored
Normal file
28
interfaces/aidl/vendor/oplus/hardware/urcc/IUrcc.aidl
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.urcc;
|
||||
|
||||
import vendor.oplus.hardware.urcc.IUrccCallback;
|
||||
import vendor.oplus.hardware.urcc.UrccRequestData;
|
||||
import vendor.oplus.hardware.urcc.UrccRequestParcel;
|
||||
|
||||
@VintfStability
|
||||
interface IUrcc {
|
||||
void urccInit();
|
||||
int urccResCtlRequest(in UrccRequestParcel mUrccRequestParcel);
|
||||
int urccResCtlRelease(int mhandle);
|
||||
UrccRequestData[] urccResStateRequest(in UrccRequestParcel mUrccRequestParcel);
|
||||
int urccResListeningRegister(in UrccRequestParcel mUrccRequestParcel, IUrccCallback urccCallback);
|
||||
int urccResListeningUnRegister(int mhandle);
|
||||
String urccPropertyGet(String name);
|
||||
int urccPropertySet(String name, String value);
|
||||
int urccThermalListeningRegister(in int[] types, IUrccCallback urccCallback);
|
||||
int urccThermalListeningUnRegister(int mhandle);
|
||||
int uahNotifyExt(int src, int type, in int[] args);
|
||||
int setRelatedSysInfo(int cmd, in byte[] info);
|
||||
int urccRuleCtl(int ruleId, int status, in UrccRequestData[] ruleData);
|
||||
void uahResCtlRequestBypass(in UrccRequestParcel mRequestParcel);
|
||||
}
|
||||
13
interfaces/aidl/vendor/oplus/hardware/urcc/IUrccCallback.aidl
vendored
Normal file
13
interfaces/aidl/vendor/oplus/hardware/urcc/IUrccCallback.aidl
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.urcc;
|
||||
|
||||
import vendor.oplus.hardware.urcc.UrccRequestData;
|
||||
|
||||
@VintfStability
|
||||
interface IUrccCallback {
|
||||
void onCallback(in UrccRequestData[] urccRequestDataArr);
|
||||
}
|
||||
15
interfaces/aidl/vendor/oplus/hardware/urcc/UrccRequestData.aidl
vendored
Normal file
15
interfaces/aidl/vendor/oplus/hardware/urcc/UrccRequestData.aidl
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.urcc;
|
||||
|
||||
@VintfStability
|
||||
parcelable UrccRequestData {
|
||||
String desc;
|
||||
String res_Path;
|
||||
String res_Value;
|
||||
int res_Id;
|
||||
int event_Id;
|
||||
}
|
||||
26
interfaces/aidl/vendor/oplus/hardware/urcc/UrccRequestParcel.aidl
vendored
Normal file
26
interfaces/aidl/vendor/oplus/hardware/urcc/UrccRequestParcel.aidl
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package vendor.oplus.hardware.urcc;
|
||||
|
||||
import vendor.oplus.hardware.urcc.IUrccCallback;
|
||||
import vendor.oplus.hardware.urcc.UrccRequestData;
|
||||
|
||||
@VintfStability
|
||||
parcelable UrccRequestParcel {
|
||||
String identity;
|
||||
String[] mParams;
|
||||
UrccRequestData[] mUrccRequestData;
|
||||
byte[] otherData;
|
||||
String pkgName;
|
||||
IUrccCallback urccCallback;
|
||||
int type;
|
||||
boolean screenoff_support;
|
||||
int prio;
|
||||
int callingPID;
|
||||
int callingUID;
|
||||
long duration;
|
||||
int handle;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
2a77fa43b874c191dea05b1585626a634d85ad6d
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.oplus.hardware.displaypanelfeature;
|
||||
@VintfStability
|
||||
interface IDisplayPanelFeature {
|
||||
int getDisplayPanelFeatureValue(int featureId, inout int[] featureValues);
|
||||
int setDisplayPanelFeatureValue(int featureId, in int[] featureValues);
|
||||
int getDisplayPanelInfo(int featureId, out List<String> panelInfo);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.oplus.hardware.displaypanelfeature;
|
||||
@VintfStability
|
||||
interface IDisplayPanelFeature {
|
||||
int getDisplayPanelFeatureValue(int featureId, inout int[] featureValues);
|
||||
int setDisplayPanelFeatureValue(int featureId, in int[] featureValues);
|
||||
int getDisplayPanelInfo(int featureId, out List<String> panelInfo);
|
||||
}
|
||||
1
interfaces/aidl_api/vendor.oplus.hardware.olc2/1/.hash
Normal file
1
interfaces/aidl_api/vendor.oplus.hardware.olc2/1/.hash
Normal file
@@ -0,0 +1 @@
|
||||
bb7fb312b7196dcfe210468e8f19730d2a44bc76
|
||||
32
interfaces/aidl_api/vendor.oplus.hardware.olc2/1/vendor/oplus/hardware/olc2/ExceptionInfo.aidl
vendored
Normal file
32
interfaces/aidl_api/vendor.oplus.hardware.olc2/1/vendor/oplus/hardware/olc2/ExceptionInfo.aidl
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package vendor.oplus.hardware.olc2;
|
||||
@VintfStability
|
||||
parcelable ExceptionInfo {
|
||||
long time;
|
||||
int exceptionId;
|
||||
int exceptionType;
|
||||
int level;
|
||||
long atomicLogs;
|
||||
String logParams;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user