Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fb6fd95 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

Merge "Renamed and moved InputWindow and related files" into sc-v2-dev am: d5e75752

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14664164

Change-Id: Id5e9d8b769d6ab60da740f00f2fa99849011391c
parents cbe6fc0e d5e75752
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -112,6 +112,7 @@ filegroup {
        ":framework_native_aidl",
        ":framework_native_aidl",
        ":gatekeeper_aidl",
        ":gatekeeper_aidl",
        ":gsiservice_aidl",
        ":gsiservice_aidl",
        ":guiconstants_aidl",
        ":idmap2_aidl",
        ":idmap2_aidl",
        ":idmap2_core_aidl",
        ":idmap2_core_aidl",
        ":incidentcompanion_aidl",
        ":incidentcompanion_aidl",
+1 −1
Original line number Original line Diff line number Diff line
@@ -20,8 +20,8 @@ import static android.view.Display.INVALID_DISPLAY;


import android.annotation.Nullable;
import android.annotation.Nullable;
import android.graphics.Region;
import android.graphics.Region;
import android.gui.TouchOcclusionMode;
import android.os.IBinder;
import android.os.IBinder;
import android.os.TouchOcclusionMode;


import java.lang.ref.WeakReference;
import java.lang.ref.WeakReference;


+2 −0
Original line number Original line Diff line number Diff line
@@ -230,6 +230,7 @@ cc_library_shared {
                "libbinderthreadstateutils",
                "libbinderthreadstateutils",
                "libdmabufinfo",
                "libdmabufinfo",
                "libgif",
                "libgif",
                "libgui_window_info_static",
                "libseccomp_policy",
                "libseccomp_policy",
                "libgrallocusage",
                "libgrallocusage",
                "libscrypt_static",
                "libscrypt_static",
@@ -370,6 +371,7 @@ cc_library_shared {
                "libinput",
                "libinput",
                "libbinderthreadstateutils",
                "libbinderthreadstateutils",
                "libsqlite",
                "libsqlite",
                "libgui_window_info_static",
            ],
            ],
            shared_libs: [
            shared_libs: [
                // libbinder needs to be shared since it has global state
                // libbinder needs to be shared since it has global state
+1 −1
Original line number Original line Diff line number Diff line
@@ -19,7 +19,7 @@


#include <string>
#include <string>


#include <input/InputApplication.h>
#include <gui/InputApplication.h>


#include <nativehelper/JNIHelp.h>
#include <nativehelper/JNIHelp.h>
#include "jni.h"
#include "jni.h"
+7 −4
Original line number Original line Diff line number Diff line
@@ -26,14 +26,17 @@
#include <ui/Region.h>
#include <ui/Region.h>
#include <utils/threads.h>
#include <utils/threads.h>


#include <gui/WindowInfo.h>
#include "android_hardware_input_InputApplicationHandle.h"
#include "android_hardware_input_InputApplicationHandle.h"
#include "android_util_Binder.h"
#include "android_util_Binder.h"
#include "core_jni_helpers.h"
#include "core_jni_helpers.h"
#include "input/InputWindow.h"
#include "jni.h"
#include "jni.h"


namespace android {
namespace android {


using gui::TouchOcclusionMode;
using gui::WindowInfo;

struct WeakRefHandleField {
struct WeakRefHandleField {
    jfieldID ctrl;
    jfieldID ctrl;
    jmethodID get;
    jmethodID get;
@@ -115,9 +118,9 @@ bool NativeInputWindowHandle::updateInfo() {


    mInfo.name = getStringField(env, obj, gInputWindowHandleClassInfo.name, "<null>");
    mInfo.name = getStringField(env, obj, gInputWindowHandleClassInfo.name, "<null>");


    mInfo.flags = Flags<InputWindowInfo::Flag>(
    mInfo.flags = Flags<WindowInfo::Flag>(
            env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsFlags));
            env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsFlags));
    mInfo.type = static_cast<InputWindowInfo::Type>(
    mInfo.type = static_cast<WindowInfo::Type>(
            env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsType));
            env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsType));
    mInfo.dispatchingTimeout = std::chrono::milliseconds(
    mInfo.dispatchingTimeout = std::chrono::milliseconds(
            env->GetLongField(obj, gInputWindowHandleClassInfo.dispatchingTimeoutMillis));
            env->GetLongField(obj, gInputWindowHandleClassInfo.dispatchingTimeoutMillis));
@@ -159,7 +162,7 @@ bool NativeInputWindowHandle::updateInfo() {
    mInfo.ownerUid = env->GetIntField(obj,
    mInfo.ownerUid = env->GetIntField(obj,
            gInputWindowHandleClassInfo.ownerUid);
            gInputWindowHandleClassInfo.ownerUid);
    mInfo.packageName = getStringField(env, obj, gInputWindowHandleClassInfo.packageName, "<null>");
    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));
            env->GetIntField(obj, gInputWindowHandleClassInfo.inputFeatures));
    mInfo.displayId = env->GetIntField(obj,
    mInfo.displayId = env->GetIntField(obj,
            gInputWindowHandleClassInfo.displayId);
            gInputWindowHandleClassInfo.displayId);
Loading