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

Commit 514924c1 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9947982 from f8538d60 to udc-release

Change-Id: I9da03bac7ec6c5db3171bba97d38d15e208c2191
parents 2b36465f f8538d60
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -700,6 +700,11 @@ Status ServiceManager::registerClientCallback(const std::string& name, const sp<
        return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE, "Couldn't linkToDeath.");
    }

    // make sure all callbacks have been told about a consistent state - b/278038751
    if (serviceIt->second.hasClients) {
        cb->onClients(service, true);
    }

    mNameToClientCallback[name].push_back(cb);

    return Status::ok();
+23 −8
Original line number Diff line number Diff line
@@ -210,7 +210,20 @@ vec2 transformWithoutTranslation(const ui::Transform& transform, const vec2& xy)
 */
float transformAngle(const ui::Transform& transform, float angleRadians);

const char* inputEventTypeToString(int32_t type);
/**
 * The type of the InputEvent.
 * This should have 1:1 correspondence with the values of anonymous enum defined in input.h.
 */
enum class InputEventType {
    KEY = AINPUT_EVENT_TYPE_KEY,
    MOTION = AINPUT_EVENT_TYPE_MOTION,
    FOCUS = AINPUT_EVENT_TYPE_FOCUS,
    CAPTURE = AINPUT_EVENT_TYPE_CAPTURE,
    DRAG = AINPUT_EVENT_TYPE_DRAG,
    TOUCH_MODE = AINPUT_EVENT_TYPE_TOUCH_MODE,
    ftl_first = KEY,
    ftl_last = TOUCH_MODE,
};

std::string inputEventSourceToString(int32_t source);

@@ -482,7 +495,7 @@ class InputEvent : public AInputEvent {
public:
    virtual ~InputEvent() { }

    virtual int32_t getType() const = 0;
    virtual InputEventType getType() const = 0;

    inline int32_t getId() const { return mId; }

@@ -513,6 +526,8 @@ protected:
    std::array<uint8_t, 32> mHmac;
};

std::ostream& operator<<(std::ostream& out, const InputEvent& event);

/*
 * Key events.
 */
