Add initial bits for the app manager
This commit is contained in:
parent
532bca4262
commit
3ee86c6d9d
8 changed files with 121 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
6
android/app_manager/.idea/vcs.xml
generated
Normal file
6
android/app_manager/.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
14
android/app_manager/Android.mk
Normal file
14
android/app_manager/Android.mk
Normal file
|
|
@ -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)
|
||||
14
android/app_manager/AndroidManifest.xml
Normal file
14
android/app_manager/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.anbox.app_manager">
|
||||
|
||||
<application
|
||||
android:name=".MainApplication">
|
||||
<service
|
||||
android:name=".AppManagerService"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
</service>
|
||||
</application>
|
||||
</manifest>
|
||||
3
android/app_manager/res/values/strings.xml
Normal file
3
android/app_manager/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">Anbox Application Manager</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.anbox.app_manager;
|
||||
|
||||
public class AppManagerService {
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.anbox.app_manager;
|
||||
|
||||
interface IAppManager {
|
||||
void launch(string name);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue