Renamed and moved InputWindow and related files
In preparation for the hierarchy listener interface, moved the InputWindow structs into libgui and have libinput dependant on libgui. Also renamed InputWindow to exclude Input since it will be used for more generic purposes. Test: Builds and flashes Bug: 188792659 Change-Id: Ib0a32c9920dc8110ceee4d6617ac030eb5cc0d99
This commit is contained in:
parent
ea7d2ef58f
commit
9d438f974a
@ -111,6 +111,7 @@ filegroup {
|
||||
":framework_native_aidl",
|
||||
":gatekeeper_aidl",
|
||||
":gsiservice_aidl",
|
||||
":guiconstants_aidl",
|
||||
":idmap2_aidl",
|
||||
":idmap2_core_aidl",
|
||||
":incidentcompanion_aidl",
|
||||
|
@ -18,8 +18,8 @@ package android.view;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.graphics.Region;
|
||||
import android.gui.TouchOcclusionMode;
|
||||
import android.os.IBinder;
|
||||
import android.os.TouchOcclusionMode;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
@ -230,6 +230,7 @@ cc_library_shared {
|
||||
"libbinderthreadstateutils",
|
||||
"libdmabufinfo",
|
||||
"libgif",
|
||||
"libgui_window_info_static",
|
||||
"libseccomp_policy",
|
||||
"libgrallocusage",
|
||||
"libscrypt_static",
|
||||
@ -370,6 +371,7 @@ cc_library_shared {
|
||||
"libinput",
|
||||
"libbinderthreadstateutils",
|
||||
"libsqlite",
|
||||
"libgui_window_info_static",
|
||||
],
|
||||
shared_libs: [
|
||||
// libbinder needs to be shared since it has global state
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <input/InputApplication.h>
|
||||
#include <gui/InputApplication.h>
|
||||
|
||||
#include <nativehelper/JNIHelp.h>
|
||||
#include "jni.h"
|
||||
|
@ -26,14 +26,17 @@
|
||||
#include <ui/Region.h>
|
||||
#include <utils/threads.h>
|
||||
|
||||
#include <gui/WindowInfo.h>
|
||||
#include "android_hardware_input_InputApplicationHandle.h"
|
||||
#include "android_util_Binder.h"
|
||||
#include "core_jni_helpers.h"
|
||||
#include "input/InputWindow.h"
|
||||
#include "jni.h"
|
||||
|
||||
namespace android {
|
||||
|
||||
using gui::TouchOcclusionMode;
|
||||
using gui::WindowInfo;
|
||||
|
||||
struct WeakRefHandleField {
|
||||
jfieldID ctrl;
|
||||
jmethodID get;
|
||||
@ -114,9 +117,9 @@ bool NativeInputWindowHandle::updateInfo() {
|
||||
|
||||
mInfo.name = getStringField(env, obj, gInputWindowHandleClassInfo.name, "<null>");
|
||||
|
||||
mInfo.flags = Flags<InputWindowInfo::Flag>(
|
||||
mInfo.flags = Flags<WindowInfo::Flag>(
|
||||
env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsFlags));
|
||||
mInfo.type = static_cast<InputWindowInfo::Type>(
|
||||
mInfo.type = static_cast<WindowInfo::Type>(
|
||||
env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsType));
|
||||
mInfo.dispatchingTimeout = std::chrono::milliseconds(
|
||||
env->GetLongField(obj, gInputWindowHandleClassInfo.dispatchingTimeoutMillis));
|
||||
@ -158,7 +161,7 @@ bool NativeInputWindowHandle::updateInfo() {
|
||||
mInfo.ownerUid = env->GetIntField(obj,
|
||||
gInputWindowHandleClassInfo.ownerUid);
|
||||
mInfo.packageName = getStringField(env, obj, gInputWindowHandleClassInfo.packageName, "<null>");
|
||||
mInfo.inputFeatures = static_cast<InputWindowInfo::Feature>(
|
||||
mInfo.inputFeatures = static_cast<WindowInfo::Feature>(
|
||||
env->GetIntField(obj, gInputWindowHandleClassInfo.inputFeatures));
|
||||
mInfo.displayId = env->GetIntField(obj,
|
||||
gInputWindowHandleClassInfo.displayId);
|
||||
|
@ -17,14 +17,14 @@
|
||||
#ifndef _ANDROID_VIEW_INPUT_WINDOW_HANDLE_H
|
||||
#define _ANDROID_VIEW_INPUT_WINDOW_HANDLE_H
|
||||
|
||||
#include <input/InputWindow.h>
|
||||
#include <gui/WindowInfo.h>
|
||||
|
||||
#include <nativehelper/JNIHelp.h>
|
||||
#include "jni.h"
|
||||
|
||||
namespace android {
|
||||
|
||||
class NativeInputWindowHandle : public InputWindowHandle {
|
||||
class NativeInputWindowHandle : public gui::WindowInfoHandle {
|
||||
public:
|
||||
NativeInputWindowHandle(jweak objWeak);
|
||||
virtual ~NativeInputWindowHandle();
|
||||
@ -37,7 +37,6 @@ private:
|
||||
jweak mObjWeak;
|
||||
};
|
||||
|
||||
|
||||
extern sp<NativeInputWindowHandle> android_view_InputWindowHandle_getHandle(
|
||||
JNIEnv* env, jobject inputWindowHandleObj);
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <android_runtime/AndroidRuntime.h>
|
||||
#include <android_runtime/Log.h>
|
||||
#include <attestation/HmacKeyManager.h>
|
||||
#include <gui/constants.h>
|
||||
#include <input/Input.h>
|
||||
#include <nativehelper/ScopedUtfChars.h>
|
||||
#include <utils/Log.h>
|
||||
@ -396,9 +397,9 @@ static jlong android_view_MotionEvent_nativeInitialize(
|
||||
flags, edgeFlags, metaState, buttonState,
|
||||
static_cast<MotionClassification>(classification), transform, xPrecision,
|
||||
yPrecision, AMOTION_EVENT_INVALID_CURSOR_POSITION,
|
||||
AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_DISPLAY_SIZE,
|
||||
AMOTION_EVENT_INVALID_DISPLAY_SIZE, downTimeNanos, eventTimeNanos,
|
||||
pointerCount, pointerProperties, rawPointerCoords);
|
||||
AMOTION_EVENT_INVALID_CURSOR_POSITION, INVALID_DISPLAY_SIZE,
|
||||
INVALID_DISPLAY_SIZE, downTimeNanos, eventTimeNanos, pointerCount,
|
||||
pointerProperties, rawPointerCoords);
|
||||
|
||||
return reinterpret_cast<jlong>(event.release());
|
||||
}
|
||||
|
@ -62,6 +62,8 @@
|
||||
|
||||
namespace android {
|
||||
|
||||
using gui::FocusRequest;
|
||||
|
||||
static void doThrowNPE(JNIEnv* env) {
|
||||
jniThrowNullPointerException(env, NULL);
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ java_library_static {
|
||||
":display-device-config",
|
||||
":display-layout-config",
|
||||
":device-state-config",
|
||||
":guiconstants_aidl",
|
||||
"java/com/android/server/EventLogTags.logtags",
|
||||
"java/com/android/server/am/EventLogTags.logtags",
|
||||
"java/com/android/server/wm/EventLogTags.logtags",
|
||||
|
@ -203,6 +203,7 @@ import android.graphics.PixelFormat;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Region;
|
||||
import android.gui.TouchOcclusionMode;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.Debug;
|
||||
@ -212,7 +213,6 @@ import android.os.PowerManager.WakeReason;
|
||||
import android.os.RemoteCallbackList;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.os.TouchOcclusionMode;
|
||||
import android.os.Trace;
|
||||
import android.os.WorkSource;
|
||||
import android.provider.Settings;
|
||||
|
Loading…
x
Reference in New Issue
Block a user