OmniLib: Move utils packages into private api and the rest, public
Change-Id: Ic9fa3ae9ae9c741b86bcb0fd7a52658d8af6dcbd
diff --git a/Android.bp b/Android.bp
index 8942c9d..73fb6b6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -4,8 +4,9 @@
"SettingsLibDefaults",
"SettingsLib-search-defaults",
],
- platform_apis: true,
- srcs: ["src/**/*.java"],
+ srcs: [
+ "src/**/*.java",
+ ],
required: [
"privapp_whitelist_com.android.settings",
"settings-platform-compat-config",
@@ -16,3 +17,9 @@
],
resource_dirs: ["res"],
}
+
+android_library {
+ name: "OmniLibCore",
+ platform_apis: true,
+ srcs: ["core/**/*.java"],
+}
diff --git a/core/AndroidManifest.xml b/core/AndroidManifest.xml
new file mode 100644
index 0000000..5e3bcdd
--- /dev/null
+++ b/core/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Copyright (C) 2016 The OmniROM Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ package="org.omnirom.omnilibcore">
+
+</manifest>
diff --git a/src/org/omnirom/omnilib/utils/DeviceKeyHandler.java b/core/org/omnirom/omnilibcore/utils/DeviceKeyHandler.java
similarity index 98%
rename from src/org/omnirom/omnilib/utils/DeviceKeyHandler.java
rename to core/org/omnirom/omnilibcore/utils/DeviceKeyHandler.java
index 699ea76..39313ab 100644
--- a/src/org/omnirom/omnilib/utils/DeviceKeyHandler.java
+++ b/core/org/omnirom/omnilibcore/utils/DeviceKeyHandler.java
@@ -12,7 +12,7 @@
* governing permissions and limitations under the License.
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.content.Intent;
import android.hardware.SensorEvent;
diff --git a/src/org/omnirom/omnilib/utils/DeviceUtils.java b/core/org/omnirom/omnilibcore/utils/DeviceUtils.java
similarity index 98%
rename from src/org/omnirom/omnilib/utils/DeviceUtils.java
rename to core/org/omnirom/omnilibcore/utils/DeviceUtils.java
index 675b3e0..9ae10a8 100644
--- a/src/org/omnirom/omnilib/utils/DeviceUtils.java
+++ b/core/org/omnirom/omnilibcore/utils/DeviceUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
diff --git a/src/org/omnirom/omnilib/utils/OmniServiceLocator.java b/core/org/omnirom/omnilibcore/utils/OmniServiceLocator.java
similarity index 99%
rename from src/org/omnirom/omnilib/utils/OmniServiceLocator.java
rename to core/org/omnirom/omnilibcore/utils/OmniServiceLocator.java
index db1736d..5703910 100644
--- a/src/org/omnirom/omnilib/utils/OmniServiceLocator.java
+++ b/core/org/omnirom/omnilibcore/utils/OmniServiceLocator.java
@@ -16,7 +16,7 @@
*
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.content.Context;
import android.net.Uri;
diff --git a/src/org/omnirom/omnilib/utils/OmniUtils.java b/core/org/omnirom/omnilibcore/utils/OmniUtils.java
similarity index 99%
rename from src/org/omnirom/omnilib/utils/OmniUtils.java
rename to core/org/omnirom/omnilibcore/utils/OmniUtils.java
index 4057a0f..bac06cc 100644
--- a/src/org/omnirom/omnilib/utils/OmniUtils.java
+++ b/core/org/omnirom/omnilibcore/utils/OmniUtils.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.content.Context;
import android.content.Intent;
diff --git a/src/org/omnirom/omnilib/utils/OmniVibe.java b/core/org/omnirom/omnilibcore/utils/OmniVibe.java
similarity index 98%
rename from src/org/omnirom/omnilib/utils/OmniVibe.java
rename to core/org/omnirom/omnilibcore/utils/OmniVibe.java
index c57fe27..387e933 100644
--- a/src/org/omnirom/omnilib/utils/OmniVibe.java
+++ b/core/org/omnirom/omnilibcore/utils/OmniVibe.java
@@ -16,7 +16,7 @@
*
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.content.Context;
import android.media.AudioAttributes;
diff --git a/src/org/omnirom/omnilib/utils/PackageUtils.java b/core/org/omnirom/omnilibcore/utils/PackageUtils.java
similarity index 97%
rename from src/org/omnirom/omnilib/utils/PackageUtils.java
rename to core/org/omnirom/omnilibcore/utils/PackageUtils.java
index fb586a3..639dc1d 100644
--- a/src/org/omnirom/omnilib/utils/PackageUtils.java
+++ b/core/org/omnirom/omnilibcore/utils/PackageUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.content.Context;
import android.content.pm.PackageManager;
diff --git a/src/org/omnirom/omnilib/utils/SystemKeyEventHandler.java b/core/org/omnirom/omnilibcore/utils/SystemKeyEventHandler.java
similarity index 98%
rename from src/org/omnirom/omnilib/utils/SystemKeyEventHandler.java
rename to core/org/omnirom/omnilibcore/utils/SystemKeyEventHandler.java
index 2ba2bc0..71c2a2e 100644
--- a/src/org/omnirom/omnilib/utils/SystemKeyEventHandler.java
+++ b/core/org/omnirom/omnilibcore/utils/SystemKeyEventHandler.java
@@ -16,7 +16,7 @@
*
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.os.Handler;
import android.util.Log;
diff --git a/src/org/omnirom/omnilib/utils/TaskUtils.java b/core/org/omnirom/omnilibcore/utils/TaskUtils.java
similarity index 98%
rename from src/org/omnirom/omnilib/utils/TaskUtils.java
rename to core/org/omnirom/omnilibcore/utils/TaskUtils.java
index 66db0b8..aa57b44 100644
--- a/src/org/omnirom/omnilib/utils/TaskUtils.java
+++ b/core/org/omnirom/omnilibcore/utils/TaskUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.omnirom.omnilib.utils;
+package org.omnirom.omnilibcore.utils;
import android.app.Activity;
import android.app.ActivityOptions;