aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2019-11-17 15:15:11 +0100
committerBruno Martins <bgcngm@gmail.com>2019-11-23 13:10:42 +0000
commit8505f77f3600b52b224ee9dbaa0a79e2efd56d42 (patch)
treea4bb810804a8488b1c50b0f0a04ccff513cd3773
parent4eeac2c95bcf24165fb14a4358594912b9a12923 (diff)
downloadlineage-sdk-8505f77f3600b52b224ee9dbaa0a79e2efd56d42.tar.gz
lineage-sdk-8505f77f3600b52b224ee9dbaa0a79e2efd56d42.tar.bz2
lineage-sdk-8505f77f3600b52b224ee9dbaa0a79e2efd56d42.zip
sdk: Make phone a new compile target
* Moving SensitivePhoneNumbers to sdk got us significantly bigger zip packages due to libphonenumber being part of every package that is using org.lineageos.platform or org.lineageos.platform.internal * In order to correct this, move the "phone" folder to an own library that statically links libphonennumber and subsequentially make use of that package where needed Change-Id: I4effd7a9248290aeb23ab47ff8e30385dce4401a
-rw-r--r--Android.bp2
-rw-r--r--lib/Android.bp28
-rw-r--r--lib/src/java/org/lineageos/lib/phone/SensitivePhoneNumber.java (renamed from sdk/src/java/org/lineageos/internal/phone/SensitivePhoneNumber.java)2
-rw-r--r--lib/src/java/org/lineageos/lib/phone/SensitivePhoneNumbers.java (renamed from sdk/src/java/org/lineageos/internal/phone/SensitivePhoneNumbers.java)2
4 files changed, 30 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index 84831378..92b78198 100644
--- a/Android.bp
+++ b/Android.bp
@@ -78,7 +78,6 @@ java_library {
name: "org.lineageos.platform",
installable: true,
static_libs: [
- "libphonenumber",
"telephony-ext",
] + lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
@@ -107,7 +106,6 @@ java_library {
name: "org.lineageos.platform.internal",
required: ["services"],
static_libs: [
- "libphonenumber",
"telephony-ext",
] + lineage_sdk_LOCAL_STATIC_ANDROID_LIBRARIES + lineage_sdk_LOCAL_STATIC_JAVA_LIBRARIES,
diff --git a/lib/Android.bp b/lib/Android.bp
new file mode 100644
index 00000000..7e0695ce
--- /dev/null
+++ b/lib/Android.bp
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 2019 The LineageOS Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+lineage_sdk_lib_src = "src/java/org/lineageos/lib/"
+
+java_library_static {
+ name: "org.lineageos.lib.phone",
+ static_libs: [
+ "libphonenumber",
+ ],
+
+ srcs: [
+ lineage_sdk_lib_src + "/phone/*.java",
+ ],
+}
diff --git a/sdk/src/java/org/lineageos/internal/phone/SensitivePhoneNumber.java b/lib/src/java/org/lineageos/lib/phone/SensitivePhoneNumber.java
index ca27a579..60d2f88e 100644
--- a/sdk/src/java/org/lineageos/internal/phone/SensitivePhoneNumber.java
+++ b/lib/src/java/org/lineageos/lib/phone/SensitivePhoneNumber.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.lineageos.internal.phone;
+package org.lineageos.lib.phone;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/sdk/src/java/org/lineageos/internal/phone/SensitivePhoneNumbers.java b/lib/src/java/org/lineageos/lib/phone/SensitivePhoneNumbers.java
index a41801d8..b7827835 100644
--- a/sdk/src/java/org/lineageos/internal/phone/SensitivePhoneNumbers.java
+++ b/lib/src/java/org/lineageos/lib/phone/SensitivePhoneNumbers.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.lineageos.internal.phone;
+package org.lineageos.lib.phone;
import android.content.Context;
import android.os.Environment;