X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fandroid%2Fservice%2Factivity_manager_interface.cpp;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fandroid%2Fservice%2Factivity_manager_interface.cpp;h=c749a4f0e075f192bc3469b39e27955fc4cb878c;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/android/service/activity_manager_interface.cpp b/src/type3_AndroidCloud/anbox-master/android/service/activity_manager_interface.cpp new file mode 100644 index 0000000..c749a4f --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/android/service/activity_manager_interface.cpp @@ -0,0 +1,54 @@ +/* + * 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 . + * + */ + +#define LOG_TAG "Anboxd" + +#include "android/service/activity_manager_interface.h" + +namespace android { +BpActivityManager::BpActivityManager(const sp &binder) : + BpInterface(binder) { +} + +status_t BpActivityManager::setFocusedTask(int32_t id) { + Parcel data, reply; + data.writeInterfaceToken(IActivityManager::getInterfaceDescriptor()); + data.writeInt32(id); + return remote()->transact(IActivityManager::SET_FOCUSED_TASK, data, &reply); +} + +status_t BpActivityManager::removeTask(int32_t id) { + Parcel data, reply; + data.writeInterfaceToken(IActivityManager::getInterfaceDescriptor()); + data.writeInt32(id); + return remote()->transact(IActivityManager::REMOVE_TASK, data, &reply); +} + +status_t BpActivityManager::resizeTask(int32_t id, const anbox::graphics::Rect &rect, int resize_mode) { + Parcel data, reply; + data.writeInterfaceToken(IActivityManager::getInterfaceDescriptor()); + data.writeInt32(id); + data.writeInt32(resize_mode); + data.writeInt32(rect.left()); + data.writeInt32(rect.top()); + data.writeInt32(rect.right()); + data.writeInt32(rect.bottom()); + return remote()->transact(IActivityManager::RESIZE_TASK, data, &reply); +} + +IMPLEMENT_META_INTERFACE(ActivityManager, "android.app.IActivityManager"); +} // namespace android