diff --git a/Android.mk b/Android.mk index f8d9d1e..38fc1b4 100644 --- a/Android.mk +++ b/Android.mk @@ -85,3 +85,9 @@ LOCAL_MODULE := hwcomposer.anbox LOCAL_CFLAGS:= -DLOG_TAG=\"hwcomposer\" LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) + +# Include the Android.mk files below will override LOCAL_PATH so we +# have to take a copy of it here. +TMP_PATH := $(LOCAL_PATH) + +include $(TMP_PATH)/android/app_manager/Android.mk diff --git a/android/app_manager/.idea/vcs.xml b/android/app_manager/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/android/app_manager/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/android/app_manager/Android.mk b/android/app_manager/Android.mk new file mode 100644 index 0000000..e102003 --- /dev/null +++ b/android/app_manager/Android.mk @@ -0,0 +1,14 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(call all-java-files-under, src) +LOCAL_PACKAGE_NAME := AnboxAppManager +LOCAL_CERTIFICATE := platform +LOCAL_PRIVILEGED_MODULE := true +LOCAL_OVERRIDES_PACKAGES := \ + Home \ + Launcher2 \ + Launcher3 \ + SystemUI +include $(BUILD_PACKAGE) diff --git a/android/app_manager/AndroidManifest.xml b/android/app_manager/AndroidManifest.xml new file mode 100644 index 0000000..db222a5 --- /dev/null +++ b/android/app_manager/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/android/app_manager/res/values/strings.xml b/android/app_manager/res/values/strings.xml new file mode 100644 index 0000000..8926490 --- /dev/null +++ b/android/app_manager/res/values/strings.xml @@ -0,0 +1,3 @@ + + Anbox Application Manager + diff --git a/android/app_manager/src/org/anbox/app_manager/AppManagerService.java b/android/app_manager/src/org/anbox/app_manager/AppManagerService.java new file mode 100644 index 0000000..df500dd --- /dev/null +++ b/android/app_manager/src/org/anbox/app_manager/AppManagerService.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2016 Simon Fels + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . + * + */ + +package org.anbox.app_manager; + +public class AppManagerService { +} diff --git a/android/app_manager/src/org/anbox/app_manager/IAppManager.aidl b/android/app_manager/src/org/anbox/app_manager/IAppManager.aidl new file mode 100644 index 0000000..04fd299 --- /dev/null +++ b/android/app_manager/src/org/anbox/app_manager/IAppManager.aidl @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2016 Simon Fels + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . + * + */ + +package org.anbox.app_manager; + +interface IAppManager { + void launch(string name); +} diff --git a/android/app_manager/src/org/anbox/app_manager/MainApplication.java b/android/app_manager/src/org/anbox/app_manager/MainApplication.java new file mode 100644 index 0000000..ca0f6b3 --- /dev/null +++ b/android/app_manager/src/org/anbox/app_manager/MainApplication.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2016 Simon Fels + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, 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 . + * + */ + +package org.anbox.app_manager; + +import java.lang.reflect.Method; + +import android.app.Application; +import android.os.IBinder; + +public class MainApplication extends Application { + public void startServices() { + Method addService; + try { + addService = Class.forName("android.os.ServiceManager").getMethod("addService", String.class, IBinder.class); + } + catch (Exception e) { + e.printStackTrace(); + } + } +} \ No newline at end of file