@@ -520,7 +535,7 @@ class KeyEvent : public InputEvent {
public:
    virtual ~KeyEvent() { }

    virtual int32_t getType() const { return AINPUT_EVENT_TYPE_KEY; }
    virtual InputEventType getType() const { return InputEventType::KEY; }

    inline int32_t getAction() const { return mAction; }

@@ -571,7 +586,7 @@ class MotionEvent : public InputEvent {
public:
    virtual ~MotionEvent() { }

    virtual int32_t getType() const { return AINPUT_EVENT_TYPE_MOTION; }
    virtual InputEventType getType() const { return InputEventType::MOTION; }

    inline int32_t getAction() const { return mAction; }

@@ -899,7 +914,7 @@ class FocusEvent : public InputEvent {
public:
    virtual ~FocusEvent() {}

    virtual int32_t getType() const override { return AINPUT_EVENT_TYPE_FOCUS; }
    virtual InputEventType getType() const override { return InputEventType::FOCUS; }

    inline bool getHasFocus() const { return mHasFocus; }

@@ -918,7 +933,7 @@ class CaptureEvent : public InputEvent {
public:
    virtual ~CaptureEvent() {}

    virtual int32_t getType() const override { return AINPUT_EVENT_TYPE_CAPTURE; }
    virtual InputEventType getType() const override { return InputEventType::CAPTURE; }

    inline bool getPointerCaptureEnabled() const { return mPointerCaptureEnabled; }

@@ -937,7 +952,7 @@ class DragEvent : public InputEvent {
public:
    virtual ~DragEvent() {}

    virtual int32_t getType() const override { return AINPUT_EVENT_TYPE_DRAG; }
    virtual InputEventType getType() const override { return InputEventType::DRAG; }

    inline bool isExiting() const { return mIsExiting; }

@@ -961,7 +976,7 @@ class TouchModeEvent : public InputEvent {
public:
    virtual ~TouchModeEvent() {}

    virtual int32_t getType() const override { return AINPUT_EVENT_TYPE_TOUCH_MODE; }
    virtual InputEventType getType() const override { return InputEventType::TOUCH_MODE; }

    inline bool isInTouchMode() const { return mIsInTouchMode; }

+19 −0
Original line number Diff line number Diff line
@@ -128,6 +128,15 @@ public:
        remote()->transact(NOTE_RESET_FLASHLIGHT_TRANSACTION, data, &reply);
    }

    virtual binder::Status noteWakeupSensorEvent(int64_t elapsedNanos, int uid, int handle) {
        Parcel data, reply;
        data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
        data.writeInt64(elapsedNanos);
        data.writeInt32(uid);
        data.writeInt32(handle);
        status_t ret = remote()->transact(NOTE_WAKEUP_SENSOR_EVENT_TRANSACTION, data, &reply);
        return binder::Status::fromStatusT(ret);
    }
};

IMPLEMENT_META_INTERFACE(BatteryStats, "com.android.internal.app.IBatteryStats")
@@ -235,6 +244,16 @@ status_t BnBatteryStats::onTransact(
            reply->writeNoException();
            return NO_ERROR;
        } break;
        case NOTE_WAKEUP_SENSOR_EVENT_TRANSACTION: {
            CHECK_INTERFACE(IBatteryStats, data, reply);
            int64_t elapsedNanos = data.readInt64();
            int uid = data.readInt32();
            int handle = data.readInt32();
            noteWakeupSensorEvent(elapsedNanos, uid, handle);
            reply->writeNoException();
            return NO_ERROR;
        } break;

        default:
            return BBinder::onTransact(code, data, reply, flags);
    }
+4 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#ifndef __ANDROID_VNDK__

#include <binder/IInterface.h>
#include <binder/Status.h>

namespace android {

@@ -43,6 +44,7 @@ public:
    virtual void noteStopCamera(int uid) = 0;
    virtual void noteResetCamera() = 0;
    virtual void noteResetFlashlight() = 0;
    virtual binder::Status noteWakeupSensorEvent(int64_t elapsedNanos, int uid, int sensor) = 0;

    enum {
        NOTE_START_SENSOR_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
@@ -58,7 +60,8 @@ public:
        NOTE_START_CAMERA_TRANSACTION,
        NOTE_STOP_CAMERA_TRANSACTION,
        NOTE_RESET_CAMERA_TRANSACTION,
        NOTE_RESET_FLASHLIGHT_TRANSACTION
        NOTE_RESET_FLASHLIGHT_TRANSACTION,
        NOTE_WAKEUP_SENSOR_EVENT_TRANSACTION
    };
};

+3 −3
Original line number Diff line number Diff line
@@ -179,13 +179,13 @@ protected:
    BLASTBufferQueueTest() {
        const ::testing::TestInfo* const testInfo =
                ::testing::UnitTest::GetInstance()->current_test_info();
        ALOGV("Begin test: %s.%s", testInfo->test_case_name(), testInfo->name());
        ALOGD("Begin test: %s.%s", testInfo->test_case_name(), testInfo->name());
    }

    ~BLASTBufferQueueTest() {
        const ::testing::TestInfo* const testInfo =
                ::testing::UnitTest::GetInstance()->current_test_info();
        ALOGV("End test:   %s.%s", testInfo->test_case_name(), testInfo->name());
        ALOGD("End test:   %s.%s", testInfo->test_case_name(), testInfo->name());
    }

    void SetUp() {
@@ -206,7 +206,7 @@ protected:
        const ui::Size& resolution = displayState.layerStackSpaceRect;
        mDisplayWidth = resolution.getWidth();
        mDisplayHeight = resolution.getHeight();
        ALOGV("Display: %dx%d orientation:%d", mDisplayWidth, mDisplayHeight,
        ALOGD("Display: %dx%d orientation:%d", mDisplayWidth, mDisplayHeight,
              displayState.orientation);

        mSurfaceControl = mClient->createSurface(String8("TestSurface"), mDisplayWidth,
Loading