summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2020-02-04 17:36:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-02-04 17:36:46 +0000
commite4b3be6ad143185846ccdf08fc1b6c1bb5ad74a7 (patch)
tree73968e6742549a17c4c753f36235540575970d7f
parenta8281f8117c1d76620db3771a75ced2c6e65e3e2 (diff)
parentff51479f6f353be430c78dd61a15a4abecd01f99 (diff)
downloadAlternativeNetworkAccess-e4b3be6ad143185846ccdf08fc1b6c1bb5ad74a7.tar.gz
Merge "Revert "Split ONS into a client apk and a lib.""
-rw-r--r--Android.bp17
-rw-r--r--AndroidManifest.xml26
-rw-r--r--CleanSpec.mk1
-rw-r--r--client/Android.bp34
-rw-r--r--client/AndroidManifest.xml45
-rw-r--r--client/proguard.flags3
-rw-r--r--client/src/com/android/ons/OnsStub.java5
-rw-r--r--proguard.proguard7
-rw-r--r--tests/Android.bp2
-rw-r--r--tests/AndroidManifest.xml2
10 files changed, 31 insertions, 111 deletions
diff --git a/Android.bp b/Android.bp
index fc81278..456d5b4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//
+// Mms service
+//
android_app {
- name: "ONSLib",
+ name: "ONS",
platform_apis: true,
privileged: true,
libs: [
@@ -21,17 +24,9 @@ android_app {
"app-compat-annotations",
],
srcs: ["src/**/*.java"],
- aaptflags: [
- "--auto-add-overlay",
- "--shared-lib",
- "--extra-packages com.android.ons",
- ],
+ aaptflags: ["--auto-add-overlay"],
certificate: "platform",
optimize: {
- proguard_flags_files: [
- "proguard.flags",
- "proguard.proguard",
- ],
+ proguard_flags_files: ["proguard.flags"],
},
- export_package_resources: true,
}
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c9e7bc7..92fd67d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -15,10 +15,28 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.ons.lib">
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ package="com.android.ons"
+ coreApp="true"
+ android:process="com.android.phone"
+ android:sharedUserId="android.uid.phone">
- <application>
- <library android:name="com.android.ons.lib" />
- </application>
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <application
+ android:process="com.android.phone"
+ android:persistent="true">
+
+ <receiver android:name="ONSAutoBoot"
+ android:directBootAware="true">
+ <intent-filter>
+ <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
+ </intent-filter>
+ </receiver>
+ <service android:name=".OpportunisticNetworkService"
+ android:enabled="true"
+ android:exported="true"
+ android:directBootAware="true"/>
+
+ </application>
</manifest>
diff --git a/CleanSpec.mk b/CleanSpec.mk
index fbabcab..c21bc41 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -48,6 +48,7 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/ANS_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/ANS)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ANS_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/ONSLib)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/client/Android.bp b/client/Android.bp
deleted file mode 100644
index 5c56e3d..0000000
--- a/client/Android.bp
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2018 The Android Open Source 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.
-
-android_app {
- name: "ONS",
- platform_apis: true,
- privileged: true,
- libs: [
- "telephony-common",
- "ONSLib",
- ],
- srcs: [
- "src/**/*.java",
- ],
- required: ["ONSLib"],
- certificate: "platform",
-
- optimize: {
- proguard_flags_files: [
- "proguard.flags",
- ],
- },
-}
diff --git a/client/AndroidManifest.xml b/client/AndroidManifest.xml
deleted file mode 100644
index 69cc55d..0000000
--- a/client/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2018 The Android Open Source 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- package="com.android.ons"
- coreApp="true"
- android:process="com.android.phone"
- android:sharedUserId="android.uid.phone">
-
- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
- <application
- android:process="com.android.phone"
- android:directBootAware="true"
- android:persistent="true">
-
- <uses-library android:name="com.android.ons.lib" />
-
- <receiver android:name="ONSAutoBoot"
- android:directBootAware="true">
- <intent-filter>
- <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
- </intent-filter>
- </receiver>
-
- <service android:name=".OpportunisticNetworkService"
- android:enabled="true"
- android:exported="true"
- android:directBootAware="true"/>
-
- </application>
-</manifest>
diff --git a/client/proguard.flags b/client/proguard.flags
deleted file mode 100644
index 915ae2c..0000000
--- a/client/proguard.flags
+++ /dev/null
@@ -1,3 +0,0 @@
-# Keep the stub class
--keep class com.android.ons.OnsStub {*;}
--verbose
diff --git a/client/src/com/android/ons/OnsStub.java b/client/src/com/android/ons/OnsStub.java
deleted file mode 100644
index ddc8289..0000000
--- a/client/src/com/android/ons/OnsStub.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.android.ons;
-
-public class OnsStub {
- // Empty class
-}
diff --git a/proguard.proguard b/proguard.proguard
deleted file mode 100644
index 2a823d8..0000000
--- a/proguard.proguard
+++ /dev/null
@@ -1,7 +0,0 @@
--keepparameternames
--keepattributes Exceptions,InnerClasses,Signature,Deprecated,
- SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
-
--keep public class * {
- public protected *;
-} \ No newline at end of file
diff --git a/tests/Android.bp b/tests/Android.bp
index 180d925..a38bbf8 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -28,6 +28,6 @@ android_test {
],
platform_apis: true,
certificate: "platform",
- instrumentation_for: "ONSLib",
+ instrumentation_for: "ONS",
test_suites: ["device-tests"],
}
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 1dcb8a9..fb35b0b 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -26,7 +26,7 @@
</application>
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
- android:targetPackage="com.android.ons.lib"
+ android:targetPackage="com.android.ons"
android:label="Tests for ONS">
</instrumentation>
</manifest>