2 * Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef ANBOX_ANDROID_ACTIVITY_MANAGER_INTERFACE_H_
19 #define ANBOX_ANDROID_ACTIVITY_MANAGER_INTERFACE_H_
21 #include <binder/IBinder.h>
22 #include <binder/IInterface.h>
23 #include <binder/Parcel.h>
25 #include <utils/String16.h>
26 #include <utils/StrongPointer.h>
30 #include "anbox/graphics/rect.h"
33 class IActivityManager : public IInterface {
35 DECLARE_META_INTERFACE(ActivityManager);
38 // This needs to stay synchronized with frameworks/base/core/java/android/app/IActivityManager.java
39 SET_FOCUSED_TASK = IBinder::FIRST_CALL_TRANSACTION + 130,
40 REMOVE_TASK = IBinder::FIRST_CALL_TRANSACTION + 131,
41 RESIZE_TASK = IBinder::FIRST_CALL_TRANSACTION + 285,
44 virtual status_t setFocusedTask(int32_t id) = 0;
45 virtual status_t removeTask(int32_t id) = 0;
46 virtual status_t resizeTask(int32_t id, const anbox::graphics::Rect &rect, int resize_mode) = 0;
49 class BpActivityManager : public BpInterface<IActivityManager> {
51 BpActivityManager(const sp<IBinder> &binder);
53 status_t setFocusedTask(int32_t id) override;
54 status_t removeTask(int32_t id) override;
55 status_t resizeTask(int32_t id, const anbox::graphics::Rect &rect, int resize_mode);
57 } // namespace android