From 8b79748dbcc61823a11733c3acb037c3c6625a94 Mon Sep 17 00:00:00 2001 From: danielml Date: Sun, 16 Jun 2024 10:30:40 +0200 Subject: [PATCH] Provide a Java library with required Xiaomi telephony methods To make this jar available to all system APKs, load it as bootjar: ``` PRODUCT_PACKAGES += \ xiaomi-telephony-stub PRODUCT_BOOT_JARS += \ xiaomi-telephony-stub ``` Change-Id: I69006732e6f915dc2a5cd1a3262b7ccf37372986 --- telephony/Android.bp | 15 +++++++++++++++ .../android/telephony/TelephonyBaseUtilsStub.java | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 telephony/Android.bp create mode 100644 telephony/src/android/telephony/TelephonyBaseUtilsStub.java diff --git a/telephony/Android.bp b/telephony/Android.bp new file mode 100644 index 0000000..267284e --- /dev/null +++ b/telephony/Android.bp @@ -0,0 +1,15 @@ +// +// Copyright (C) 2024 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +java_library { + name: "xiaomi-telephony-stub", + provides_uses_lib: "xiaomi-telephony-stub", + installable: true, + sdk_version: "system_current", + srcs: [ + "src/**/*.java", + ], +} diff --git a/telephony/src/android/telephony/TelephonyBaseUtilsStub.java b/telephony/src/android/telephony/TelephonyBaseUtilsStub.java new file mode 100644 index 0000000..87887a1 --- /dev/null +++ b/telephony/src/android/telephony/TelephonyBaseUtilsStub.java @@ -0,0 +1,12 @@ +/* + * SPDX-FileCopyrightText: 2024 The LineageOS Project + * SPDX-License-Identifier: Apache-2.0 + */ + +package android.telephony; + +public class TelephonyBaseUtilsStub { + public static boolean isMiuiRom() { + return false; + } +}