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

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

Snap for 13444741 from 073aae7a to 25Q4-release

Change-Id: I2b1dc5298aac2c1173e5475e5af6279f7a921537
parents 804fe8db 073aae7a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ private:
        BitSet32 idBits;
        int32_t idToIndex[MAX_POINTER_ID + 1];
        PointerCoords pointers[MAX_POINTERS];
        int32_t displayId;

        void initializeFrom(const InputMessage& msg) {
            eventTime = msg.body.motion.eventTime;
@@ -145,6 +146,7 @@ private:
                idToIndex[id] = i;
                pointers[i].copyFrom(msg.body.motion.pointers[i].coords);
            }
            displayId = msg.body.motion.displayId;
        }

        void initializeFrom(const History& other) {
@@ -157,6 +159,7 @@ private:
                pointers[index].copyFrom(other.pointers[index]);
            }
            idBits = other.idBits; // final copy
            displayId = other.displayId;
        }

        const PointerCoords& getPointerById(uint32_t id) const { return pointers[idToIndex[id]]; }
+5 −0
Original line number Diff line number Diff line
@@ -260,6 +260,11 @@ private:
     * the batched MotionEvent that it received.
     */
    std::map<uint32_t, std::vector<uint32_t>> mBatchedSequenceNumbers;

    /**
     * Checks if a given input event is okay to be added to an existing batch or not.
     */
    bool isBatchableEvent(const InputMessage& message) const;
};

} // namespace android
+17 −0
Original line number Diff line number Diff line
@@ -357,13 +357,29 @@ cc_defaults {
        "android-*",
        "bugprone-*",
        "-bugprone-branch-clone", // b/155034972
        "-bugprone-forwarding-reference-overload",
        "-bugprone-switch-missing-default-case",
        "cert-*",
        "clang-analyzer-*",
        "-clang-analyzer-deadcode.DeadStores",
        "-clang-analyzer-security.cert.env.InvalidPtr",
        "-clang-analyzer-unix.BlockInCriticalSection",
        "-clang-analyzer-unix.StdCLibraryFunctions",
        "-clang-diagnostic-error",
        "google-*",
        "-google-explicit-constructor",
        "misc-*",
        "-misc-header-include-cycle",
        "-misc-include-cleaner",
        "-misc-use-internal-linkage",
        "-modernize-use-override",
        "performance*",
        "-performance-enum-size",
        "-performance-move-const-arg", // b/273486801
        "-performance-unnecessary-copy-initialization",
        "-performance-unnecessary-value-param",
        "portability*",
        "-readability-redundant-smartptr-get",
    ],
}

@@ -555,6 +571,7 @@ cc_defaults {
        ":libbinder_aidl",
        ":libbinder_accessor_aidl",
        ":libbinder_device_interface_sources",
        ":android-os-statsbootstrap-aidl",
    ],
    target: {
        vendor: {
+6 −0
Original line number Diff line number Diff line
@@ -154,10 +154,16 @@ public:
    void enableAddServiceCache(bool value) { mEnableAddServiceCache = value; }
    // for legacy ABI
    const String16& getInterfaceDescriptor() const override {
        if (mTheRealServiceManager == nullptr) return mNullInterfaceDescriptor;
        return mTheRealServiceManager->getInterfaceDescriptor();
    }

private:
    // Empty descriptor in case there is no mTheRealServiceManager. We need an
    // object to return a String& reference and there is only expected to be a
    // single BackendUnifiedServiceManager per-process, so this is a member
    // variable.
    const String16 mNullInterfaceDescriptor;
    bool mEnableAddServiceCache = true;
    std::shared_ptr<BinderCacheWithInvalidation> mCacheForGetService;
    sp<os::IServiceManager> mTheRealServiceManager;
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 * Copyright (C) 2025 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -13,38 +13,22 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#pragma once

#include <android/frameworks/schedulerservice/1.0/ISchedulingPolicyService.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>

namespace android {
namespace frameworks {
namespace schedulerservice {
namespace V1_0 {
namespace implementation {

using ::android::frameworks::schedulerservice::V1_0::ISchedulingPolicyService;
using ::android::hidl::base::V1_0::DebugInfo;
using ::android::hidl::base::V1_0::IBase;
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;

struct SchedulingPolicyService : public ISchedulingPolicyService {
    Return<bool> requestPriority(int32_t pid, int32_t tid, int32_t priority) override;
    Return<int32_t> getMaxAllowedPriority() override;
private:
    bool isAllowed();
};

}  // namespace implementation
}  // namespace V1_0
}  // namespace schedulerservice
}  // namespace frameworks
}  // namespace android
#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__)
#include <dlfcn.h>
#include <jni.h>
extern "C" JavaVM* AndroidRuntimeGetJavaVM();
#endif
namespace {
#if !defined(__ANDROID__) || defined(__ANDROID_RECOVERY__)
static void* getJavaVM() {
    return nullptr;
}
#else
static JavaVM* getJavaVM() {
    static auto fn = reinterpret_cast<decltype(&AndroidRuntimeGetJavaVM)>(
            dlsym(RTLD_DEFAULT, "AndroidRuntimeGetJavaVM"));
    if (fn == nullptr) return nullptr;
    return fn();
}
#endif
} // namespace
Loading